tg-live-game.postman_collection.json 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714
  1. {
  2. "info": {
  3. "_postman_id": "a670efda-9591-4304-af67-a8eb87c8b938",
  4. "name": "tg-live-game",
  5. "description": "TG Live Game Backend API Collection",
  6. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
  7. "_exporter_id": "42537936"
  8. },
  9. "item": [
  10. {
  11. "name": "tg-live-game-hono",
  12. "item": [
  13. {
  14. "name": "auth",
  15. "item": [
  16. {
  17. "name": "register",
  18. "event": [
  19. {
  20. "listen": "test",
  21. "script": {
  22. "exec": [
  23. "pm.environment.set(\"accessToken\", pm.response.json().data.accessToken);",
  24. "pm.environment.set(\"refreshToken\", pm.response.json().data.refreshToken);"
  25. ],
  26. "type": "text/javascript",
  27. "packages": {},
  28. "requests": {}
  29. }
  30. }
  31. ],
  32. "request": {
  33. "method": "POST",
  34. "header": [
  35. {
  36. "key": "Content-Type",
  37. "value": "application/json"
  38. }
  39. ],
  40. "body": {
  41. "mode": "raw",
  42. "raw": "{\n \"username\": \"pwtk004\",\n \"password\": \"test123456\",\n \"email\": \"pwtk004@pwtk.cc\"\n}"
  43. },
  44. "url": {
  45. "raw": "{{baseUrl}}/api/auth/register",
  46. "host": [
  47. "{{baseUrl}}"
  48. ],
  49. "path": [
  50. "api",
  51. "auth",
  52. "register"
  53. ]
  54. }
  55. },
  56. "response": []
  57. },
  58. {
  59. "name": "login",
  60. "event": [
  61. {
  62. "listen": "test",
  63. "script": {
  64. "exec": [
  65. "var jsonData = pm.response.json();",
  66. "if (jsonData.code === 200 && jsonData.data) {",
  67. " pm.collectionVariables.set('accessToken', jsonData.data.accessToken);",
  68. " pm.collectionVariables.set('refreshToken', jsonData.data.refreshToken);",
  69. "}"
  70. ],
  71. "type": "text/javascript",
  72. "packages": {},
  73. "requests": {}
  74. }
  75. }
  76. ],
  77. "request": {
  78. "method": "POST",
  79. "header": [
  80. {
  81. "key": "Content-Type",
  82. "value": "application/json"
  83. }
  84. ],
  85. "body": {
  86. "mode": "raw",
  87. "raw": "{\n \"username\": \"pwtk004\",\n \"password\": \"test123456\"\n}"
  88. },
  89. "url": {
  90. "raw": "{{baseUrl}}/api/auth/login",
  91. "host": [
  92. "{{baseUrl}}"
  93. ],
  94. "path": [
  95. "api",
  96. "auth",
  97. "login"
  98. ]
  99. }
  100. },
  101. "response": []
  102. },
  103. {
  104. "name": "refresh",
  105. "event": [
  106. {
  107. "listen": "test",
  108. "script": {
  109. "exec": [
  110. "var jsonData = pm.response.json();",
  111. "if (jsonData.code === 200 && jsonData.data) {",
  112. " pm.collectionVariables.set('accessToken', jsonData.data.accessToken);",
  113. " pm.collectionVariables.set('refreshToken', jsonData.data.refreshToken);",
  114. "}"
  115. ],
  116. "type": "text/javascript"
  117. }
  118. }
  119. ],
  120. "request": {
  121. "method": "POST",
  122. "header": [
  123. {
  124. "key": "Content-Type",
  125. "value": "application/json"
  126. }
  127. ],
  128. "body": {
  129. "mode": "raw",
  130. "raw": "{\n \"refreshToken\": \"{{refreshToken}}\"\n}"
  131. },
  132. "url": {
  133. "raw": "{{baseUrl}}/api/auth/refresh",
  134. "host": [
  135. "{{baseUrl}}"
  136. ],
  137. "path": [
  138. "api",
  139. "auth",
  140. "refresh"
  141. ]
  142. }
  143. },
  144. "response": []
  145. },
  146. {
  147. "name": "me",
  148. "request": {
  149. "method": "GET",
  150. "header": [],
  151. "url": {
  152. "raw": "{{baseUrl}}/api/auth/me",
  153. "host": [
  154. "{{baseUrl}}"
  155. ],
  156. "path": [
  157. "api",
  158. "auth",
  159. "me"
  160. ]
  161. }
  162. },
  163. "response": []
  164. },
  165. {
  166. "name": "change-password",
  167. "request": {
  168. "method": "POST",
  169. "header": [
  170. {
  171. "key": "Content-Type",
  172. "value": "application/json"
  173. }
  174. ],
  175. "body": {
  176. "mode": "raw",
  177. "raw": "{\n \"oldPassword\": \"admin123\",\n \"newPassword\": \"newpassword123\"\n}"
  178. },
  179. "url": {
  180. "raw": "{{baseUrl}}/api/auth/change-password",
  181. "host": [
  182. "{{baseUrl}}"
  183. ],
  184. "path": [
  185. "api",
  186. "auth",
  187. "change-password"
  188. ]
  189. }
  190. },
  191. "response": []
  192. },
  193. {
  194. "name": "logout",
  195. "request": {
  196. "method": "POST",
  197. "header": [],
  198. "url": {
  199. "raw": "{{baseUrl}}/api/auth/logout",
  200. "host": [
  201. "{{baseUrl}}"
  202. ],
  203. "path": [
  204. "api",
  205. "auth",
  206. "logout"
  207. ]
  208. }
  209. },
  210. "response": []
  211. }
  212. ]
  213. },
  214. {
  215. "name": "users",
  216. "item": [
  217. {
  218. "name": "permissions",
  219. "item": [
  220. {
  221. "name": "list",
  222. "request": {
  223. "method": "GET",
  224. "header": [],
  225. "url": {
  226. "raw": "{{baseUrl}}/api/users/:id/permissions",
  227. "host": [
  228. "{{baseUrl}}"
  229. ],
  230. "path": [
  231. "api",
  232. "users",
  233. ":id",
  234. "permissions"
  235. ],
  236. "variable": [
  237. {
  238. "key": "id",
  239. "value": "user_id_here"
  240. }
  241. ]
  242. }
  243. },
  244. "response": []
  245. },
  246. {
  247. "name": "add",
  248. "request": {
  249. "method": "POST",
  250. "header": [
  251. {
  252. "key": "Content-Type",
  253. "value": "application/json"
  254. }
  255. ],
  256. "body": {
  257. "mode": "raw",
  258. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"permission\": \"view\"\n}"
  259. },
  260. "url": {
  261. "raw": "{{baseUrl}}/api/users/:id/permissions",
  262. "host": [
  263. "{{baseUrl}}"
  264. ],
  265. "path": [
  266. "api",
  267. "users",
  268. ":id",
  269. "permissions"
  270. ],
  271. "variable": [
  272. {
  273. "key": "id",
  274. "value": "user_id_here"
  275. }
  276. ]
  277. }
  278. },
  279. "response": []
  280. },
  281. {
  282. "name": "delete",
  283. "request": {
  284. "method": "DELETE",
  285. "header": [],
  286. "url": {
  287. "raw": "{{baseUrl}}/api/users/:id/permissions/:permissionId",
  288. "host": [
  289. "{{baseUrl}}"
  290. ],
  291. "path": [
  292. "api",
  293. "users",
  294. ":id",
  295. "permissions",
  296. ":permissionId"
  297. ],
  298. "variable": [
  299. {
  300. "key": "id",
  301. "value": "user_id_here"
  302. },
  303. {
  304. "key": "permissionId",
  305. "value": "permission_id_here"
  306. }
  307. ]
  308. }
  309. },
  310. "response": []
  311. }
  312. ]
  313. },
  314. {
  315. "name": "list",
  316. "request": {
  317. "method": "GET",
  318. "header": [],
  319. "url": {
  320. "raw": "{{baseUrl}}/api/users?page=1&pageSize=20",
  321. "host": [
  322. "{{baseUrl}}"
  323. ],
  324. "path": [
  325. "api",
  326. "users"
  327. ],
  328. "query": [
  329. {
  330. "key": "page",
  331. "value": "1"
  332. },
  333. {
  334. "key": "pageSize",
  335. "value": "20"
  336. },
  337. {
  338. "key": "role",
  339. "value": "",
  340. "disabled": true
  341. },
  342. {
  343. "key": "status",
  344. "value": "",
  345. "disabled": true
  346. },
  347. {
  348. "key": "search",
  349. "value": "",
  350. "disabled": true
  351. }
  352. ]
  353. }
  354. },
  355. "response": []
  356. },
  357. {
  358. "name": "get",
  359. "request": {
  360. "method": "GET",
  361. "header": [],
  362. "url": {
  363. "raw": "{{baseUrl}}/api/users/:id",
  364. "host": [
  365. "{{baseUrl}}"
  366. ],
  367. "path": [
  368. "api",
  369. "users",
  370. ":id"
  371. ],
  372. "variable": [
  373. {
  374. "key": "id",
  375. "value": "user_id_here"
  376. }
  377. ]
  378. }
  379. },
  380. "response": []
  381. },
  382. {
  383. "name": "create",
  384. "request": {
  385. "method": "POST",
  386. "header": [
  387. {
  388. "key": "Content-Type",
  389. "value": "application/json"
  390. }
  391. ],
  392. "body": {
  393. "mode": "raw",
  394. "raw": "{\n \"username\": \"newuser\",\n \"password\": \"password123\",\n \"email\": \"newuser@example.com\",\n \"role\": \"viewer\"\n}"
  395. },
  396. "url": {
  397. "raw": "{{baseUrl}}/api/users",
  398. "host": [
  399. "{{baseUrl}}"
  400. ],
  401. "path": [
  402. "api",
  403. "users"
  404. ]
  405. }
  406. },
  407. "response": []
  408. },
  409. {
  410. "name": "update",
  411. "request": {
  412. "method": "PUT",
  413. "header": [
  414. {
  415. "key": "Content-Type",
  416. "value": "application/json"
  417. }
  418. ],
  419. "body": {
  420. "mode": "raw",
  421. "raw": "{\n \"email\": \"updated@example.com\",\n \"role\": \"operator\",\n \"status\": \"active\"\n}"
  422. },
  423. "url": {
  424. "raw": "{{baseUrl}}/api/users/:id",
  425. "host": [
  426. "{{baseUrl}}"
  427. ],
  428. "path": [
  429. "api",
  430. "users",
  431. ":id"
  432. ],
  433. "variable": [
  434. {
  435. "key": "id",
  436. "value": "user_id_here"
  437. }
  438. ]
  439. }
  440. },
  441. "response": []
  442. },
  443. {
  444. "name": "delete",
  445. "request": {
  446. "method": "DELETE",
  447. "header": [],
  448. "url": {
  449. "raw": "{{baseUrl}}/api/users/:id",
  450. "host": [
  451. "{{baseUrl}}"
  452. ],
  453. "path": [
  454. "api",
  455. "users",
  456. ":id"
  457. ],
  458. "variable": [
  459. {
  460. "key": "id",
  461. "value": "user_id_here"
  462. }
  463. ]
  464. }
  465. },
  466. "response": []
  467. }
  468. ]
  469. },
  470. {
  471. "name": "cameras",
  472. "item": [
  473. {
  474. "name": "list",
  475. "request": {
  476. "method": "GET",
  477. "header": [],
  478. "url": {
  479. "raw": "{{baseUrl}}/api/cameras?page=1&pageSize=20",
  480. "host": [
  481. "{{baseUrl}}"
  482. ],
  483. "path": [
  484. "api",
  485. "cameras"
  486. ],
  487. "query": [
  488. {
  489. "key": "page",
  490. "value": "1"
  491. },
  492. {
  493. "key": "pageSize",
  494. "value": "20"
  495. },
  496. {
  497. "key": "status",
  498. "value": "",
  499. "disabled": true
  500. },
  501. {
  502. "key": "type",
  503. "value": "",
  504. "disabled": true
  505. },
  506. {
  507. "key": "search",
  508. "value": "",
  509. "disabled": true
  510. }
  511. ]
  512. }
  513. },
  514. "response": []
  515. },
  516. {
  517. "name": "get",
  518. "request": {
  519. "method": "GET",
  520. "header": [],
  521. "url": {
  522. "raw": "{{baseUrl}}/api/cameras/:id",
  523. "host": [
  524. "{{baseUrl}}"
  525. ],
  526. "path": [
  527. "api",
  528. "cameras",
  529. ":id"
  530. ],
  531. "variable": [
  532. {
  533. "key": "id",
  534. "value": "camera_id_here"
  535. }
  536. ]
  537. }
  538. },
  539. "response": []
  540. },
  541. {
  542. "name": "create",
  543. "request": {
  544. "method": "POST",
  545. "header": [
  546. {
  547. "key": "Content-Type",
  548. "value": "application/json"
  549. }
  550. ],
  551. "body": {
  552. "mode": "raw",
  553. "raw": "{\n \"name\": \"Camera 1\",\n \"type\": \"rtsp\",\n \"protocol\": \"rtmps\",\n \"rtsp_url\": \"rtsp://example.com/stream\",\n \"location\": \"Room 101\"\n}"
  554. },
  555. "url": {
  556. "raw": "{{baseUrl}}/api/cameras",
  557. "host": [
  558. "{{baseUrl}}"
  559. ],
  560. "path": [
  561. "api",
  562. "cameras"
  563. ]
  564. }
  565. },
  566. "response": []
  567. },
  568. {
  569. "name": "update",
  570. "request": {
  571. "method": "PUT",
  572. "header": [
  573. {
  574. "key": "Content-Type",
  575. "value": "application/json"
  576. }
  577. ],
  578. "body": {
  579. "mode": "raw",
  580. "raw": "{\n \"name\": \"Camera 1 Updated\",\n \"location\": \"Room 102\",\n \"status\": \"online\"\n}"
  581. },
  582. "url": {
  583. "raw": "{{baseUrl}}/api/cameras/:id",
  584. "host": [
  585. "{{baseUrl}}"
  586. ],
  587. "path": [
  588. "api",
  589. "cameras",
  590. ":id"
  591. ],
  592. "variable": [
  593. {
  594. "key": "id",
  595. "value": "camera_id_here"
  596. }
  597. ]
  598. }
  599. },
  600. "response": []
  601. },
  602. {
  603. "name": "delete",
  604. "request": {
  605. "method": "DELETE",
  606. "header": [],
  607. "url": {
  608. "raw": "{{baseUrl}}/api/cameras/:id",
  609. "host": [
  610. "{{baseUrl}}"
  611. ],
  612. "path": [
  613. "api",
  614. "cameras",
  615. ":id"
  616. ],
  617. "variable": [
  618. {
  619. "key": "id",
  620. "value": "camera_id_here"
  621. }
  622. ]
  623. }
  624. },
  625. "response": []
  626. },
  627. {
  628. "name": "sessions",
  629. "request": {
  630. "method": "GET",
  631. "header": [],
  632. "url": {
  633. "raw": "{{baseUrl}}/api/cameras/:id/sessions?page=1&pageSize=20",
  634. "host": [
  635. "{{baseUrl}}"
  636. ],
  637. "path": [
  638. "api",
  639. "cameras",
  640. ":id",
  641. "sessions"
  642. ],
  643. "query": [
  644. {
  645. "key": "page",
  646. "value": "1"
  647. },
  648. {
  649. "key": "pageSize",
  650. "value": "20"
  651. },
  652. {
  653. "key": "status",
  654. "value": "",
  655. "disabled": true
  656. }
  657. ],
  658. "variable": [
  659. {
  660. "key": "id",
  661. "value": "camera_id_here"
  662. }
  663. ]
  664. }
  665. },
  666. "response": []
  667. }
  668. ]
  669. },
  670. {
  671. "name": "sessions",
  672. "item": [
  673. {
  674. "name": "list",
  675. "request": {
  676. "method": "GET",
  677. "header": [],
  678. "url": {
  679. "raw": "{{baseUrl}}/api/sessions?page=1&pageSize=20",
  680. "host": [
  681. "{{baseUrl}}"
  682. ],
  683. "path": [
  684. "api",
  685. "sessions"
  686. ],
  687. "query": [
  688. {
  689. "key": "page",
  690. "value": "1"
  691. },
  692. {
  693. "key": "pageSize",
  694. "value": "20"
  695. },
  696. {
  697. "key": "status",
  698. "value": "",
  699. "disabled": true
  700. },
  701. {
  702. "key": "camera_id",
  703. "value": "",
  704. "disabled": true
  705. }
  706. ]
  707. }
  708. },
  709. "response": []
  710. },
  711. {
  712. "name": "live",
  713. "request": {
  714. "method": "GET",
  715. "header": [],
  716. "url": {
  717. "raw": "{{baseUrl}}/api/sessions/live",
  718. "host": [
  719. "{{baseUrl}}"
  720. ],
  721. "path": [
  722. "api",
  723. "sessions",
  724. "live"
  725. ]
  726. }
  727. },
  728. "response": []
  729. },
  730. {
  731. "name": "get",
  732. "request": {
  733. "method": "GET",
  734. "header": [],
  735. "url": {
  736. "raw": "{{baseUrl}}/api/sessions/:id",
  737. "host": [
  738. "{{baseUrl}}"
  739. ],
  740. "path": [
  741. "api",
  742. "sessions",
  743. ":id"
  744. ],
  745. "variable": [
  746. {
  747. "key": "id",
  748. "value": "session_id_here"
  749. }
  750. ]
  751. }
  752. },
  753. "response": []
  754. },
  755. {
  756. "name": "start",
  757. "request": {
  758. "method": "POST",
  759. "header": [
  760. {
  761. "key": "Content-Type",
  762. "value": "application/json"
  763. }
  764. ],
  765. "body": {
  766. "mode": "raw",
  767. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"live_input_id\": \"live_input_id_here\"\n}"
  768. },
  769. "url": {
  770. "raw": "{{baseUrl}}/api/sessions",
  771. "host": [
  772. "{{baseUrl}}"
  773. ],
  774. "path": [
  775. "api",
  776. "sessions"
  777. ]
  778. }
  779. },
  780. "response": []
  781. },
  782. {
  783. "name": "end",
  784. "request": {
  785. "method": "PUT",
  786. "header": [
  787. {
  788. "key": "Content-Type",
  789. "value": "application/json"
  790. }
  791. ],
  792. "body": {
  793. "mode": "raw",
  794. "raw": "{\n \"recording_id\": \"recording_id_here\"\n}"
  795. },
  796. "url": {
  797. "raw": "{{baseUrl}}/api/sessions/:id/end",
  798. "host": [
  799. "{{baseUrl}}"
  800. ],
  801. "path": [
  802. "api",
  803. "sessions",
  804. ":id",
  805. "end"
  806. ],
  807. "variable": [
  808. {
  809. "key": "id",
  810. "value": "session_id_here"
  811. }
  812. ]
  813. }
  814. },
  815. "response": []
  816. },
  817. {
  818. "name": "update-viewers",
  819. "request": {
  820. "method": "PUT",
  821. "header": [
  822. {
  823. "key": "Content-Type",
  824. "value": "application/json"
  825. }
  826. ],
  827. "body": {
  828. "mode": "raw",
  829. "raw": "{\n \"viewer_count\": 100\n}"
  830. },
  831. "url": {
  832. "raw": "{{baseUrl}}/api/sessions/:id/viewers",
  833. "host": [
  834. "{{baseUrl}}"
  835. ],
  836. "path": [
  837. "api",
  838. "sessions",
  839. ":id",
  840. "viewers"
  841. ],
  842. "variable": [
  843. {
  844. "key": "id",
  845. "value": "session_id_here"
  846. }
  847. ]
  848. }
  849. },
  850. "response": []
  851. },
  852. {
  853. "name": "stats",
  854. "request": {
  855. "method": "GET",
  856. "header": [],
  857. "url": {
  858. "raw": "{{baseUrl}}/api/sessions/:id/stats",
  859. "host": [
  860. "{{baseUrl}}"
  861. ],
  862. "path": [
  863. "api",
  864. "sessions",
  865. ":id",
  866. "stats"
  867. ],
  868. "variable": [
  869. {
  870. "key": "id",
  871. "value": "session_id_here"
  872. }
  873. ]
  874. }
  875. },
  876. "response": []
  877. },
  878. {
  879. "name": "delete",
  880. "request": {
  881. "method": "DELETE",
  882. "header": [],
  883. "url": {
  884. "raw": "{{baseUrl}}/api/sessions/:id",
  885. "host": [
  886. "{{baseUrl}}"
  887. ],
  888. "path": [
  889. "api",
  890. "sessions",
  891. ":id"
  892. ],
  893. "variable": [
  894. {
  895. "key": "id",
  896. "value": "session_id_here"
  897. }
  898. ]
  899. }
  900. },
  901. "response": []
  902. }
  903. ]
  904. },
  905. {
  906. "name": "stats",
  907. "item": [
  908. {
  909. "name": "view",
  910. "item": [
  911. {
  912. "name": "start",
  913. "request": {
  914. "auth": {
  915. "type": "noauth"
  916. },
  917. "method": "POST",
  918. "header": [
  919. {
  920. "key": "Content-Type",
  921. "value": "application/json"
  922. }
  923. ],
  924. "body": {
  925. "mode": "raw",
  926. "raw": "{\n \"video_id\": \"video_id_here\"\n}"
  927. },
  928. "url": {
  929. "raw": "{{baseUrl}}/api/stats/view/start",
  930. "host": [
  931. "{{baseUrl}}"
  932. ],
  933. "path": [
  934. "api",
  935. "stats",
  936. "view",
  937. "start"
  938. ]
  939. }
  940. },
  941. "response": []
  942. },
  943. {
  944. "name": "end",
  945. "request": {
  946. "auth": {
  947. "type": "noauth"
  948. },
  949. "method": "POST",
  950. "header": [
  951. {
  952. "key": "Content-Type",
  953. "value": "application/json"
  954. }
  955. ],
  956. "body": {
  957. "mode": "raw",
  958. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 300\n}"
  959. },
  960. "url": {
  961. "raw": "{{baseUrl}}/api/stats/view/end",
  962. "host": [
  963. "{{baseUrl}}"
  964. ],
  965. "path": [
  966. "api",
  967. "stats",
  968. "view",
  969. "end"
  970. ]
  971. }
  972. },
  973. "response": []
  974. },
  975. {
  976. "name": "heartbeat",
  977. "request": {
  978. "auth": {
  979. "type": "noauth"
  980. },
  981. "method": "POST",
  982. "header": [
  983. {
  984. "key": "Content-Type",
  985. "value": "application/json"
  986. }
  987. ],
  988. "body": {
  989. "mode": "raw",
  990. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 60\n}"
  991. },
  992. "url": {
  993. "raw": "{{baseUrl}}/api/stats/view/heartbeat",
  994. "host": [
  995. "{{baseUrl}}"
  996. ],
  997. "path": [
  998. "api",
  999. "stats",
  1000. "view",
  1001. "heartbeat"
  1002. ]
  1003. }
  1004. },
  1005. "response": []
  1006. }
  1007. ]
  1008. },
  1009. {
  1010. "name": "video",
  1011. "request": {
  1012. "method": "GET",
  1013. "header": [],
  1014. "url": {
  1015. "raw": "{{baseUrl}}/api/stats/video/:videoId",
  1016. "host": [
  1017. "{{baseUrl}}"
  1018. ],
  1019. "path": [
  1020. "api",
  1021. "stats",
  1022. "video",
  1023. ":videoId"
  1024. ],
  1025. "variable": [
  1026. {
  1027. "key": "videoId",
  1028. "value": "video_id_here"
  1029. }
  1030. ]
  1031. }
  1032. },
  1033. "response": []
  1034. },
  1035. {
  1036. "name": "session",
  1037. "request": {
  1038. "method": "GET",
  1039. "header": [],
  1040. "url": {
  1041. "raw": "{{baseUrl}}/api/stats/session/:sessionId",
  1042. "host": [
  1043. "{{baseUrl}}"
  1044. ],
  1045. "path": [
  1046. "api",
  1047. "stats",
  1048. "session",
  1049. ":sessionId"
  1050. ],
  1051. "variable": [
  1052. {
  1053. "key": "sessionId",
  1054. "value": "session_id_here"
  1055. }
  1056. ]
  1057. }
  1058. },
  1059. "response": []
  1060. },
  1061. {
  1062. "name": "overview",
  1063. "request": {
  1064. "method": "GET",
  1065. "header": [],
  1066. "url": {
  1067. "raw": "{{baseUrl}}/api/stats/overview?days=7",
  1068. "host": [
  1069. "{{baseUrl}}"
  1070. ],
  1071. "path": [
  1072. "api",
  1073. "stats",
  1074. "overview"
  1075. ],
  1076. "query": [
  1077. {
  1078. "key": "days",
  1079. "value": "7"
  1080. }
  1081. ]
  1082. }
  1083. },
  1084. "response": []
  1085. },
  1086. {
  1087. "name": "views",
  1088. "request": {
  1089. "method": "GET",
  1090. "header": [],
  1091. "url": {
  1092. "raw": "{{baseUrl}}/api/stats/views?page=1&pageSize=50",
  1093. "host": [
  1094. "{{baseUrl}}"
  1095. ],
  1096. "path": [
  1097. "api",
  1098. "stats",
  1099. "views"
  1100. ],
  1101. "query": [
  1102. {
  1103. "key": "page",
  1104. "value": "1"
  1105. },
  1106. {
  1107. "key": "pageSize",
  1108. "value": "50"
  1109. },
  1110. {
  1111. "key": "video_id",
  1112. "value": "",
  1113. "disabled": true
  1114. },
  1115. {
  1116. "key": "session_id",
  1117. "value": "",
  1118. "disabled": true
  1119. },
  1120. {
  1121. "key": "user_id",
  1122. "value": "",
  1123. "disabled": true
  1124. }
  1125. ]
  1126. }
  1127. },
  1128. "response": []
  1129. }
  1130. ]
  1131. },
  1132. {
  1133. "name": "audit-logs",
  1134. "item": [
  1135. {
  1136. "name": "stats",
  1137. "item": [
  1138. {
  1139. "name": "summary",
  1140. "request": {
  1141. "method": "GET",
  1142. "header": [],
  1143. "url": {
  1144. "raw": "{{baseUrl}}/api/audit-logs/stats/summary?days=7",
  1145. "host": [
  1146. "{{baseUrl}}"
  1147. ],
  1148. "path": [
  1149. "api",
  1150. "audit-logs",
  1151. "stats",
  1152. "summary"
  1153. ],
  1154. "query": [
  1155. {
  1156. "key": "days",
  1157. "value": "7"
  1158. }
  1159. ]
  1160. }
  1161. },
  1162. "response": []
  1163. }
  1164. ]
  1165. },
  1166. {
  1167. "name": "list",
  1168. "request": {
  1169. "method": "GET",
  1170. "header": [],
  1171. "url": {
  1172. "raw": "{{baseUrl}}/api/audit-logs?page=1&pageSize=50",
  1173. "host": [
  1174. "{{baseUrl}}"
  1175. ],
  1176. "path": [
  1177. "api",
  1178. "audit-logs"
  1179. ],
  1180. "query": [
  1181. {
  1182. "key": "page",
  1183. "value": "1"
  1184. },
  1185. {
  1186. "key": "pageSize",
  1187. "value": "50"
  1188. },
  1189. {
  1190. "key": "action",
  1191. "value": "",
  1192. "disabled": true
  1193. },
  1194. {
  1195. "key": "resource",
  1196. "value": "",
  1197. "disabled": true
  1198. },
  1199. {
  1200. "key": "user_id",
  1201. "value": "",
  1202. "disabled": true
  1203. },
  1204. {
  1205. "key": "start_date",
  1206. "value": "",
  1207. "disabled": true
  1208. },
  1209. {
  1210. "key": "end_date",
  1211. "value": "",
  1212. "disabled": true
  1213. }
  1214. ]
  1215. }
  1216. },
  1217. "response": []
  1218. },
  1219. {
  1220. "name": "get",
  1221. "request": {
  1222. "method": "GET",
  1223. "header": [],
  1224. "url": {
  1225. "raw": "{{baseUrl}}/api/audit-logs/:id",
  1226. "host": [
  1227. "{{baseUrl}}"
  1228. ],
  1229. "path": [
  1230. "api",
  1231. "audit-logs",
  1232. ":id"
  1233. ],
  1234. "variable": [
  1235. {
  1236. "key": "id",
  1237. "value": "log_id_here"
  1238. }
  1239. ]
  1240. }
  1241. },
  1242. "response": []
  1243. },
  1244. {
  1245. "name": "user",
  1246. "request": {
  1247. "method": "GET",
  1248. "header": [],
  1249. "url": {
  1250. "raw": "{{baseUrl}}/api/audit-logs/user/:userId?page=1&pageSize=20",
  1251. "host": [
  1252. "{{baseUrl}}"
  1253. ],
  1254. "path": [
  1255. "api",
  1256. "audit-logs",
  1257. "user",
  1258. ":userId"
  1259. ],
  1260. "query": [
  1261. {
  1262. "key": "page",
  1263. "value": "1"
  1264. },
  1265. {
  1266. "key": "pageSize",
  1267. "value": "20"
  1268. }
  1269. ],
  1270. "variable": [
  1271. {
  1272. "key": "userId",
  1273. "value": "user_id_here"
  1274. }
  1275. ]
  1276. }
  1277. },
  1278. "response": []
  1279. },
  1280. {
  1281. "name": "resource",
  1282. "request": {
  1283. "method": "GET",
  1284. "header": [],
  1285. "url": {
  1286. "raw": "{{baseUrl}}/api/audit-logs/resource/:resource/:resourceId?page=1&pageSize=20",
  1287. "host": [
  1288. "{{baseUrl}}"
  1289. ],
  1290. "path": [
  1291. "api",
  1292. "audit-logs",
  1293. "resource",
  1294. ":resource",
  1295. ":resourceId"
  1296. ],
  1297. "query": [
  1298. {
  1299. "key": "page",
  1300. "value": "1"
  1301. },
  1302. {
  1303. "key": "pageSize",
  1304. "value": "20"
  1305. }
  1306. ],
  1307. "variable": [
  1308. {
  1309. "key": "resource",
  1310. "value": "camera"
  1311. },
  1312. {
  1313. "key": "resourceId",
  1314. "value": "resource_id_here"
  1315. }
  1316. ]
  1317. }
  1318. },
  1319. "response": []
  1320. }
  1321. ]
  1322. },
  1323. {
  1324. "name": "stream",
  1325. "item": [
  1326. {
  1327. "name": "video",
  1328. "item": [
  1329. {
  1330. "name": "list",
  1331. "request": {
  1332. "method": "GET",
  1333. "header": [],
  1334. "url": {
  1335. "raw": "{{baseUrl}}/api/stream/video/list",
  1336. "host": [
  1337. "{{baseUrl}}"
  1338. ],
  1339. "path": [
  1340. "api",
  1341. "stream",
  1342. "video",
  1343. "list"
  1344. ]
  1345. }
  1346. },
  1347. "response": []
  1348. },
  1349. {
  1350. "name": "get",
  1351. "request": {
  1352. "method": "GET",
  1353. "header": [],
  1354. "url": {
  1355. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  1356. "host": [
  1357. "{{baseUrl}}"
  1358. ],
  1359. "path": [
  1360. "api",
  1361. "stream",
  1362. "video",
  1363. ":videoId"
  1364. ],
  1365. "variable": [
  1366. {
  1367. "key": "videoId",
  1368. "value": "video_id_here"
  1369. }
  1370. ]
  1371. }
  1372. },
  1373. "response": []
  1374. },
  1375. {
  1376. "name": "delete",
  1377. "request": {
  1378. "method": "DELETE",
  1379. "header": [],
  1380. "url": {
  1381. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  1382. "host": [
  1383. "{{baseUrl}}"
  1384. ],
  1385. "path": [
  1386. "api",
  1387. "stream",
  1388. "video",
  1389. ":videoId"
  1390. ],
  1391. "variable": [
  1392. {
  1393. "key": "videoId",
  1394. "value": "video_id_here"
  1395. }
  1396. ]
  1397. }
  1398. },
  1399. "response": []
  1400. },
  1401. {
  1402. "name": "import",
  1403. "request": {
  1404. "method": "POST",
  1405. "header": [
  1406. {
  1407. "key": "Content-Type",
  1408. "value": "application/json"
  1409. }
  1410. ],
  1411. "body": {
  1412. "mode": "raw",
  1413. "raw": "{\n \"url\": \"https://example.com/video.mp4\",\n \"meta\": {\n \"name\": \"My Video\"\n }\n}"
  1414. },
  1415. "url": {
  1416. "raw": "{{baseUrl}}/api/stream/video/import",
  1417. "host": [
  1418. "{{baseUrl}}"
  1419. ],
  1420. "path": [
  1421. "api",
  1422. "stream",
  1423. "video",
  1424. "import"
  1425. ]
  1426. }
  1427. },
  1428. "response": []
  1429. },
  1430. {
  1431. "name": "upload-url",
  1432. "request": {
  1433. "method": "POST",
  1434. "header": [
  1435. {
  1436. "key": "Content-Type",
  1437. "value": "application/json"
  1438. }
  1439. ],
  1440. "body": {
  1441. "mode": "raw",
  1442. "raw": "{\n \"maxDurationSeconds\": 3600,\n \"meta\": {\n \"name\": \"My Upload\"\n }\n}"
  1443. },
  1444. "url": {
  1445. "raw": "{{baseUrl}}/api/stream/video/upload-url",
  1446. "host": [
  1447. "{{baseUrl}}"
  1448. ],
  1449. "path": [
  1450. "api",
  1451. "stream",
  1452. "video",
  1453. "upload-url"
  1454. ]
  1455. }
  1456. },
  1457. "response": []
  1458. },
  1459. {
  1460. "name": "playback",
  1461. "request": {
  1462. "method": "GET",
  1463. "header": [],
  1464. "url": {
  1465. "raw": "{{baseUrl}}/api/stream/video/:videoId/playback",
  1466. "host": [
  1467. "{{baseUrl}}"
  1468. ],
  1469. "path": [
  1470. "api",
  1471. "stream",
  1472. "video",
  1473. ":videoId",
  1474. "playback"
  1475. ],
  1476. "variable": [
  1477. {
  1478. "key": "videoId",
  1479. "value": "video_id_here"
  1480. }
  1481. ]
  1482. }
  1483. },
  1484. "response": []
  1485. }
  1486. ]
  1487. },
  1488. {
  1489. "name": "live",
  1490. "item": [
  1491. {
  1492. "name": "list",
  1493. "request": {
  1494. "method": "GET",
  1495. "header": [],
  1496. "url": {
  1497. "raw": "{{baseUrl}}/api/stream/live/list",
  1498. "host": [
  1499. "{{baseUrl}}"
  1500. ],
  1501. "path": [
  1502. "api",
  1503. "stream",
  1504. "live",
  1505. "list"
  1506. ]
  1507. }
  1508. },
  1509. "response": []
  1510. },
  1511. {
  1512. "name": "create",
  1513. "request": {
  1514. "method": "POST",
  1515. "header": [
  1516. {
  1517. "key": "Content-Type",
  1518. "value": "application/json"
  1519. }
  1520. ],
  1521. "body": {
  1522. "mode": "raw",
  1523. "raw": "{\n \"meta\": {\n \"name\": \"My Live Stream\"\n },\n \"recording\": {\n \"mode\": \"automatic\"\n }\n}"
  1524. },
  1525. "url": {
  1526. "raw": "{{baseUrl}}/api/stream/live",
  1527. "host": [
  1528. "{{baseUrl}}"
  1529. ],
  1530. "path": [
  1531. "api",
  1532. "stream",
  1533. "live"
  1534. ]
  1535. }
  1536. },
  1537. "response": []
  1538. },
  1539. {
  1540. "name": "get",
  1541. "request": {
  1542. "method": "GET",
  1543. "header": [],
  1544. "url": {
  1545. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1546. "host": [
  1547. "{{baseUrl}}"
  1548. ],
  1549. "path": [
  1550. "api",
  1551. "stream",
  1552. "live",
  1553. ":liveInputId"
  1554. ],
  1555. "variable": [
  1556. {
  1557. "key": "liveInputId",
  1558. "value": "live_input_id_here"
  1559. }
  1560. ]
  1561. }
  1562. },
  1563. "response": []
  1564. },
  1565. {
  1566. "name": "update",
  1567. "request": {
  1568. "method": "PUT",
  1569. "header": [
  1570. {
  1571. "key": "Content-Type",
  1572. "value": "application/json"
  1573. }
  1574. ],
  1575. "body": {
  1576. "mode": "raw",
  1577. "raw": "{\n \"meta\": {\n \"name\": \"Updated Live Stream\"\n }\n}"
  1578. },
  1579. "url": {
  1580. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1581. "host": [
  1582. "{{baseUrl}}"
  1583. ],
  1584. "path": [
  1585. "api",
  1586. "stream",
  1587. "live",
  1588. ":liveInputId"
  1589. ],
  1590. "variable": [
  1591. {
  1592. "key": "liveInputId",
  1593. "value": "live_input_id_here"
  1594. }
  1595. ]
  1596. }
  1597. },
  1598. "response": []
  1599. },
  1600. {
  1601. "name": "delete",
  1602. "request": {
  1603. "method": "DELETE",
  1604. "header": [],
  1605. "url": {
  1606. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1607. "host": [
  1608. "{{baseUrl}}"
  1609. ],
  1610. "path": [
  1611. "api",
  1612. "stream",
  1613. "live",
  1614. ":liveInputId"
  1615. ],
  1616. "variable": [
  1617. {
  1618. "key": "liveInputId",
  1619. "value": "live_input_id_here"
  1620. }
  1621. ]
  1622. }
  1623. },
  1624. "response": []
  1625. },
  1626. {
  1627. "name": "playback",
  1628. "request": {
  1629. "method": "GET",
  1630. "header": [],
  1631. "url": {
  1632. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/playback",
  1633. "host": [
  1634. "{{baseUrl}}"
  1635. ],
  1636. "path": [
  1637. "api",
  1638. "stream",
  1639. "live",
  1640. ":liveInputId",
  1641. "playback"
  1642. ],
  1643. "variable": [
  1644. {
  1645. "key": "liveInputId",
  1646. "value": "live_input_id_here"
  1647. }
  1648. ]
  1649. }
  1650. },
  1651. "response": []
  1652. },
  1653. {
  1654. "name": "recordings",
  1655. "request": {
  1656. "method": "GET",
  1657. "header": [],
  1658. "url": {
  1659. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/recordings",
  1660. "host": [
  1661. "{{baseUrl}}"
  1662. ],
  1663. "path": [
  1664. "api",
  1665. "stream",
  1666. "live",
  1667. ":liveInputId",
  1668. "recordings"
  1669. ],
  1670. "variable": [
  1671. {
  1672. "key": "liveInputId",
  1673. "value": "live_input_id_here"
  1674. }
  1675. ]
  1676. }
  1677. },
  1678. "response": []
  1679. }
  1680. ]
  1681. }
  1682. ]
  1683. }
  1684. ]
  1685. }
  1686. ],
  1687. "auth": {
  1688. "type": "bearer",
  1689. "bearer": [
  1690. {
  1691. "key": "token",
  1692. "value": "{{accessToken}}",
  1693. "type": "string"
  1694. }
  1695. ]
  1696. },
  1697. "variable": [
  1698. {
  1699. "key": "baseUrl",
  1700. "value": "http://localhost:8787",
  1701. "type": "string"
  1702. },
  1703. {
  1704. "key": "accessToken",
  1705. "value": "",
  1706. "type": "string"
  1707. },
  1708. {
  1709. "key": "refreshToken",
  1710. "value": "",
  1711. "type": "string"
  1712. }
  1713. ]
  1714. }