irdb.postman_collection.json 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534
  1. {
  2. "info": {
  3. "_postman_id": "8c4d2b1f-3e1a-4a7d-9c2b-1d2a3b4c5d6e",
  4. "name": "IRDB — IP Reputation Database",
  5. "description": "Postman collection for the IRDB API. Mirrors the OpenAPI spec at `/api/v1/openapi.yaml` and the routes registered in `api/src/App/AppFactory.php`.\n\n## Variables\n\nUse the matching `IRDB Local` environment file or set these manually:\n\n- `baseUrl` — e.g. `http://localhost:8081`.\n- `adminToken` — `irdb_adm_…` token (kind=admin, role=admin). Default `Authorization` for the **Admin API** folder.\n- `serviceToken` — `irdb_svc_…` token. Used for the **Auth API** folder and for impersonated calls into the **Admin API** folder.\n- `actingUserId` — integer user id sent in the `X-Acting-User-Id` header when using the service token.\n- `reporterToken` — `irdb_rep_…` for posting reports.\n- `consumerToken` — `irdb_con_…` for pulling blocklists.\n- `internalJobToken` — value of the `INTERNAL_JOB_TOKEN` env var. Internal jobs are loopback / RFC1918 only; run Postman from the host that runs the api container.\n\n## Auth model\n\n- **Admin API** endpoints accept either `Authorization: Bearer <admin-kind-token>` OR `Authorization: Bearer <service-token>` plus `X-Acting-User-Id: <user_id>`. The collection defaults to the admin-kind token. To switch to service-token impersonation, override the request-level auth and add the header.\n- **Auth API** endpoints accept ONLY a `service` token; no impersonation.\n- **Internal Jobs** endpoints require `Authorization: Bearer <INTERNAL_JOB_TOKEN>` AND the request must arrive from loopback / RFC1918.\n\n## Chaining\n\nMost write requests save useful ids back to collection variables (`reporterId`, `consumerId`, `policyId`, `categoryId`, `manualBlockId`, `allowlistEntryId`, `tokenId`, `lastRawToken`) so a follow-up request can use them without manual copy/paste. Run requests in folder order on a fresh database for a smooth flow.\n",
  6. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  7. },
  8. "auth": {
  9. "type": "bearer",
  10. "bearer": [
  11. {
  12. "key": "token",
  13. "value": "{{adminToken}}",
  14. "type": "string"
  15. }
  16. ]
  17. },
  18. "event": [
  19. {
  20. "listen": "prerequest",
  21. "script": {
  22. "type": "text/javascript",
  23. "exec": [
  24. ""
  25. ]
  26. }
  27. },
  28. {
  29. "listen": "test",
  30. "script": {
  31. "type": "text/javascript",
  32. "exec": [
  33. ""
  34. ]
  35. }
  36. }
  37. ],
  38. "variable": [
  39. {
  40. "key": "baseUrl",
  41. "value": "http://localhost:8081",
  42. "type": "string"
  43. },
  44. {
  45. "key": "adminToken",
  46. "value": "",
  47. "type": "string"
  48. },
  49. {
  50. "key": "serviceToken",
  51. "value": "",
  52. "type": "string"
  53. },
  54. {
  55. "key": "actingUserId",
  56. "value": "1",
  57. "type": "string"
  58. },
  59. {
  60. "key": "reporterToken",
  61. "value": "",
  62. "type": "string"
  63. },
  64. {
  65. "key": "consumerToken",
  66. "value": "",
  67. "type": "string"
  68. },
  69. {
  70. "key": "internalJobToken",
  71. "value": "",
  72. "type": "string"
  73. },
  74. {
  75. "key": "reporterId",
  76. "value": "",
  77. "type": "string"
  78. },
  79. {
  80. "key": "consumerId",
  81. "value": "",
  82. "type": "string"
  83. },
  84. {
  85. "key": "policyId",
  86. "value": "",
  87. "type": "string"
  88. },
  89. {
  90. "key": "categoryId",
  91. "value": "",
  92. "type": "string"
  93. },
  94. {
  95. "key": "manualBlockId",
  96. "value": "",
  97. "type": "string"
  98. },
  99. {
  100. "key": "allowlistEntryId",
  101. "value": "",
  102. "type": "string"
  103. },
  104. {
  105. "key": "tokenId",
  106. "value": "",
  107. "type": "string"
  108. },
  109. {
  110. "key": "lastRawToken",
  111. "value": "",
  112. "type": "string"
  113. },
  114. {
  115. "key": "userId",
  116. "value": "",
  117. "type": "string"
  118. }
  119. ],
  120. "item": [
  121. {
  122. "name": "Health & Docs",
  123. "description": "Unauthenticated endpoints for liveness checks and the API spec.",
  124. "auth": {
  125. "type": "noauth"
  126. },
  127. "item": [
  128. {
  129. "name": "GET /healthz",
  130. "request": {
  131. "method": "GET",
  132. "header": [],
  133. "url": {
  134. "raw": "{{baseUrl}}/healthz",
  135. "host": [
  136. "{{baseUrl}}"
  137. ],
  138. "path": [
  139. "healthz"
  140. ]
  141. },
  142. "description": "Liveness probe. Returns `{status, db: {connected, driver}, geoip: {…}}`."
  143. },
  144. "event": [
  145. {
  146. "listen": "test",
  147. "script": {
  148. "type": "text/javascript",
  149. "exec": [
  150. "pm.test('200 OK', () => pm.response.to.have.status(200));",
  151. "pm.test('returns ok status', () => pm.expect(pm.response.json().status).to.eql('ok'));"
  152. ]
  153. }
  154. }
  155. ]
  156. },
  157. {
  158. "name": "GET /api/v1/openapi.yaml",
  159. "request": {
  160. "method": "GET",
  161. "header": [],
  162. "url": {
  163. "raw": "{{baseUrl}}/api/v1/openapi.yaml",
  164. "host": [
  165. "{{baseUrl}}"
  166. ],
  167. "path": [
  168. "api",
  169. "v1",
  170. "openapi.yaml"
  171. ]
  172. },
  173. "description": "OpenAPI 3.0.3 document — canonical source of request/response schemas."
  174. }
  175. },
  176. {
  177. "name": "GET /api/docs",
  178. "request": {
  179. "method": "GET",
  180. "header": [],
  181. "url": {
  182. "raw": "{{baseUrl}}/api/docs",
  183. "host": [
  184. "{{baseUrl}}"
  185. ],
  186. "path": [
  187. "api",
  188. "docs"
  189. ]
  190. },
  191. "description": "Stoplight Elements / RapiDoc viewer (HTML)."
  192. }
  193. }
  194. ]
  195. },
  196. {
  197. "name": "Public — Reporter",
  198. "description": "`POST /api/v1/report`. Token kind must be `reporter`. Rate limited at 60 req/s/token.",
  199. "auth": {
  200. "type": "bearer",
  201. "bearer": [
  202. {
  203. "key": "token",
  204. "value": "{{reporterToken}}",
  205. "type": "string"
  206. }
  207. ]
  208. },
  209. "item": [
  210. {
  211. "name": "POST /api/v1/report",
  212. "request": {
  213. "method": "POST",
  214. "header": [
  215. {
  216. "key": "Content-Type",
  217. "value": "application/json"
  218. }
  219. ],
  220. "body": {
  221. "mode": "raw",
  222. "raw": "{\n \"ip\": \"203.0.113.42\",\n \"category\": \"brute_force\",\n \"metadata\": {\n \"url\": \"/wp-login.php\",\n \"ua\": \"curl/8.0\"\n }\n}"
  223. },
  224. "url": {
  225. "raw": "{{baseUrl}}/api/v1/report",
  226. "host": [
  227. "{{baseUrl}}"
  228. ],
  229. "path": [
  230. "api",
  231. "v1",
  232. "report"
  233. ]
  234. },
  235. "description": "Submit a single abuse report. The category must match an active `categories.slug`."
  236. },
  237. "event": [
  238. {
  239. "listen": "test",
  240. "script": {
  241. "type": "text/javascript",
  242. "exec": [
  243. "pm.test('202 Accepted', () => pm.response.to.have.status(202));",
  244. "const body = pm.response.json();",
  245. "pm.test('body has report_id', () => pm.expect(body.report_id).to.be.a('number'));"
  246. ]
  247. }
  248. }
  249. ]
  250. }
  251. ]
  252. },
  253. {
  254. "name": "Public — Consumer",
  255. "description": "`GET /api/v1/blocklist`. Token kind must be `consumer`. Default response is `text/plain`, one entry per line. Pass `?format=json` for structured rows. Cached internally for 30 s per consumer; honour `If-None-Match` for `304`.",
  256. "auth": {
  257. "type": "bearer",
  258. "bearer": [
  259. {
  260. "key": "token",
  261. "value": "{{consumerToken}}",
  262. "type": "string"
  263. }
  264. ]
  265. },
  266. "item": [
  267. {
  268. "name": "GET /api/v1/blocklist (text)",
  269. "request": {
  270. "method": "GET",
  271. "header": [],
  272. "url": {
  273. "raw": "{{baseUrl}}/api/v1/blocklist",
  274. "host": [
  275. "{{baseUrl}}"
  276. ],
  277. "path": [
  278. "api",
  279. "v1",
  280. "blocklist"
  281. ]
  282. }
  283. },
  284. "event": [
  285. {
  286. "listen": "test",
  287. "script": {
  288. "type": "text/javascript",
  289. "exec": [
  290. "pm.test('200 OK', () => pm.response.to.have.status(200));",
  291. "const etag = pm.response.headers.get('ETag');",
  292. "if (etag) pm.collectionVariables.set('lastBlocklistETag', etag);"
  293. ]
  294. }
  295. }
  296. ]
  297. },
  298. {
  299. "name": "GET /api/v1/blocklist?format=json",
  300. "request": {
  301. "method": "GET",
  302. "header": [],
  303. "url": {
  304. "raw": "{{baseUrl}}/api/v1/blocklist?format=json",
  305. "host": [
  306. "{{baseUrl}}"
  307. ],
  308. "path": [
  309. "api",
  310. "v1",
  311. "blocklist"
  312. ],
  313. "query": [
  314. {
  315. "key": "format",
  316. "value": "json"
  317. }
  318. ]
  319. }
  320. }
  321. },
  322. {
  323. "name": "GET /api/v1/blocklist (If-None-Match)",
  324. "request": {
  325. "method": "GET",
  326. "header": [
  327. {
  328. "key": "If-None-Match",
  329. "value": "{{lastBlocklistETag}}",
  330. "description": "Set automatically by the previous text-format request."
  331. }
  332. ],
  333. "url": {
  334. "raw": "{{baseUrl}}/api/v1/blocklist",
  335. "host": [
  336. "{{baseUrl}}"
  337. ],
  338. "path": [
  339. "api",
  340. "v1",
  341. "blocklist"
  342. ]
  343. },
  344. "description": "Re-pulls the blocklist with the previously captured ETag. Expects `304 Not Modified` when the body is unchanged."
  345. }
  346. }
  347. ]
  348. },
  349. {
  350. "name": "Auth API (UI BFF)",
  351. "description": "Service-token-only. No `X-Acting-User-Id` header here — these endpoints exist to *produce* user records the UI can later impersonate.",
  352. "auth": {
  353. "type": "bearer",
  354. "bearer": [
  355. {
  356. "key": "token",
  357. "value": "{{serviceToken}}",
  358. "type": "string"
  359. }
  360. ]
  361. },
  362. "item": [
  363. {
  364. "name": "POST /api/v1/auth/users/upsert-oidc",
  365. "request": {
  366. "method": "POST",
  367. "header": [
  368. {
  369. "key": "Content-Type",
  370. "value": "application/json"
  371. }
  372. ],
  373. "body": {
  374. "mode": "raw",
  375. "raw": "{\n \"subject\": \"00000000-0000-0000-0000-000000000001\",\n \"email\": \"alice@example.com\",\n \"display_name\": \"Alice Example\",\n \"groups\": [\"00000000-aaaa-bbbb-cccc-000000000001\"]\n}"
  376. },
  377. "url": {
  378. "raw": "{{baseUrl}}/api/v1/auth/users/upsert-oidc",
  379. "host": [
  380. "{{baseUrl}}"
  381. ],
  382. "path": [
  383. "api",
  384. "v1",
  385. "auth",
  386. "users",
  387. "upsert-oidc"
  388. ]
  389. }
  390. },
  391. "event": [
  392. {
  393. "listen": "test",
  394. "script": {
  395. "type": "text/javascript",
  396. "exec": [
  397. "if (pm.response.code === 200) {",
  398. " const u = pm.response.json();",
  399. " if (u && u.id) pm.collectionVariables.set('userId', String(u.id));",
  400. "}"
  401. ]
  402. }
  403. }
  404. ]
  405. },
  406. {
  407. "name": "POST /api/v1/auth/users/upsert-local",
  408. "request": {
  409. "method": "POST",
  410. "header": [
  411. {
  412. "key": "Content-Type",
  413. "value": "application/json"
  414. }
  415. ],
  416. "body": {
  417. "mode": "raw",
  418. "raw": "{\n \"username\": \"admin\"\n}"
  419. },
  420. "url": {
  421. "raw": "{{baseUrl}}/api/v1/auth/users/upsert-local",
  422. "host": [
  423. "{{baseUrl}}"
  424. ],
  425. "path": [
  426. "api",
  427. "v1",
  428. "auth",
  429. "users",
  430. "upsert-local"
  431. ]
  432. }
  433. },
  434. "event": [
  435. {
  436. "listen": "test",
  437. "script": {
  438. "type": "text/javascript",
  439. "exec": [
  440. "if (pm.response.code === 200) {",
  441. " const u = pm.response.json();",
  442. " if (u && u.id) pm.collectionVariables.set('userId', String(u.id));",
  443. "}"
  444. ]
  445. }
  446. }
  447. ]
  448. },
  449. {
  450. "name": "GET /api/v1/auth/users/:id",
  451. "request": {
  452. "method": "GET",
  453. "header": [],
  454. "url": {
  455. "raw": "{{baseUrl}}/api/v1/auth/users/{{userId}}",
  456. "host": [
  457. "{{baseUrl}}"
  458. ],
  459. "path": [
  460. "api",
  461. "v1",
  462. "auth",
  463. "users",
  464. "{{userId}}"
  465. ]
  466. }
  467. }
  468. }
  469. ]
  470. },
  471. {
  472. "name": "Admin — Identity",
  473. "item": [
  474. {
  475. "name": "GET /api/v1/admin/me",
  476. "request": {
  477. "method": "GET",
  478. "header": [
  479. {
  480. "key": "X-Acting-User-Id",
  481. "value": "{{actingUserId}}",
  482. "description": "Required when authenticating with the service token. Ignored otherwise.",
  483. "disabled": true
  484. }
  485. ],
  486. "url": {
  487. "raw": "{{baseUrl}}/api/v1/admin/me",
  488. "host": [
  489. "{{baseUrl}}"
  490. ],
  491. "path": [
  492. "api",
  493. "v1",
  494. "admin",
  495. "me"
  496. ]
  497. },
  498. "description": "Returns the current acting identity: `{id, email, display_name, role, source, is_local}`."
  499. }
  500. }
  501. ]
  502. },
  503. {
  504. "name": "Admin — IPs & Stats",
  505. "item": [
  506. {
  507. "name": "GET /api/v1/admin/ips (search)",
  508. "request": {
  509. "method": "GET",
  510. "header": [
  511. {
  512. "key": "X-Acting-User-Id",
  513. "value": "{{actingUserId}}",
  514. "disabled": true
  515. }
  516. ],
  517. "url": {
  518. "raw": "{{baseUrl}}/api/v1/admin/ips?q=&category=&min_score=&max_score=&country=&asn=&status=&page=1&page_size=50",
  519. "host": [
  520. "{{baseUrl}}"
  521. ],
  522. "path": [
  523. "api",
  524. "v1",
  525. "admin",
  526. "ips"
  527. ],
  528. "query": [
  529. {
  530. "key": "q",
  531. "value": "",
  532. "description": "Free-text search (IP / CIDR / country / ASN substring)."
  533. },
  534. {
  535. "key": "category",
  536. "value": "",
  537. "description": "Category slug, e.g. `brute_force`."
  538. },
  539. {
  540. "key": "min_score",
  541. "value": "",
  542. "description": "Minimum aggregate score."
  543. },
  544. {
  545. "key": "max_score",
  546. "value": "",
  547. "description": "Maximum aggregate score."
  548. },
  549. {
  550. "key": "country",
  551. "value": "",
  552. "description": "ISO 3166-1 alpha-2 country code."
  553. },
  554. {
  555. "key": "asn",
  556. "value": "",
  557. "description": "ASN integer."
  558. },
  559. {
  560. "key": "status",
  561. "value": "",
  562. "description": "scored | manual | allowlisted | clean"
  563. },
  564. {
  565. "key": "page",
  566. "value": "1"
  567. },
  568. {
  569. "key": "page_size",
  570. "value": "50"
  571. }
  572. ]
  573. }
  574. }
  575. },
  576. {
  577. "name": "GET /api/v1/admin/ips/countries",
  578. "request": {
  579. "method": "GET",
  580. "header": [
  581. {
  582. "key": "X-Acting-User-Id",
  583. "value": "{{actingUserId}}",
  584. "disabled": true
  585. }
  586. ],
  587. "url": {
  588. "raw": "{{baseUrl}}/api/v1/admin/ips/countries",
  589. "host": [
  590. "{{baseUrl}}"
  591. ],
  592. "path": [
  593. "api",
  594. "v1",
  595. "admin",
  596. "ips",
  597. "countries"
  598. ]
  599. },
  600. "description": "Country code dropdown source — `[{code, count}]`."
  601. }
  602. },
  603. {
  604. "name": "GET /api/v1/admin/ips/:ip",
  605. "request": {
  606. "method": "GET",
  607. "header": [
  608. {
  609. "key": "X-Acting-User-Id",
  610. "value": "{{actingUserId}}",
  611. "disabled": true
  612. }
  613. ],
  614. "url": {
  615. "raw": "{{baseUrl}}/api/v1/admin/ips/203.0.113.42",
  616. "host": [
  617. "{{baseUrl}}"
  618. ],
  619. "path": [
  620. "api",
  621. "v1",
  622. "admin",
  623. "ips",
  624. "203.0.113.42"
  625. ]
  626. },
  627. "description": "Full per-IP detail: scores, enrichment, manual/allowlist status, history."
  628. }
  629. },
  630. {
  631. "name": "GET /api/v1/admin/stats/dashboard",
  632. "request": {
  633. "method": "GET",
  634. "header": [
  635. {
  636. "key": "X-Acting-User-Id",
  637. "value": "{{actingUserId}}",
  638. "disabled": true
  639. }
  640. ],
  641. "url": {
  642. "raw": "{{baseUrl}}/api/v1/admin/stats/dashboard",
  643. "host": [
  644. "{{baseUrl}}"
  645. ],
  646. "path": [
  647. "api",
  648. "v1",
  649. "admin",
  650. "stats",
  651. "dashboard"
  652. ]
  653. },
  654. "description": "Pre-built dashboard payload (~30 s cached)."
  655. }
  656. }
  657. ]
  658. },
  659. {
  660. "name": "Admin — Manual Blocks",
  661. "item": [
  662. {
  663. "name": "GET /api/v1/admin/manual-blocks",
  664. "request": {
  665. "method": "GET",
  666. "header": [
  667. {
  668. "key": "X-Acting-User-Id",
  669. "value": "{{actingUserId}}",
  670. "disabled": true
  671. }
  672. ],
  673. "url": {
  674. "raw": "{{baseUrl}}/api/v1/admin/manual-blocks",
  675. "host": [
  676. "{{baseUrl}}"
  677. ],
  678. "path": [
  679. "api",
  680. "v1",
  681. "admin",
  682. "manual-blocks"
  683. ]
  684. }
  685. }
  686. },
  687. {
  688. "name": "POST /api/v1/admin/manual-blocks (ip)",
  689. "request": {
  690. "method": "POST",
  691. "header": [
  692. {
  693. "key": "Content-Type",
  694. "value": "application/json"
  695. },
  696. {
  697. "key": "X-Acting-User-Id",
  698. "value": "{{actingUserId}}",
  699. "disabled": true
  700. }
  701. ],
  702. "body": {
  703. "mode": "raw",
  704. "raw": "{\n \"kind\": \"ip\",\n \"ip\": \"198.51.100.7\",\n \"reason\": \"persistent SSH brute force\",\n \"expires_at\": null\n}"
  705. },
  706. "url": {
  707. "raw": "{{baseUrl}}/api/v1/admin/manual-blocks",
  708. "host": [
  709. "{{baseUrl}}"
  710. ],
  711. "path": [
  712. "api",
  713. "v1",
  714. "admin",
  715. "manual-blocks"
  716. ]
  717. }
  718. },
  719. "event": [
  720. {
  721. "listen": "test",
  722. "script": {
  723. "type": "text/javascript",
  724. "exec": [
  725. "if (pm.response.code === 201) {",
  726. " const b = pm.response.json();",
  727. " if (b && b.id) pm.collectionVariables.set('manualBlockId', String(b.id));",
  728. "}"
  729. ]
  730. }
  731. }
  732. ]
  733. },
  734. {
  735. "name": "POST /api/v1/admin/manual-blocks (subnet)",
  736. "request": {
  737. "method": "POST",
  738. "header": [
  739. {
  740. "key": "Content-Type",
  741. "value": "application/json"
  742. },
  743. {
  744. "key": "X-Acting-User-Id",
  745. "value": "{{actingUserId}}",
  746. "disabled": true
  747. }
  748. ],
  749. "body": {
  750. "mode": "raw",
  751. "raw": "{\n \"kind\": \"subnet\",\n \"cidr\": \"198.51.100.0/24\",\n \"reason\": \"abuse cluster\",\n \"expires_at\": null\n}"
  752. },
  753. "url": {
  754. "raw": "{{baseUrl}}/api/v1/admin/manual-blocks",
  755. "host": [
  756. "{{baseUrl}}"
  757. ],
  758. "path": [
  759. "api",
  760. "v1",
  761. "admin",
  762. "manual-blocks"
  763. ]
  764. }
  765. }
  766. },
  767. {
  768. "name": "GET /api/v1/admin/manual-blocks/:id",
  769. "request": {
  770. "method": "GET",
  771. "header": [
  772. {
  773. "key": "X-Acting-User-Id",
  774. "value": "{{actingUserId}}",
  775. "disabled": true
  776. }
  777. ],
  778. "url": {
  779. "raw": "{{baseUrl}}/api/v1/admin/manual-blocks/{{manualBlockId}}",
  780. "host": [
  781. "{{baseUrl}}"
  782. ],
  783. "path": [
  784. "api",
  785. "v1",
  786. "admin",
  787. "manual-blocks",
  788. "{{manualBlockId}}"
  789. ]
  790. }
  791. }
  792. },
  793. {
  794. "name": "DELETE /api/v1/admin/manual-blocks/:id",
  795. "request": {
  796. "method": "DELETE",
  797. "header": [
  798. {
  799. "key": "X-Acting-User-Id",
  800. "value": "{{actingUserId}}",
  801. "disabled": true
  802. }
  803. ],
  804. "url": {
  805. "raw": "{{baseUrl}}/api/v1/admin/manual-blocks/{{manualBlockId}}",
  806. "host": [
  807. "{{baseUrl}}"
  808. ],
  809. "path": [
  810. "api",
  811. "v1",
  812. "admin",
  813. "manual-blocks",
  814. "{{manualBlockId}}"
  815. ]
  816. }
  817. }
  818. }
  819. ]
  820. },
  821. {
  822. "name": "Admin — Allowlist",
  823. "item": [
  824. {
  825. "name": "GET /api/v1/admin/allowlist",
  826. "request": {
  827. "method": "GET",
  828. "header": [
  829. {
  830. "key": "X-Acting-User-Id",
  831. "value": "{{actingUserId}}",
  832. "disabled": true
  833. }
  834. ],
  835. "url": {
  836. "raw": "{{baseUrl}}/api/v1/admin/allowlist",
  837. "host": [
  838. "{{baseUrl}}"
  839. ],
  840. "path": [
  841. "api",
  842. "v1",
  843. "admin",
  844. "allowlist"
  845. ]
  846. }
  847. }
  848. },
  849. {
  850. "name": "POST /api/v1/admin/allowlist (ip)",
  851. "request": {
  852. "method": "POST",
  853. "header": [
  854. {
  855. "key": "Content-Type",
  856. "value": "application/json"
  857. },
  858. {
  859. "key": "X-Acting-User-Id",
  860. "value": "{{actingUserId}}",
  861. "disabled": true
  862. }
  863. ],
  864. "body": {
  865. "mode": "raw",
  866. "raw": "{\n \"kind\": \"ip\",\n \"ip\": \"192.0.2.1\",\n \"reason\": \"office egress\"\n}"
  867. },
  868. "url": {
  869. "raw": "{{baseUrl}}/api/v1/admin/allowlist",
  870. "host": [
  871. "{{baseUrl}}"
  872. ],
  873. "path": [
  874. "api",
  875. "v1",
  876. "admin",
  877. "allowlist"
  878. ]
  879. }
  880. },
  881. "event": [
  882. {
  883. "listen": "test",
  884. "script": {
  885. "type": "text/javascript",
  886. "exec": [
  887. "if (pm.response.code === 201) {",
  888. " const b = pm.response.json();",
  889. " if (b && b.id) pm.collectionVariables.set('allowlistEntryId', String(b.id));",
  890. "}"
  891. ]
  892. }
  893. }
  894. ]
  895. },
  896. {
  897. "name": "POST /api/v1/admin/allowlist (subnet)",
  898. "request": {
  899. "method": "POST",
  900. "header": [
  901. {
  902. "key": "Content-Type",
  903. "value": "application/json"
  904. },
  905. {
  906. "key": "X-Acting-User-Id",
  907. "value": "{{actingUserId}}",
  908. "disabled": true
  909. }
  910. ],
  911. "body": {
  912. "mode": "raw",
  913. "raw": "{\n \"kind\": \"subnet\",\n \"cidr\": \"192.0.2.0/24\",\n \"reason\": \"corporate range\"\n}"
  914. },
  915. "url": {
  916. "raw": "{{baseUrl}}/api/v1/admin/allowlist",
  917. "host": [
  918. "{{baseUrl}}"
  919. ],
  920. "path": [
  921. "api",
  922. "v1",
  923. "admin",
  924. "allowlist"
  925. ]
  926. }
  927. }
  928. },
  929. {
  930. "name": "GET /api/v1/admin/allowlist/:id",
  931. "request": {
  932. "method": "GET",
  933. "header": [
  934. {
  935. "key": "X-Acting-User-Id",
  936. "value": "{{actingUserId}}",
  937. "disabled": true
  938. }
  939. ],
  940. "url": {
  941. "raw": "{{baseUrl}}/api/v1/admin/allowlist/{{allowlistEntryId}}",
  942. "host": [
  943. "{{baseUrl}}"
  944. ],
  945. "path": [
  946. "api",
  947. "v1",
  948. "admin",
  949. "allowlist",
  950. "{{allowlistEntryId}}"
  951. ]
  952. }
  953. }
  954. },
  955. {
  956. "name": "DELETE /api/v1/admin/allowlist/:id",
  957. "request": {
  958. "method": "DELETE",
  959. "header": [
  960. {
  961. "key": "X-Acting-User-Id",
  962. "value": "{{actingUserId}}",
  963. "disabled": true
  964. }
  965. ],
  966. "url": {
  967. "raw": "{{baseUrl}}/api/v1/admin/allowlist/{{allowlistEntryId}}",
  968. "host": [
  969. "{{baseUrl}}"
  970. ],
  971. "path": [
  972. "api",
  973. "v1",
  974. "admin",
  975. "allowlist",
  976. "{{allowlistEntryId}}"
  977. ]
  978. }
  979. }
  980. }
  981. ]
  982. },
  983. {
  984. "name": "Admin — Reporters",
  985. "item": [
  986. {
  987. "name": "GET /api/v1/admin/reporters",
  988. "request": {
  989. "method": "GET",
  990. "header": [
  991. {
  992. "key": "X-Acting-User-Id",
  993. "value": "{{actingUserId}}",
  994. "disabled": true
  995. }
  996. ],
  997. "url": {
  998. "raw": "{{baseUrl}}/api/v1/admin/reporters",
  999. "host": [
  1000. "{{baseUrl}}"
  1001. ],
  1002. "path": [
  1003. "api",
  1004. "v1",
  1005. "admin",
  1006. "reporters"
  1007. ]
  1008. }
  1009. }
  1010. },
  1011. {
  1012. "name": "POST /api/v1/admin/reporters",
  1013. "request": {
  1014. "method": "POST",
  1015. "header": [
  1016. {
  1017. "key": "Content-Type",
  1018. "value": "application/json"
  1019. },
  1020. {
  1021. "key": "X-Acting-User-Id",
  1022. "value": "{{actingUserId}}",
  1023. "disabled": true
  1024. }
  1025. ],
  1026. "body": {
  1027. "mode": "raw",
  1028. "raw": "{\n \"name\": \"web-prod-01\",\n \"description\": \"front-end webserver\",\n \"trust_weight\": 1.0,\n \"is_active\": true\n}"
  1029. },
  1030. "url": {
  1031. "raw": "{{baseUrl}}/api/v1/admin/reporters",
  1032. "host": [
  1033. "{{baseUrl}}"
  1034. ],
  1035. "path": [
  1036. "api",
  1037. "v1",
  1038. "admin",
  1039. "reporters"
  1040. ]
  1041. }
  1042. },
  1043. "event": [
  1044. {
  1045. "listen": "test",
  1046. "script": {
  1047. "type": "text/javascript",
  1048. "exec": [
  1049. "if (pm.response.code === 201) {",
  1050. " const r = pm.response.json();",
  1051. " if (r && r.id) pm.collectionVariables.set('reporterId', String(r.id));",
  1052. "}"
  1053. ]
  1054. }
  1055. }
  1056. ]
  1057. },
  1058. {
  1059. "name": "GET /api/v1/admin/reporters/:id",
  1060. "request": {
  1061. "method": "GET",
  1062. "header": [
  1063. {
  1064. "key": "X-Acting-User-Id",
  1065. "value": "{{actingUserId}}",
  1066. "disabled": true
  1067. }
  1068. ],
  1069. "url": {
  1070. "raw": "{{baseUrl}}/api/v1/admin/reporters/{{reporterId}}",
  1071. "host": [
  1072. "{{baseUrl}}"
  1073. ],
  1074. "path": [
  1075. "api",
  1076. "v1",
  1077. "admin",
  1078. "reporters",
  1079. "{{reporterId}}"
  1080. ]
  1081. }
  1082. }
  1083. },
  1084. {
  1085. "name": "PATCH /api/v1/admin/reporters/:id",
  1086. "request": {
  1087. "method": "PATCH",
  1088. "header": [
  1089. {
  1090. "key": "Content-Type",
  1091. "value": "application/json"
  1092. },
  1093. {
  1094. "key": "X-Acting-User-Id",
  1095. "value": "{{actingUserId}}",
  1096. "disabled": true
  1097. }
  1098. ],
  1099. "body": {
  1100. "mode": "raw",
  1101. "raw": "{\n \"trust_weight\": 1.25,\n \"description\": \"front-end webserver (raised trust)\"\n}"
  1102. },
  1103. "url": {
  1104. "raw": "{{baseUrl}}/api/v1/admin/reporters/{{reporterId}}",
  1105. "host": [
  1106. "{{baseUrl}}"
  1107. ],
  1108. "path": [
  1109. "api",
  1110. "v1",
  1111. "admin",
  1112. "reporters",
  1113. "{{reporterId}}"
  1114. ]
  1115. }
  1116. }
  1117. },
  1118. {
  1119. "name": "DELETE /api/v1/admin/reporters/:id",
  1120. "request": {
  1121. "method": "DELETE",
  1122. "header": [
  1123. {
  1124. "key": "X-Acting-User-Id",
  1125. "value": "{{actingUserId}}",
  1126. "disabled": true
  1127. }
  1128. ],
  1129. "url": {
  1130. "raw": "{{baseUrl}}/api/v1/admin/reporters/{{reporterId}}",
  1131. "host": [
  1132. "{{baseUrl}}"
  1133. ],
  1134. "path": [
  1135. "api",
  1136. "v1",
  1137. "admin",
  1138. "reporters",
  1139. "{{reporterId}}"
  1140. ]
  1141. },
  1142. "description": "Hard-deletes if no reports reference it; returns `409` and flags inactive otherwise."
  1143. }
  1144. }
  1145. ]
  1146. },
  1147. {
  1148. "name": "Admin — Consumers",
  1149. "item": [
  1150. {
  1151. "name": "GET /api/v1/admin/consumers",
  1152. "request": {
  1153. "method": "GET",
  1154. "header": [
  1155. {
  1156. "key": "X-Acting-User-Id",
  1157. "value": "{{actingUserId}}",
  1158. "disabled": true
  1159. }
  1160. ],
  1161. "url": {
  1162. "raw": "{{baseUrl}}/api/v1/admin/consumers",
  1163. "host": [
  1164. "{{baseUrl}}"
  1165. ],
  1166. "path": [
  1167. "api",
  1168. "v1",
  1169. "admin",
  1170. "consumers"
  1171. ]
  1172. }
  1173. }
  1174. },
  1175. {
  1176. "name": "POST /api/v1/admin/consumers",
  1177. "request": {
  1178. "method": "POST",
  1179. "header": [
  1180. {
  1181. "key": "Content-Type",
  1182. "value": "application/json"
  1183. },
  1184. {
  1185. "key": "X-Acting-User-Id",
  1186. "value": "{{actingUserId}}",
  1187. "disabled": true
  1188. }
  1189. ],
  1190. "body": {
  1191. "mode": "raw",
  1192. "raw": "{\n \"name\": \"edge-fw-01\",\n \"description\": \"edge firewall\",\n \"policy_id\": {{policyId}},\n \"is_active\": true\n}"
  1193. },
  1194. "url": {
  1195. "raw": "{{baseUrl}}/api/v1/admin/consumers",
  1196. "host": [
  1197. "{{baseUrl}}"
  1198. ],
  1199. "path": [
  1200. "api",
  1201. "v1",
  1202. "admin",
  1203. "consumers"
  1204. ]
  1205. },
  1206. "description": "`policy_id` is required. Set the `policyId` collection var first by listing policies or creating one."
  1207. },
  1208. "event": [
  1209. {
  1210. "listen": "test",
  1211. "script": {
  1212. "type": "text/javascript",
  1213. "exec": [
  1214. "if (pm.response.code === 201) {",
  1215. " const c = pm.response.json();",
  1216. " if (c && c.id) pm.collectionVariables.set('consumerId', String(c.id));",
  1217. "}"
  1218. ]
  1219. }
  1220. }
  1221. ]
  1222. },
  1223. {
  1224. "name": "GET /api/v1/admin/consumers/:id",
  1225. "request": {
  1226. "method": "GET",
  1227. "header": [
  1228. {
  1229. "key": "X-Acting-User-Id",
  1230. "value": "{{actingUserId}}",
  1231. "disabled": true
  1232. }
  1233. ],
  1234. "url": {
  1235. "raw": "{{baseUrl}}/api/v1/admin/consumers/{{consumerId}}",
  1236. "host": [
  1237. "{{baseUrl}}"
  1238. ],
  1239. "path": [
  1240. "api",
  1241. "v1",
  1242. "admin",
  1243. "consumers",
  1244. "{{consumerId}}"
  1245. ]
  1246. }
  1247. }
  1248. },
  1249. {
  1250. "name": "PATCH /api/v1/admin/consumers/:id",
  1251. "request": {
  1252. "method": "PATCH",
  1253. "header": [
  1254. {
  1255. "key": "Content-Type",
  1256. "value": "application/json"
  1257. },
  1258. {
  1259. "key": "X-Acting-User-Id",
  1260. "value": "{{actingUserId}}",
  1261. "disabled": true
  1262. }
  1263. ],
  1264. "body": {
  1265. "mode": "raw",
  1266. "raw": "{\n \"is_active\": false\n}"
  1267. },
  1268. "url": {
  1269. "raw": "{{baseUrl}}/api/v1/admin/consumers/{{consumerId}}",
  1270. "host": [
  1271. "{{baseUrl}}"
  1272. ],
  1273. "path": [
  1274. "api",
  1275. "v1",
  1276. "admin",
  1277. "consumers",
  1278. "{{consumerId}}"
  1279. ]
  1280. }
  1281. }
  1282. },
  1283. {
  1284. "name": "DELETE /api/v1/admin/consumers/:id",
  1285. "request": {
  1286. "method": "DELETE",
  1287. "header": [
  1288. {
  1289. "key": "X-Acting-User-Id",
  1290. "value": "{{actingUserId}}",
  1291. "disabled": true
  1292. }
  1293. ],
  1294. "url": {
  1295. "raw": "{{baseUrl}}/api/v1/admin/consumers/{{consumerId}}",
  1296. "host": [
  1297. "{{baseUrl}}"
  1298. ],
  1299. "path": [
  1300. "api",
  1301. "v1",
  1302. "admin",
  1303. "consumers",
  1304. "{{consumerId}}"
  1305. ]
  1306. }
  1307. }
  1308. }
  1309. ]
  1310. },
  1311. {
  1312. "name": "Admin — Tokens",
  1313. "description": "Service tokens are filtered out of the list and cannot be created here.",
  1314. "item": [
  1315. {
  1316. "name": "GET /api/v1/admin/tokens",
  1317. "request": {
  1318. "method": "GET",
  1319. "header": [
  1320. {
  1321. "key": "X-Acting-User-Id",
  1322. "value": "{{actingUserId}}",
  1323. "disabled": true
  1324. }
  1325. ],
  1326. "url": {
  1327. "raw": "{{baseUrl}}/api/v1/admin/tokens",
  1328. "host": [
  1329. "{{baseUrl}}"
  1330. ],
  1331. "path": [
  1332. "api",
  1333. "v1",
  1334. "admin",
  1335. "tokens"
  1336. ]
  1337. }
  1338. }
  1339. },
  1340. {
  1341. "name": "POST /api/v1/admin/tokens (reporter)",
  1342. "request": {
  1343. "method": "POST",
  1344. "header": [
  1345. {
  1346. "key": "Content-Type",
  1347. "value": "application/json"
  1348. },
  1349. {
  1350. "key": "X-Acting-User-Id",
  1351. "value": "{{actingUserId}}",
  1352. "disabled": true
  1353. }
  1354. ],
  1355. "body": {
  1356. "mode": "raw",
  1357. "raw": "{\n \"kind\": \"reporter\",\n \"reporter_id\": {{reporterId}}\n}"
  1358. },
  1359. "url": {
  1360. "raw": "{{baseUrl}}/api/v1/admin/tokens",
  1361. "host": [
  1362. "{{baseUrl}}"
  1363. ],
  1364. "path": [
  1365. "api",
  1366. "v1",
  1367. "admin",
  1368. "tokens"
  1369. ]
  1370. },
  1371. "description": "Returns the raw token ONCE in `raw_token`. The response is also captured into the `lastRawToken` and `reporterToken` collection vars for chained tests."
  1372. },
  1373. "event": [
  1374. {
  1375. "listen": "test",
  1376. "script": {
  1377. "type": "text/javascript",
  1378. "exec": [
  1379. "if (pm.response.code === 201) {",
  1380. " const t = pm.response.json();",
  1381. " if (t && t.id) pm.collectionVariables.set('tokenId', String(t.id));",
  1382. " if (t && t.raw_token) {",
  1383. " pm.collectionVariables.set('lastRawToken', t.raw_token);",
  1384. " pm.collectionVariables.set('reporterToken', t.raw_token);",
  1385. " }",
  1386. "}"
  1387. ]
  1388. }
  1389. }
  1390. ]
  1391. },
  1392. {
  1393. "name": "POST /api/v1/admin/tokens (consumer)",
  1394. "request": {
  1395. "method": "POST",
  1396. "header": [
  1397. {
  1398. "key": "Content-Type",
  1399. "value": "application/json"
  1400. },
  1401. {
  1402. "key": "X-Acting-User-Id",
  1403. "value": "{{actingUserId}}",
  1404. "disabled": true
  1405. }
  1406. ],
  1407. "body": {
  1408. "mode": "raw",
  1409. "raw": "{\n \"kind\": \"consumer\",\n \"consumer_id\": {{consumerId}}\n}"
  1410. },
  1411. "url": {
  1412. "raw": "{{baseUrl}}/api/v1/admin/tokens",
  1413. "host": [
  1414. "{{baseUrl}}"
  1415. ],
  1416. "path": [
  1417. "api",
  1418. "v1",
  1419. "admin",
  1420. "tokens"
  1421. ]
  1422. }
  1423. },
  1424. "event": [
  1425. {
  1426. "listen": "test",
  1427. "script": {
  1428. "type": "text/javascript",
  1429. "exec": [
  1430. "if (pm.response.code === 201) {",
  1431. " const t = pm.response.json();",
  1432. " if (t && t.id) pm.collectionVariables.set('tokenId', String(t.id));",
  1433. " if (t && t.raw_token) {",
  1434. " pm.collectionVariables.set('lastRawToken', t.raw_token);",
  1435. " pm.collectionVariables.set('consumerToken', t.raw_token);",
  1436. " }",
  1437. "}"
  1438. ]
  1439. }
  1440. }
  1441. ]
  1442. },
  1443. {
  1444. "name": "POST /api/v1/admin/tokens (admin)",
  1445. "request": {
  1446. "method": "POST",
  1447. "header": [
  1448. {
  1449. "key": "Content-Type",
  1450. "value": "application/json"
  1451. },
  1452. {
  1453. "key": "X-Acting-User-Id",
  1454. "value": "{{actingUserId}}",
  1455. "disabled": true
  1456. }
  1457. ],
  1458. "body": {
  1459. "mode": "raw",
  1460. "raw": "{\n \"kind\": \"admin\",\n \"role\": \"admin\",\n \"expires_at\": null\n}"
  1461. },
  1462. "url": {
  1463. "raw": "{{baseUrl}}/api/v1/admin/tokens",
  1464. "host": [
  1465. "{{baseUrl}}"
  1466. ],
  1467. "path": [
  1468. "api",
  1469. "v1",
  1470. "admin",
  1471. "tokens"
  1472. ]
  1473. }
  1474. },
  1475. "event": [
  1476. {
  1477. "listen": "test",
  1478. "script": {
  1479. "type": "text/javascript",
  1480. "exec": [
  1481. "if (pm.response.code === 201) {",
  1482. " const t = pm.response.json();",
  1483. " if (t && t.id) pm.collectionVariables.set('tokenId', String(t.id));",
  1484. " if (t && t.raw_token) pm.collectionVariables.set('lastRawToken', t.raw_token);",
  1485. "}"
  1486. ]
  1487. }
  1488. }
  1489. ]
  1490. },
  1491. {
  1492. "name": "DELETE /api/v1/admin/tokens/:id",
  1493. "request": {
  1494. "method": "DELETE",
  1495. "header": [
  1496. {
  1497. "key": "X-Acting-User-Id",
  1498. "value": "{{actingUserId}}",
  1499. "disabled": true
  1500. }
  1501. ],
  1502. "url": {
  1503. "raw": "{{baseUrl}}/api/v1/admin/tokens/{{tokenId}}",
  1504. "host": [
  1505. "{{baseUrl}}"
  1506. ],
  1507. "path": [
  1508. "api",
  1509. "v1",
  1510. "admin",
  1511. "tokens",
  1512. "{{tokenId}}"
  1513. ]
  1514. }
  1515. }
  1516. }
  1517. ]
  1518. },
  1519. {
  1520. "name": "Admin — Categories",
  1521. "item": [
  1522. {
  1523. "name": "GET /api/v1/admin/categories",
  1524. "request": {
  1525. "method": "GET",
  1526. "header": [
  1527. {
  1528. "key": "X-Acting-User-Id",
  1529. "value": "{{actingUserId}}",
  1530. "disabled": true
  1531. }
  1532. ],
  1533. "url": {
  1534. "raw": "{{baseUrl}}/api/v1/admin/categories",
  1535. "host": [
  1536. "{{baseUrl}}"
  1537. ],
  1538. "path": [
  1539. "api",
  1540. "v1",
  1541. "admin",
  1542. "categories"
  1543. ]
  1544. }
  1545. }
  1546. },
  1547. {
  1548. "name": "POST /api/v1/admin/categories",
  1549. "request": {
  1550. "method": "POST",
  1551. "header": [
  1552. {
  1553. "key": "Content-Type",
  1554. "value": "application/json"
  1555. },
  1556. {
  1557. "key": "X-Acting-User-Id",
  1558. "value": "{{actingUserId}}",
  1559. "disabled": true
  1560. }
  1561. ],
  1562. "body": {
  1563. "mode": "raw",
  1564. "raw": "{\n \"slug\": \"crypto_mining\",\n \"name\": \"Crypto Mining\",\n \"description\": \"Unauthorised crypto-mining traffic\",\n \"decay_function\": \"exponential\",\n \"decay_param\": 14.0,\n \"is_active\": true\n}"
  1565. },
  1566. "url": {
  1567. "raw": "{{baseUrl}}/api/v1/admin/categories",
  1568. "host": [
  1569. "{{baseUrl}}"
  1570. ],
  1571. "path": [
  1572. "api",
  1573. "v1",
  1574. "admin",
  1575. "categories"
  1576. ]
  1577. }
  1578. },
  1579. "event": [
  1580. {
  1581. "listen": "test",
  1582. "script": {
  1583. "type": "text/javascript",
  1584. "exec": [
  1585. "if (pm.response.code === 201) {",
  1586. " const c = pm.response.json();",
  1587. " if (c && c.id) pm.collectionVariables.set('categoryId', String(c.id));",
  1588. "}"
  1589. ]
  1590. }
  1591. }
  1592. ]
  1593. },
  1594. {
  1595. "name": "GET /api/v1/admin/categories/:id",
  1596. "request": {
  1597. "method": "GET",
  1598. "header": [
  1599. {
  1600. "key": "X-Acting-User-Id",
  1601. "value": "{{actingUserId}}",
  1602. "disabled": true
  1603. }
  1604. ],
  1605. "url": {
  1606. "raw": "{{baseUrl}}/api/v1/admin/categories/{{categoryId}}",
  1607. "host": [
  1608. "{{baseUrl}}"
  1609. ],
  1610. "path": [
  1611. "api",
  1612. "v1",
  1613. "admin",
  1614. "categories",
  1615. "{{categoryId}}"
  1616. ]
  1617. }
  1618. }
  1619. },
  1620. {
  1621. "name": "PATCH /api/v1/admin/categories/:id",
  1622. "request": {
  1623. "method": "PATCH",
  1624. "header": [
  1625. {
  1626. "key": "Content-Type",
  1627. "value": "application/json"
  1628. },
  1629. {
  1630. "key": "X-Acting-User-Id",
  1631. "value": "{{actingUserId}}",
  1632. "disabled": true
  1633. }
  1634. ],
  1635. "body": {
  1636. "mode": "raw",
  1637. "raw": "{\n \"decay_param\": 7.0\n}"
  1638. },
  1639. "url": {
  1640. "raw": "{{baseUrl}}/api/v1/admin/categories/{{categoryId}}",
  1641. "host": [
  1642. "{{baseUrl}}"
  1643. ],
  1644. "path": [
  1645. "api",
  1646. "v1",
  1647. "admin",
  1648. "categories",
  1649. "{{categoryId}}"
  1650. ]
  1651. }
  1652. }
  1653. },
  1654. {
  1655. "name": "DELETE /api/v1/admin/categories/:id",
  1656. "request": {
  1657. "method": "DELETE",
  1658. "header": [
  1659. {
  1660. "key": "X-Acting-User-Id",
  1661. "value": "{{actingUserId}}",
  1662. "disabled": true
  1663. }
  1664. ],
  1665. "url": {
  1666. "raw": "{{baseUrl}}/api/v1/admin/categories/{{categoryId}}",
  1667. "host": [
  1668. "{{baseUrl}}"
  1669. ],
  1670. "path": [
  1671. "api",
  1672. "v1",
  1673. "admin",
  1674. "categories",
  1675. "{{categoryId}}"
  1676. ]
  1677. },
  1678. "description": "`409 Conflict` if the category is referenced by reports — soft-delete via PATCH `is_active=false` instead."
  1679. }
  1680. }
  1681. ]
  1682. },
  1683. {
  1684. "name": "Admin — Policies",
  1685. "item": [
  1686. {
  1687. "name": "GET /api/v1/admin/policies",
  1688. "request": {
  1689. "method": "GET",
  1690. "header": [
  1691. {
  1692. "key": "X-Acting-User-Id",
  1693. "value": "{{actingUserId}}",
  1694. "disabled": true
  1695. }
  1696. ],
  1697. "url": {
  1698. "raw": "{{baseUrl}}/api/v1/admin/policies",
  1699. "host": [
  1700. "{{baseUrl}}"
  1701. ],
  1702. "path": [
  1703. "api",
  1704. "v1",
  1705. "admin",
  1706. "policies"
  1707. ]
  1708. }
  1709. },
  1710. "event": [
  1711. {
  1712. "listen": "test",
  1713. "script": {
  1714. "type": "text/javascript",
  1715. "exec": [
  1716. "if (pm.response.code === 200) {",
  1717. " const list = pm.response.json();",
  1718. " const items = Array.isArray(list) ? list : (list.items || []);",
  1719. " const moderate = items.find(p => p.name === 'moderate');",
  1720. " if (moderate && moderate.id) pm.collectionVariables.set('policyId', String(moderate.id));",
  1721. " else if (items[0] && items[0].id) pm.collectionVariables.set('policyId', String(items[0].id));",
  1722. "}"
  1723. ]
  1724. }
  1725. }
  1726. ]
  1727. },
  1728. {
  1729. "name": "POST /api/v1/admin/policies",
  1730. "request": {
  1731. "method": "POST",
  1732. "header": [
  1733. {
  1734. "key": "Content-Type",
  1735. "value": "application/json"
  1736. },
  1737. {
  1738. "key": "X-Acting-User-Id",
  1739. "value": "{{actingUserId}}",
  1740. "disabled": true
  1741. }
  1742. ],
  1743. "body": {
  1744. "mode": "raw",
  1745. "raw": "{\n \"name\": \"edge-default\",\n \"description\": \"sample policy\",\n \"include_manual_blocks\": true,\n \"thresholds\": {\n \"brute_force\": 1.0,\n \"scanner\": 2.0,\n \"web_attack\": 1.5\n }\n}"
  1746. },
  1747. "url": {
  1748. "raw": "{{baseUrl}}/api/v1/admin/policies",
  1749. "host": [
  1750. "{{baseUrl}}"
  1751. ],
  1752. "path": [
  1753. "api",
  1754. "v1",
  1755. "admin",
  1756. "policies"
  1757. ]
  1758. }
  1759. },
  1760. "event": [
  1761. {
  1762. "listen": "test",
  1763. "script": {
  1764. "type": "text/javascript",
  1765. "exec": [
  1766. "if (pm.response.code === 201) {",
  1767. " const p = pm.response.json();",
  1768. " if (p && p.id) pm.collectionVariables.set('policyId', String(p.id));",
  1769. "}"
  1770. ]
  1771. }
  1772. }
  1773. ]
  1774. },
  1775. {
  1776. "name": "GET /api/v1/admin/policies/:id",
  1777. "request": {
  1778. "method": "GET",
  1779. "header": [
  1780. {
  1781. "key": "X-Acting-User-Id",
  1782. "value": "{{actingUserId}}",
  1783. "disabled": true
  1784. }
  1785. ],
  1786. "url": {
  1787. "raw": "{{baseUrl}}/api/v1/admin/policies/{{policyId}}",
  1788. "host": [
  1789. "{{baseUrl}}"
  1790. ],
  1791. "path": [
  1792. "api",
  1793. "v1",
  1794. "admin",
  1795. "policies",
  1796. "{{policyId}}"
  1797. ]
  1798. }
  1799. }
  1800. },
  1801. {
  1802. "name": "GET /api/v1/admin/policies/:id/preview",
  1803. "request": {
  1804. "method": "GET",
  1805. "header": [
  1806. {
  1807. "key": "X-Acting-User-Id",
  1808. "value": "{{actingUserId}}",
  1809. "disabled": true
  1810. }
  1811. ],
  1812. "url": {
  1813. "raw": "{{baseUrl}}/api/v1/admin/policies/{{policyId}}/preview",
  1814. "host": [
  1815. "{{baseUrl}}"
  1816. ],
  1817. "path": [
  1818. "api",
  1819. "v1",
  1820. "admin",
  1821. "policies",
  1822. "{{policyId}}",
  1823. "preview"
  1824. ]
  1825. },
  1826. "description": "Returns the count and a sample of IPs that would land in the blocklist for this policy. Used by the UI policy editor."
  1827. }
  1828. },
  1829. {
  1830. "name": "GET /api/v1/admin/policies/:id/score-distribution",
  1831. "request": {
  1832. "method": "GET",
  1833. "header": [
  1834. {
  1835. "key": "X-Acting-User-Id",
  1836. "value": "{{actingUserId}}",
  1837. "disabled": true
  1838. }
  1839. ],
  1840. "url": {
  1841. "raw": "{{baseUrl}}/api/v1/admin/policies/{{policyId}}/score-distribution",
  1842. "host": [
  1843. "{{baseUrl}}"
  1844. ],
  1845. "path": [
  1846. "api",
  1847. "v1",
  1848. "admin",
  1849. "policies",
  1850. "{{policyId}}",
  1851. "score-distribution"
  1852. ]
  1853. }
  1854. }
  1855. },
  1856. {
  1857. "name": "PATCH /api/v1/admin/policies/:id",
  1858. "request": {
  1859. "method": "PATCH",
  1860. "header": [
  1861. {
  1862. "key": "Content-Type",
  1863. "value": "application/json"
  1864. },
  1865. {
  1866. "key": "X-Acting-User-Id",
  1867. "value": "{{actingUserId}}",
  1868. "disabled": true
  1869. }
  1870. ],
  1871. "body": {
  1872. "mode": "raw",
  1873. "raw": "{\n \"description\": \"sample policy (raised thresholds)\",\n \"thresholds\": {\n \"brute_force\": 1.5,\n \"scanner\": 2.5\n }\n}"
  1874. },
  1875. "url": {
  1876. "raw": "{{baseUrl}}/api/v1/admin/policies/{{policyId}}",
  1877. "host": [
  1878. "{{baseUrl}}"
  1879. ],
  1880. "path": [
  1881. "api",
  1882. "v1",
  1883. "admin",
  1884. "policies",
  1885. "{{policyId}}"
  1886. ]
  1887. },
  1888. "description": "When `thresholds` is present, the API replaces the entire threshold set wholesale."
  1889. }
  1890. },
  1891. {
  1892. "name": "DELETE /api/v1/admin/policies/:id",
  1893. "request": {
  1894. "method": "DELETE",
  1895. "header": [
  1896. {
  1897. "key": "X-Acting-User-Id",
  1898. "value": "{{actingUserId}}",
  1899. "disabled": true
  1900. }
  1901. ],
  1902. "url": {
  1903. "raw": "{{baseUrl}}/api/v1/admin/policies/{{policyId}}",
  1904. "host": [
  1905. "{{baseUrl}}"
  1906. ],
  1907. "path": [
  1908. "api",
  1909. "v1",
  1910. "admin",
  1911. "policies",
  1912. "{{policyId}}"
  1913. ]
  1914. },
  1915. "description": "`409 Conflict` if any consumer still references the policy."
  1916. }
  1917. }
  1918. ]
  1919. },
  1920. {
  1921. "name": "Admin — Audit Log",
  1922. "item": [
  1923. {
  1924. "name": "GET /api/v1/admin/audit-log",
  1925. "request": {
  1926. "method": "GET",
  1927. "header": [
  1928. {
  1929. "key": "X-Acting-User-Id",
  1930. "value": "{{actingUserId}}",
  1931. "disabled": true
  1932. }
  1933. ],
  1934. "url": {
  1935. "raw": "{{baseUrl}}/api/v1/admin/audit-log?actor_kind=&actor_id=&action=&entity_type=&entity_id=&from=&to=&page=1&page_size=50",
  1936. "host": [
  1937. "{{baseUrl}}"
  1938. ],
  1939. "path": [
  1940. "api",
  1941. "v1",
  1942. "admin",
  1943. "audit-log"
  1944. ],
  1945. "query": [
  1946. {
  1947. "key": "actor_kind",
  1948. "value": "",
  1949. "description": "user | admin-token | reporter | consumer | system"
  1950. },
  1951. {
  1952. "key": "actor_id",
  1953. "value": ""
  1954. },
  1955. {
  1956. "key": "action",
  1957. "value": "",
  1958. "description": "e.g. `manual_block.created`"
  1959. },
  1960. {
  1961. "key": "entity_type",
  1962. "value": ""
  1963. },
  1964. {
  1965. "key": "entity_id",
  1966. "value": ""
  1967. },
  1968. {
  1969. "key": "from",
  1970. "value": "",
  1971. "description": "ISO 8601 UTC"
  1972. },
  1973. {
  1974. "key": "to",
  1975. "value": ""
  1976. },
  1977. {
  1978. "key": "page",
  1979. "value": "1"
  1980. },
  1981. {
  1982. "key": "page_size",
  1983. "value": "50"
  1984. }
  1985. ]
  1986. }
  1987. }
  1988. }
  1989. ]
  1990. },
  1991. {
  1992. "name": "Admin — Jobs",
  1993. "item": [
  1994. {
  1995. "name": "GET /api/v1/admin/jobs/status",
  1996. "request": {
  1997. "method": "GET",
  1998. "header": [
  1999. {
  2000. "key": "X-Acting-User-Id",
  2001. "value": "{{actingUserId}}",
  2002. "disabled": true
  2003. }
  2004. ],
  2005. "url": {
  2006. "raw": "{{baseUrl}}/api/v1/admin/jobs/status",
  2007. "host": [
  2008. "{{baseUrl}}"
  2009. ],
  2010. "path": [
  2011. "api",
  2012. "v1",
  2013. "admin",
  2014. "jobs",
  2015. "status"
  2016. ]
  2017. },
  2018. "description": "Per-job last-run + overdue flag. Viewer-readable."
  2019. }
  2020. },
  2021. {
  2022. "name": "POST /api/v1/admin/jobs/trigger/recompute-scores",
  2023. "request": {
  2024. "method": "POST",
  2025. "header": [
  2026. {
  2027. "key": "Content-Type",
  2028. "value": "application/json"
  2029. },
  2030. {
  2031. "key": "X-Acting-User-Id",
  2032. "value": "{{actingUserId}}",
  2033. "disabled": true
  2034. }
  2035. ],
  2036. "body": {
  2037. "mode": "raw",
  2038. "raw": "{\n \"full\": false,\n \"max_rows\": 5000\n}"
  2039. },
  2040. "url": {
  2041. "raw": "{{baseUrl}}/api/v1/admin/jobs/trigger/recompute-scores",
  2042. "host": [
  2043. "{{baseUrl}}"
  2044. ],
  2045. "path": [
  2046. "api",
  2047. "v1",
  2048. "admin",
  2049. "jobs",
  2050. "trigger",
  2051. "recompute-scores"
  2052. ]
  2053. },
  2054. "description": "Whitelisted body keys: `full`, `max_rows`, `reenrich`. Other keys are dropped."
  2055. }
  2056. },
  2057. {
  2058. "name": "POST /api/v1/admin/jobs/trigger/cleanup-audit",
  2059. "request": {
  2060. "method": "POST",
  2061. "header": [
  2062. {
  2063. "key": "Content-Type",
  2064. "value": "application/json"
  2065. },
  2066. {
  2067. "key": "X-Acting-User-Id",
  2068. "value": "{{actingUserId}}",
  2069. "disabled": true
  2070. }
  2071. ],
  2072. "body": {
  2073. "mode": "raw",
  2074. "raw": "{}"
  2075. },
  2076. "url": {
  2077. "raw": "{{baseUrl}}/api/v1/admin/jobs/trigger/cleanup-audit",
  2078. "host": [
  2079. "{{baseUrl}}"
  2080. ],
  2081. "path": [
  2082. "api",
  2083. "v1",
  2084. "admin",
  2085. "jobs",
  2086. "trigger",
  2087. "cleanup-audit"
  2088. ]
  2089. }
  2090. }
  2091. },
  2092. {
  2093. "name": "POST /api/v1/admin/jobs/trigger/cleanup-expired-manual-blocks",
  2094. "request": {
  2095. "method": "POST",
  2096. "header": [
  2097. {
  2098. "key": "Content-Type",
  2099. "value": "application/json"
  2100. },
  2101. {
  2102. "key": "X-Acting-User-Id",
  2103. "value": "{{actingUserId}}",
  2104. "disabled": true
  2105. }
  2106. ],
  2107. "body": {
  2108. "mode": "raw",
  2109. "raw": "{}"
  2110. },
  2111. "url": {
  2112. "raw": "{{baseUrl}}/api/v1/admin/jobs/trigger/cleanup-expired-manual-blocks",
  2113. "host": [
  2114. "{{baseUrl}}"
  2115. ],
  2116. "path": [
  2117. "api",
  2118. "v1",
  2119. "admin",
  2120. "jobs",
  2121. "trigger",
  2122. "cleanup-expired-manual-blocks"
  2123. ]
  2124. }
  2125. }
  2126. },
  2127. {
  2128. "name": "POST /api/v1/admin/jobs/trigger/enrich-pending",
  2129. "request": {
  2130. "method": "POST",
  2131. "header": [
  2132. {
  2133. "key": "Content-Type",
  2134. "value": "application/json"
  2135. },
  2136. {
  2137. "key": "X-Acting-User-Id",
  2138. "value": "{{actingUserId}}",
  2139. "disabled": true
  2140. }
  2141. ],
  2142. "body": {
  2143. "mode": "raw",
  2144. "raw": "{\n \"reenrich\": false\n}"
  2145. },
  2146. "url": {
  2147. "raw": "{{baseUrl}}/api/v1/admin/jobs/trigger/enrich-pending",
  2148. "host": [
  2149. "{{baseUrl}}"
  2150. ],
  2151. "path": [
  2152. "api",
  2153. "v1",
  2154. "admin",
  2155. "jobs",
  2156. "trigger",
  2157. "enrich-pending"
  2158. ]
  2159. }
  2160. }
  2161. },
  2162. {
  2163. "name": "POST /api/v1/admin/jobs/trigger/refresh-geoip",
  2164. "request": {
  2165. "method": "POST",
  2166. "header": [
  2167. {
  2168. "key": "Content-Type",
  2169. "value": "application/json"
  2170. },
  2171. {
  2172. "key": "X-Acting-User-Id",
  2173. "value": "{{actingUserId}}",
  2174. "disabled": true
  2175. }
  2176. ],
  2177. "body": {
  2178. "mode": "raw",
  2179. "raw": "{}"
  2180. },
  2181. "url": {
  2182. "raw": "{{baseUrl}}/api/v1/admin/jobs/trigger/refresh-geoip",
  2183. "host": [
  2184. "{{baseUrl}}"
  2185. ],
  2186. "path": [
  2187. "api",
  2188. "v1",
  2189. "admin",
  2190. "jobs",
  2191. "trigger",
  2192. "refresh-geoip"
  2193. ]
  2194. },
  2195. "description": "Returns `412 Precondition Failed` when the GeoIP provider isn't configured."
  2196. }
  2197. },
  2198. {
  2199. "name": "POST /api/v1/admin/jobs/trigger/tick",
  2200. "request": {
  2201. "method": "POST",
  2202. "header": [
  2203. {
  2204. "key": "Content-Type",
  2205. "value": "application/json"
  2206. },
  2207. {
  2208. "key": "X-Acting-User-Id",
  2209. "value": "{{actingUserId}}",
  2210. "disabled": true
  2211. }
  2212. ],
  2213. "body": {
  2214. "mode": "raw",
  2215. "raw": "{}"
  2216. },
  2217. "url": {
  2218. "raw": "{{baseUrl}}/api/v1/admin/jobs/trigger/tick",
  2219. "host": [
  2220. "{{baseUrl}}"
  2221. ],
  2222. "path": [
  2223. "api",
  2224. "v1",
  2225. "admin",
  2226. "jobs",
  2227. "trigger",
  2228. "tick"
  2229. ]
  2230. },
  2231. "description": "Convenience: invokes any due job."
  2232. }
  2233. }
  2234. ]
  2235. },
  2236. {
  2237. "name": "Admin — Config & Maintenance",
  2238. "item": [
  2239. {
  2240. "name": "GET /api/v1/admin/config",
  2241. "request": {
  2242. "method": "GET",
  2243. "header": [
  2244. {
  2245. "key": "X-Acting-User-Id",
  2246. "value": "{{actingUserId}}",
  2247. "disabled": true
  2248. }
  2249. ],
  2250. "url": {
  2251. "raw": "{{baseUrl}}/api/v1/admin/config",
  2252. "host": [
  2253. "{{baseUrl}}"
  2254. ],
  2255. "path": [
  2256. "api",
  2257. "v1",
  2258. "admin",
  2259. "config"
  2260. ]
  2261. },
  2262. "description": "Effective config grouped by section. Secrets are masked."
  2263. }
  2264. },
  2265. {
  2266. "name": "POST /api/v1/admin/maintenance/purge",
  2267. "request": {
  2268. "method": "POST",
  2269. "header": [
  2270. {
  2271. "key": "Content-Type",
  2272. "value": "application/json"
  2273. },
  2274. {
  2275. "key": "X-Acting-User-Id",
  2276. "value": "{{actingUserId}}",
  2277. "disabled": true
  2278. }
  2279. ],
  2280. "body": {
  2281. "mode": "raw",
  2282. "raw": "{\n \"confirm\": \"PURGE\"\n}"
  2283. },
  2284. "url": {
  2285. "raw": "{{baseUrl}}/api/v1/admin/maintenance/purge",
  2286. "host": [
  2287. "{{baseUrl}}"
  2288. ],
  2289. "path": [
  2290. "api",
  2291. "v1",
  2292. "admin",
  2293. "maintenance",
  2294. "purge"
  2295. ]
  2296. },
  2297. "description": "DESTRUCTIVE. Deletes operational data (reports, scores, manual blocks, allowlist, audit log, jobs history, reporters, consumers, policies, non-service tokens). Requires literal `confirm: \"PURGE\"`."
  2298. }
  2299. },
  2300. {
  2301. "name": "POST /api/v1/admin/maintenance/seed-demo",
  2302. "request": {
  2303. "method": "POST",
  2304. "header": [
  2305. {
  2306. "key": "Content-Type",
  2307. "value": "application/json"
  2308. },
  2309. {
  2310. "key": "X-Acting-User-Id",
  2311. "value": "{{actingUserId}}",
  2312. "disabled": true
  2313. }
  2314. ],
  2315. "body": {
  2316. "mode": "raw",
  2317. "raw": "{}"
  2318. },
  2319. "url": {
  2320. "raw": "{{baseUrl}}/api/v1/admin/maintenance/seed-demo",
  2321. "host": [
  2322. "{{baseUrl}}"
  2323. ],
  2324. "path": [
  2325. "api",
  2326. "v1",
  2327. "admin",
  2328. "maintenance",
  2329. "seed-demo"
  2330. ]
  2331. },
  2332. "description": "Loads a demo dataset and triggers a full recompute. Returns `409` if demo data is already present, `412` if no categories are configured."
  2333. }
  2334. }
  2335. ]
  2336. },
  2337. {
  2338. "name": "Internal Jobs",
  2339. "description": "Loopback / RFC1918-only. Run Postman from the host running the api container, and target the host port (`http://localhost:8081`). External callers receive `404`.",
  2340. "auth": {
  2341. "type": "bearer",
  2342. "bearer": [
  2343. {
  2344. "key": "token",
  2345. "value": "{{internalJobToken}}",
  2346. "type": "string"
  2347. }
  2348. ]
  2349. },
  2350. "item": [
  2351. {
  2352. "name": "POST /internal/jobs/tick",
  2353. "request": {
  2354. "method": "POST",
  2355. "header": [
  2356. {
  2357. "key": "Content-Type",
  2358. "value": "application/json"
  2359. }
  2360. ],
  2361. "body": {
  2362. "mode": "raw",
  2363. "raw": "{}"
  2364. },
  2365. "url": {
  2366. "raw": "{{baseUrl}}/internal/jobs/tick",
  2367. "host": [
  2368. "{{baseUrl}}"
  2369. ],
  2370. "path": [
  2371. "internal",
  2372. "jobs",
  2373. "tick"
  2374. ]
  2375. }
  2376. }
  2377. },
  2378. {
  2379. "name": "POST /internal/jobs/recompute-scores",
  2380. "request": {
  2381. "method": "POST",
  2382. "header": [
  2383. {
  2384. "key": "Content-Type",
  2385. "value": "application/json"
  2386. }
  2387. ],
  2388. "body": {
  2389. "mode": "raw",
  2390. "raw": "{\n \"full\": false,\n \"max_rows\": 5000\n}"
  2391. },
  2392. "url": {
  2393. "raw": "{{baseUrl}}/internal/jobs/recompute-scores",
  2394. "host": [
  2395. "{{baseUrl}}"
  2396. ],
  2397. "path": [
  2398. "internal",
  2399. "jobs",
  2400. "recompute-scores"
  2401. ]
  2402. }
  2403. }
  2404. },
  2405. {
  2406. "name": "POST /internal/jobs/cleanup-audit",
  2407. "request": {
  2408. "method": "POST",
  2409. "header": [
  2410. {
  2411. "key": "Content-Type",
  2412. "value": "application/json"
  2413. }
  2414. ],
  2415. "body": {
  2416. "mode": "raw",
  2417. "raw": "{}"
  2418. },
  2419. "url": {
  2420. "raw": "{{baseUrl}}/internal/jobs/cleanup-audit",
  2421. "host": [
  2422. "{{baseUrl}}"
  2423. ],
  2424. "path": [
  2425. "internal",
  2426. "jobs",
  2427. "cleanup-audit"
  2428. ]
  2429. }
  2430. }
  2431. },
  2432. {
  2433. "name": "POST /internal/jobs/cleanup-expired-manual-blocks",
  2434. "request": {
  2435. "method": "POST",
  2436. "header": [
  2437. {
  2438. "key": "Content-Type",
  2439. "value": "application/json"
  2440. }
  2441. ],
  2442. "body": {
  2443. "mode": "raw",
  2444. "raw": "{}"
  2445. },
  2446. "url": {
  2447. "raw": "{{baseUrl}}/internal/jobs/cleanup-expired-manual-blocks",
  2448. "host": [
  2449. "{{baseUrl}}"
  2450. ],
  2451. "path": [
  2452. "internal",
  2453. "jobs",
  2454. "cleanup-expired-manual-blocks"
  2455. ]
  2456. }
  2457. }
  2458. },
  2459. {
  2460. "name": "POST /internal/jobs/enrich-pending",
  2461. "request": {
  2462. "method": "POST",
  2463. "header": [
  2464. {
  2465. "key": "Content-Type",
  2466. "value": "application/json"
  2467. }
  2468. ],
  2469. "body": {
  2470. "mode": "raw",
  2471. "raw": "{\n \"reenrich\": false\n}"
  2472. },
  2473. "url": {
  2474. "raw": "{{baseUrl}}/internal/jobs/enrich-pending",
  2475. "host": [
  2476. "{{baseUrl}}"
  2477. ],
  2478. "path": [
  2479. "internal",
  2480. "jobs",
  2481. "enrich-pending"
  2482. ]
  2483. }
  2484. }
  2485. },
  2486. {
  2487. "name": "POST /internal/jobs/refresh-geoip",
  2488. "request": {
  2489. "method": "POST",
  2490. "header": [
  2491. {
  2492. "key": "Content-Type",
  2493. "value": "application/json"
  2494. }
  2495. ],
  2496. "body": {
  2497. "mode": "raw",
  2498. "raw": "{}"
  2499. },
  2500. "url": {
  2501. "raw": "{{baseUrl}}/internal/jobs/refresh-geoip",
  2502. "host": [
  2503. "{{baseUrl}}"
  2504. ],
  2505. "path": [
  2506. "internal",
  2507. "jobs",
  2508. "refresh-geoip"
  2509. ]
  2510. }
  2511. }
  2512. },
  2513. {
  2514. "name": "GET /internal/jobs/status",
  2515. "request": {
  2516. "method": "GET",
  2517. "header": [],
  2518. "url": {
  2519. "raw": "{{baseUrl}}/internal/jobs/status",
  2520. "host": [
  2521. "{{baseUrl}}"
  2522. ],
  2523. "path": [
  2524. "internal",
  2525. "jobs",
  2526. "status"
  2527. ]
  2528. }
  2529. }
  2530. }
  2531. ]
  2532. }
  2533. ]
  2534. }