tg-live-game.postman_collection.json 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745
  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\": \"pwtk003\",\n \"password\": \"test123456\",\n \"email\": \"pwtk003@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\": \"pwtk001\",\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\": \"123456\",\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": "69270add987591d84a5385ecea3d5ab0"
  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. "auth": {
  318. "type": "bearer",
  319. "bearer": [
  320. {
  321. "key": "token",
  322. "value": "{{accessToken}}",
  323. "type": "string"
  324. }
  325. ]
  326. },
  327. "method": "GET",
  328. "header": [],
  329. "url": {
  330. "raw": "{{baseUrl}}/api/users?page=1&pageSize=20",
  331. "host": [
  332. "{{baseUrl}}"
  333. ],
  334. "path": [
  335. "api",
  336. "users"
  337. ],
  338. "query": [
  339. {
  340. "key": "page",
  341. "value": "1"
  342. },
  343. {
  344. "key": "pageSize",
  345. "value": "20"
  346. },
  347. {
  348. "key": "role",
  349. "value": "",
  350. "disabled": true
  351. },
  352. {
  353. "key": "status",
  354. "value": "",
  355. "disabled": true
  356. },
  357. {
  358. "key": "search",
  359. "value": "",
  360. "disabled": true
  361. }
  362. ]
  363. }
  364. },
  365. "response": []
  366. },
  367. {
  368. "name": "get",
  369. "request": {
  370. "method": "GET",
  371. "header": [],
  372. "url": {
  373. "raw": "{{baseUrl}}/api/users/:id",
  374. "host": [
  375. "{{baseUrl}}"
  376. ],
  377. "path": [
  378. "api",
  379. "users",
  380. ":id"
  381. ],
  382. "variable": [
  383. {
  384. "key": "id",
  385. "value": "cdee69f27a05ae30d7b7622879ce1ddf"
  386. }
  387. ]
  388. }
  389. },
  390. "response": []
  391. },
  392. {
  393. "name": "create",
  394. "request": {
  395. "method": "POST",
  396. "header": [
  397. {
  398. "key": "Content-Type",
  399. "value": "application/json"
  400. }
  401. ],
  402. "body": {
  403. "mode": "raw",
  404. "raw": "{\n \"username\": \"newuser1\",\n \"password\": \"password123\",\n \"email\": \"newuser@example.com\",\n \"role\": \"viewer\"\n}"
  405. },
  406. "url": {
  407. "raw": "{{baseUrl}}/api/users",
  408. "host": [
  409. "{{baseUrl}}"
  410. ],
  411. "path": [
  412. "api",
  413. "users"
  414. ]
  415. }
  416. },
  417. "response": []
  418. },
  419. {
  420. "name": "update",
  421. "request": {
  422. "method": "PUT",
  423. "header": [
  424. {
  425. "key": "Content-Type",
  426. "value": "application/json"
  427. }
  428. ],
  429. "body": {
  430. "mode": "raw",
  431. "raw": "{\n \"email\": \"updated@example.com\",\n \"role\": \"operator\",\n \"status\": \"active\"\n}"
  432. },
  433. "url": {
  434. "raw": "{{baseUrl}}/api/users/:id",
  435. "host": [
  436. "{{baseUrl}}"
  437. ],
  438. "path": [
  439. "api",
  440. "users",
  441. ":id"
  442. ],
  443. "variable": [
  444. {
  445. "key": "id",
  446. "value": "db09b553ed4e1070be2f065c12e4fe81"
  447. }
  448. ]
  449. }
  450. },
  451. "response": []
  452. },
  453. {
  454. "name": "delete",
  455. "request": {
  456. "method": "DELETE",
  457. "header": [],
  458. "url": {
  459. "raw": "{{baseUrl}}/api/users/:id",
  460. "host": [
  461. "{{baseUrl}}"
  462. ],
  463. "path": [
  464. "api",
  465. "users",
  466. ":id"
  467. ],
  468. "variable": [
  469. {
  470. "key": "id",
  471. "value": "db09b553ed4e1070be2f065c12e4fe81"
  472. }
  473. ]
  474. }
  475. },
  476. "response": []
  477. }
  478. ]
  479. },
  480. {
  481. "name": "cameras",
  482. "item": [
  483. {
  484. "name": "list",
  485. "request": {
  486. "method": "GET",
  487. "header": [],
  488. "url": {
  489. "raw": "{{baseUrl}}/api/cameras?page=1&pageSize=20",
  490. "host": [
  491. "{{baseUrl}}"
  492. ],
  493. "path": [
  494. "api",
  495. "cameras"
  496. ],
  497. "query": [
  498. {
  499. "key": "page",
  500. "value": "1"
  501. },
  502. {
  503. "key": "pageSize",
  504. "value": "20"
  505. },
  506. {
  507. "key": "status",
  508. "value": "",
  509. "disabled": true
  510. },
  511. {
  512. "key": "type",
  513. "value": "",
  514. "disabled": true
  515. },
  516. {
  517. "key": "search",
  518. "value": "",
  519. "disabled": true
  520. }
  521. ]
  522. }
  523. },
  524. "response": []
  525. },
  526. {
  527. "name": "get",
  528. "request": {
  529. "method": "GET",
  530. "header": [],
  531. "url": {
  532. "raw": "{{baseUrl}}/api/cameras/:id",
  533. "host": [
  534. "{{baseUrl}}"
  535. ],
  536. "path": [
  537. "api",
  538. "cameras",
  539. ":id"
  540. ],
  541. "variable": [
  542. {
  543. "key": "id",
  544. "value": "camera_id_here"
  545. }
  546. ]
  547. }
  548. },
  549. "response": []
  550. },
  551. {
  552. "name": "create",
  553. "request": {
  554. "method": "POST",
  555. "header": [
  556. {
  557. "key": "Content-Type",
  558. "value": "application/json"
  559. }
  560. ],
  561. "body": {
  562. "mode": "raw",
  563. "raw": "{\n \"name\": \"Camera 1\",\n \"type\": \"rtsp\",\n \"protocol\": \"rtmps\",\n \"rtsp_url\": \"rtsp://example.com/stream\",\n \"location\": \"Room 101\"\n}"
  564. },
  565. "url": {
  566. "raw": "{{baseUrl}}/api/cameras",
  567. "host": [
  568. "{{baseUrl}}"
  569. ],
  570. "path": [
  571. "api",
  572. "cameras"
  573. ]
  574. }
  575. },
  576. "response": []
  577. },
  578. {
  579. "name": "update",
  580. "request": {
  581. "method": "PUT",
  582. "header": [
  583. {
  584. "key": "Content-Type",
  585. "value": "application/json"
  586. }
  587. ],
  588. "body": {
  589. "mode": "raw",
  590. "raw": "{\n \"name\": \"Camera 1 Updated\",\n \"location\": \"Room 102\",\n \"status\": \"online\"\n}"
  591. },
  592. "url": {
  593. "raw": "{{baseUrl}}/api/cameras/:id",
  594. "host": [
  595. "{{baseUrl}}"
  596. ],
  597. "path": [
  598. "api",
  599. "cameras",
  600. ":id"
  601. ],
  602. "variable": [
  603. {
  604. "key": "id",
  605. "value": "camera_id_here"
  606. }
  607. ]
  608. }
  609. },
  610. "response": []
  611. },
  612. {
  613. "name": "delete",
  614. "request": {
  615. "method": "DELETE",
  616. "header": [],
  617. "url": {
  618. "raw": "{{baseUrl}}/api/cameras/:id",
  619. "host": [
  620. "{{baseUrl}}"
  621. ],
  622. "path": [
  623. "api",
  624. "cameras",
  625. ":id"
  626. ],
  627. "variable": [
  628. {
  629. "key": "id",
  630. "value": "camera_id_here"
  631. }
  632. ]
  633. }
  634. },
  635. "response": []
  636. },
  637. {
  638. "name": "sessions",
  639. "request": {
  640. "method": "GET",
  641. "header": [],
  642. "url": {
  643. "raw": "{{baseUrl}}/api/cameras/:id/sessions?page=1&pageSize=20",
  644. "host": [
  645. "{{baseUrl}}"
  646. ],
  647. "path": [
  648. "api",
  649. "cameras",
  650. ":id",
  651. "sessions"
  652. ],
  653. "query": [
  654. {
  655. "key": "page",
  656. "value": "1"
  657. },
  658. {
  659. "key": "pageSize",
  660. "value": "20"
  661. },
  662. {
  663. "key": "status",
  664. "value": "",
  665. "disabled": true
  666. }
  667. ],
  668. "variable": [
  669. {
  670. "key": "id",
  671. "value": "camera_id_here"
  672. }
  673. ]
  674. }
  675. },
  676. "response": []
  677. }
  678. ]
  679. },
  680. {
  681. "name": "sessions",
  682. "item": [
  683. {
  684. "name": "list",
  685. "request": {
  686. "method": "GET",
  687. "header": [],
  688. "url": {
  689. "raw": "{{baseUrl}}/api/sessions?page=1&pageSize=20",
  690. "host": [
  691. "{{baseUrl}}"
  692. ],
  693. "path": [
  694. "api",
  695. "sessions"
  696. ],
  697. "query": [
  698. {
  699. "key": "page",
  700. "value": "1"
  701. },
  702. {
  703. "key": "pageSize",
  704. "value": "20"
  705. },
  706. {
  707. "key": "status",
  708. "value": "",
  709. "disabled": true
  710. },
  711. {
  712. "key": "camera_id",
  713. "value": "",
  714. "disabled": true
  715. }
  716. ]
  717. }
  718. },
  719. "response": []
  720. },
  721. {
  722. "name": "live",
  723. "request": {
  724. "method": "GET",
  725. "header": [],
  726. "url": {
  727. "raw": "{{baseUrl}}/api/sessions/live",
  728. "host": [
  729. "{{baseUrl}}"
  730. ],
  731. "path": [
  732. "api",
  733. "sessions",
  734. "live"
  735. ]
  736. }
  737. },
  738. "response": []
  739. },
  740. {
  741. "name": "get",
  742. "request": {
  743. "method": "GET",
  744. "header": [],
  745. "url": {
  746. "raw": "{{baseUrl}}/api/sessions/:id",
  747. "host": [
  748. "{{baseUrl}}"
  749. ],
  750. "path": [
  751. "api",
  752. "sessions",
  753. ":id"
  754. ],
  755. "variable": [
  756. {
  757. "key": "id",
  758. "value": "session_id_here"
  759. }
  760. ]
  761. }
  762. },
  763. "response": []
  764. },
  765. {
  766. "name": "start",
  767. "request": {
  768. "method": "POST",
  769. "header": [
  770. {
  771. "key": "Content-Type",
  772. "value": "application/json"
  773. }
  774. ],
  775. "body": {
  776. "mode": "raw",
  777. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"live_input_id\": \"live_input_id_here\"\n}"
  778. },
  779. "url": {
  780. "raw": "{{baseUrl}}/api/sessions",
  781. "host": [
  782. "{{baseUrl}}"
  783. ],
  784. "path": [
  785. "api",
  786. "sessions"
  787. ]
  788. }
  789. },
  790. "response": []
  791. },
  792. {
  793. "name": "end",
  794. "request": {
  795. "method": "PUT",
  796. "header": [
  797. {
  798. "key": "Content-Type",
  799. "value": "application/json"
  800. }
  801. ],
  802. "body": {
  803. "mode": "raw",
  804. "raw": "{\n \"recording_id\": \"recording_id_here\"\n}"
  805. },
  806. "url": {
  807. "raw": "{{baseUrl}}/api/sessions/:id/end",
  808. "host": [
  809. "{{baseUrl}}"
  810. ],
  811. "path": [
  812. "api",
  813. "sessions",
  814. ":id",
  815. "end"
  816. ],
  817. "variable": [
  818. {
  819. "key": "id",
  820. "value": "session_id_here"
  821. }
  822. ]
  823. }
  824. },
  825. "response": []
  826. },
  827. {
  828. "name": "update-viewers",
  829. "request": {
  830. "method": "PUT",
  831. "header": [
  832. {
  833. "key": "Content-Type",
  834. "value": "application/json"
  835. }
  836. ],
  837. "body": {
  838. "mode": "raw",
  839. "raw": "{\n \"viewer_count\": 100\n}"
  840. },
  841. "url": {
  842. "raw": "{{baseUrl}}/api/sessions/:id/viewers",
  843. "host": [
  844. "{{baseUrl}}"
  845. ],
  846. "path": [
  847. "api",
  848. "sessions",
  849. ":id",
  850. "viewers"
  851. ],
  852. "variable": [
  853. {
  854. "key": "id",
  855. "value": "session_id_here"
  856. }
  857. ]
  858. }
  859. },
  860. "response": []
  861. },
  862. {
  863. "name": "stats",
  864. "request": {
  865. "method": "GET",
  866. "header": [],
  867. "url": {
  868. "raw": "{{baseUrl}}/api/sessions/:id/stats",
  869. "host": [
  870. "{{baseUrl}}"
  871. ],
  872. "path": [
  873. "api",
  874. "sessions",
  875. ":id",
  876. "stats"
  877. ],
  878. "variable": [
  879. {
  880. "key": "id",
  881. "value": "session_id_here"
  882. }
  883. ]
  884. }
  885. },
  886. "response": []
  887. },
  888. {
  889. "name": "delete",
  890. "request": {
  891. "method": "DELETE",
  892. "header": [],
  893. "url": {
  894. "raw": "{{baseUrl}}/api/sessions/:id",
  895. "host": [
  896. "{{baseUrl}}"
  897. ],
  898. "path": [
  899. "api",
  900. "sessions",
  901. ":id"
  902. ],
  903. "variable": [
  904. {
  905. "key": "id",
  906. "value": "session_id_here"
  907. }
  908. ]
  909. }
  910. },
  911. "response": []
  912. }
  913. ]
  914. },
  915. {
  916. "name": "stats",
  917. "item": [
  918. {
  919. "name": "view",
  920. "item": [
  921. {
  922. "name": "start",
  923. "request": {
  924. "auth": {
  925. "type": "noauth"
  926. },
  927. "method": "POST",
  928. "header": [
  929. {
  930. "key": "Content-Type",
  931. "value": "application/json"
  932. }
  933. ],
  934. "body": {
  935. "mode": "raw",
  936. "raw": "{\n \"video_id\": \"video_id_here\"\n}"
  937. },
  938. "url": {
  939. "raw": "{{baseUrl}}/api/stats/view/start",
  940. "host": [
  941. "{{baseUrl}}"
  942. ],
  943. "path": [
  944. "api",
  945. "stats",
  946. "view",
  947. "start"
  948. ]
  949. }
  950. },
  951. "response": []
  952. },
  953. {
  954. "name": "end",
  955. "request": {
  956. "auth": {
  957. "type": "noauth"
  958. },
  959. "method": "POST",
  960. "header": [
  961. {
  962. "key": "Content-Type",
  963. "value": "application/json"
  964. }
  965. ],
  966. "body": {
  967. "mode": "raw",
  968. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 300\n}"
  969. },
  970. "url": {
  971. "raw": "{{baseUrl}}/api/stats/view/end",
  972. "host": [
  973. "{{baseUrl}}"
  974. ],
  975. "path": [
  976. "api",
  977. "stats",
  978. "view",
  979. "end"
  980. ]
  981. }
  982. },
  983. "response": []
  984. },
  985. {
  986. "name": "heartbeat",
  987. "request": {
  988. "auth": {
  989. "type": "noauth"
  990. },
  991. "method": "POST",
  992. "header": [
  993. {
  994. "key": "Content-Type",
  995. "value": "application/json"
  996. }
  997. ],
  998. "body": {
  999. "mode": "raw",
  1000. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 60\n}"
  1001. },
  1002. "url": {
  1003. "raw": "{{baseUrl}}/api/stats/view/heartbeat",
  1004. "host": [
  1005. "{{baseUrl}}"
  1006. ],
  1007. "path": [
  1008. "api",
  1009. "stats",
  1010. "view",
  1011. "heartbeat"
  1012. ]
  1013. }
  1014. },
  1015. "response": []
  1016. }
  1017. ]
  1018. },
  1019. {
  1020. "name": "video",
  1021. "request": {
  1022. "method": "GET",
  1023. "header": [],
  1024. "url": {
  1025. "raw": "{{baseUrl}}/api/stats/video/:videoId",
  1026. "host": [
  1027. "{{baseUrl}}"
  1028. ],
  1029. "path": [
  1030. "api",
  1031. "stats",
  1032. "video",
  1033. ":videoId"
  1034. ],
  1035. "variable": [
  1036. {
  1037. "key": "videoId",
  1038. "value": "video_id_here"
  1039. }
  1040. ]
  1041. }
  1042. },
  1043. "response": []
  1044. },
  1045. {
  1046. "name": "session",
  1047. "request": {
  1048. "method": "GET",
  1049. "header": [],
  1050. "url": {
  1051. "raw": "{{baseUrl}}/api/stats/session/:sessionId",
  1052. "host": [
  1053. "{{baseUrl}}"
  1054. ],
  1055. "path": [
  1056. "api",
  1057. "stats",
  1058. "session",
  1059. ":sessionId"
  1060. ],
  1061. "variable": [
  1062. {
  1063. "key": "sessionId",
  1064. "value": "session_id_here"
  1065. }
  1066. ]
  1067. }
  1068. },
  1069. "response": []
  1070. },
  1071. {
  1072. "name": "overview",
  1073. "request": {
  1074. "method": "GET",
  1075. "header": [],
  1076. "url": {
  1077. "raw": "{{baseUrl}}/api/stats/overview?days=7",
  1078. "host": [
  1079. "{{baseUrl}}"
  1080. ],
  1081. "path": [
  1082. "api",
  1083. "stats",
  1084. "overview"
  1085. ],
  1086. "query": [
  1087. {
  1088. "key": "days",
  1089. "value": "7"
  1090. }
  1091. ]
  1092. }
  1093. },
  1094. "response": []
  1095. },
  1096. {
  1097. "name": "views",
  1098. "request": {
  1099. "method": "GET",
  1100. "header": [],
  1101. "url": {
  1102. "raw": "{{baseUrl}}/api/stats/views?page=1&pageSize=50",
  1103. "host": [
  1104. "{{baseUrl}}"
  1105. ],
  1106. "path": [
  1107. "api",
  1108. "stats",
  1109. "views"
  1110. ],
  1111. "query": [
  1112. {
  1113. "key": "page",
  1114. "value": "1"
  1115. },
  1116. {
  1117. "key": "pageSize",
  1118. "value": "50"
  1119. },
  1120. {
  1121. "key": "video_id",
  1122. "value": "",
  1123. "disabled": true
  1124. },
  1125. {
  1126. "key": "session_id",
  1127. "value": "",
  1128. "disabled": true
  1129. },
  1130. {
  1131. "key": "user_id",
  1132. "value": "",
  1133. "disabled": true
  1134. }
  1135. ]
  1136. }
  1137. },
  1138. "response": []
  1139. }
  1140. ]
  1141. },
  1142. {
  1143. "name": "audit-logs",
  1144. "item": [
  1145. {
  1146. "name": "stats",
  1147. "item": [
  1148. {
  1149. "name": "summary",
  1150. "request": {
  1151. "method": "GET",
  1152. "header": [],
  1153. "url": {
  1154. "raw": "{{baseUrl}}/api/audit-logs/stats/summary?days=7",
  1155. "host": [
  1156. "{{baseUrl}}"
  1157. ],
  1158. "path": [
  1159. "api",
  1160. "audit-logs",
  1161. "stats",
  1162. "summary"
  1163. ],
  1164. "query": [
  1165. {
  1166. "key": "days",
  1167. "value": "7"
  1168. }
  1169. ]
  1170. }
  1171. },
  1172. "response": []
  1173. }
  1174. ]
  1175. },
  1176. {
  1177. "name": "list",
  1178. "request": {
  1179. "method": "GET",
  1180. "header": [],
  1181. "url": {
  1182. "raw": "{{baseUrl}}/api/audit-logs?page=1&pageSize=50",
  1183. "host": [
  1184. "{{baseUrl}}"
  1185. ],
  1186. "path": [
  1187. "api",
  1188. "audit-logs"
  1189. ],
  1190. "query": [
  1191. {
  1192. "key": "page",
  1193. "value": "1"
  1194. },
  1195. {
  1196. "key": "pageSize",
  1197. "value": "50"
  1198. },
  1199. {
  1200. "key": "action",
  1201. "value": "",
  1202. "disabled": true
  1203. },
  1204. {
  1205. "key": "resource",
  1206. "value": "",
  1207. "disabled": true
  1208. },
  1209. {
  1210. "key": "user_id",
  1211. "value": "",
  1212. "disabled": true
  1213. },
  1214. {
  1215. "key": "start_date",
  1216. "value": "",
  1217. "disabled": true
  1218. },
  1219. {
  1220. "key": "end_date",
  1221. "value": "",
  1222. "disabled": true
  1223. }
  1224. ]
  1225. }
  1226. },
  1227. "response": []
  1228. },
  1229. {
  1230. "name": "get",
  1231. "request": {
  1232. "method": "GET",
  1233. "header": [],
  1234. "url": {
  1235. "raw": "{{baseUrl}}/api/audit-logs/:id",
  1236. "host": [
  1237. "{{baseUrl}}"
  1238. ],
  1239. "path": [
  1240. "api",
  1241. "audit-logs",
  1242. ":id"
  1243. ],
  1244. "variable": [
  1245. {
  1246. "key": "id",
  1247. "value": "log_id_here"
  1248. }
  1249. ]
  1250. }
  1251. },
  1252. "response": []
  1253. },
  1254. {
  1255. "name": "user",
  1256. "request": {
  1257. "method": "GET",
  1258. "header": [],
  1259. "url": {
  1260. "raw": "{{baseUrl}}/api/audit-logs/user/:userId?page=1&pageSize=20",
  1261. "host": [
  1262. "{{baseUrl}}"
  1263. ],
  1264. "path": [
  1265. "api",
  1266. "audit-logs",
  1267. "user",
  1268. ":userId"
  1269. ],
  1270. "query": [
  1271. {
  1272. "key": "page",
  1273. "value": "1"
  1274. },
  1275. {
  1276. "key": "pageSize",
  1277. "value": "20"
  1278. }
  1279. ],
  1280. "variable": [
  1281. {
  1282. "key": "userId",
  1283. "value": "user_id_here"
  1284. }
  1285. ]
  1286. }
  1287. },
  1288. "response": []
  1289. },
  1290. {
  1291. "name": "resource",
  1292. "request": {
  1293. "method": "GET",
  1294. "header": [],
  1295. "url": {
  1296. "raw": "{{baseUrl}}/api/audit-logs/resource/:resource/:resourceId?page=1&pageSize=20",
  1297. "host": [
  1298. "{{baseUrl}}"
  1299. ],
  1300. "path": [
  1301. "api",
  1302. "audit-logs",
  1303. "resource",
  1304. ":resource",
  1305. ":resourceId"
  1306. ],
  1307. "query": [
  1308. {
  1309. "key": "page",
  1310. "value": "1"
  1311. },
  1312. {
  1313. "key": "pageSize",
  1314. "value": "20"
  1315. }
  1316. ],
  1317. "variable": [
  1318. {
  1319. "key": "resource",
  1320. "value": "camera"
  1321. },
  1322. {
  1323. "key": "resourceId",
  1324. "value": "resource_id_here"
  1325. }
  1326. ]
  1327. }
  1328. },
  1329. "response": []
  1330. }
  1331. ]
  1332. },
  1333. {
  1334. "name": "stream",
  1335. "item": [
  1336. {
  1337. "name": "video",
  1338. "item": [
  1339. {
  1340. "name": "list",
  1341. "request": {
  1342. "method": "GET",
  1343. "header": [],
  1344. "url": {
  1345. "raw": "{{baseUrl}}/api/stream/video/list",
  1346. "host": [
  1347. "{{baseUrl}}"
  1348. ],
  1349. "path": [
  1350. "api",
  1351. "stream",
  1352. "video",
  1353. "list"
  1354. ]
  1355. }
  1356. },
  1357. "response": []
  1358. },
  1359. {
  1360. "name": "get",
  1361. "request": {
  1362. "method": "GET",
  1363. "header": [],
  1364. "url": {
  1365. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  1366. "host": [
  1367. "{{baseUrl}}"
  1368. ],
  1369. "path": [
  1370. "api",
  1371. "stream",
  1372. "video",
  1373. ":videoId"
  1374. ],
  1375. "variable": [
  1376. {
  1377. "key": "videoId",
  1378. "value": "video_id_here"
  1379. }
  1380. ]
  1381. }
  1382. },
  1383. "response": []
  1384. },
  1385. {
  1386. "name": "delete",
  1387. "request": {
  1388. "method": "DELETE",
  1389. "header": [],
  1390. "url": {
  1391. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  1392. "host": [
  1393. "{{baseUrl}}"
  1394. ],
  1395. "path": [
  1396. "api",
  1397. "stream",
  1398. "video",
  1399. ":videoId"
  1400. ],
  1401. "variable": [
  1402. {
  1403. "key": "videoId",
  1404. "value": "video_id_here"
  1405. }
  1406. ]
  1407. }
  1408. },
  1409. "response": []
  1410. },
  1411. {
  1412. "name": "import",
  1413. "request": {
  1414. "method": "POST",
  1415. "header": [
  1416. {
  1417. "key": "Content-Type",
  1418. "value": "application/json"
  1419. }
  1420. ],
  1421. "body": {
  1422. "mode": "raw",
  1423. "raw": "{\n \"url\": \"https://example.com/video.mp4\",\n \"meta\": {\n \"name\": \"My Video\"\n }\n}"
  1424. },
  1425. "url": {
  1426. "raw": "{{baseUrl}}/api/stream/video/import",
  1427. "host": [
  1428. "{{baseUrl}}"
  1429. ],
  1430. "path": [
  1431. "api",
  1432. "stream",
  1433. "video",
  1434. "import"
  1435. ]
  1436. }
  1437. },
  1438. "response": []
  1439. },
  1440. {
  1441. "name": "upload-url",
  1442. "request": {
  1443. "method": "POST",
  1444. "header": [
  1445. {
  1446. "key": "Content-Type",
  1447. "value": "application/json"
  1448. }
  1449. ],
  1450. "body": {
  1451. "mode": "raw",
  1452. "raw": "{\n \"maxDurationSeconds\": 3600,\n \"meta\": {\n \"name\": \"My Upload\"\n }\n}"
  1453. },
  1454. "url": {
  1455. "raw": "{{baseUrl}}/api/stream/video/upload-url",
  1456. "host": [
  1457. "{{baseUrl}}"
  1458. ],
  1459. "path": [
  1460. "api",
  1461. "stream",
  1462. "video",
  1463. "upload-url"
  1464. ]
  1465. }
  1466. },
  1467. "response": []
  1468. },
  1469. {
  1470. "name": "playback",
  1471. "request": {
  1472. "method": "GET",
  1473. "header": [],
  1474. "url": {
  1475. "raw": "{{baseUrl}}/api/stream/video/:videoId/playback",
  1476. "host": [
  1477. "{{baseUrl}}"
  1478. ],
  1479. "path": [
  1480. "api",
  1481. "stream",
  1482. "video",
  1483. ":videoId",
  1484. "playback"
  1485. ],
  1486. "variable": [
  1487. {
  1488. "key": "videoId",
  1489. "value": "video_id_here"
  1490. }
  1491. ]
  1492. }
  1493. },
  1494. "response": []
  1495. }
  1496. ]
  1497. },
  1498. {
  1499. "name": "live",
  1500. "item": [
  1501. {
  1502. "name": "list",
  1503. "request": {
  1504. "method": "GET",
  1505. "header": [],
  1506. "url": {
  1507. "raw": "{{baseUrl}}/api/stream/live/list",
  1508. "host": [
  1509. "{{baseUrl}}"
  1510. ],
  1511. "path": [
  1512. "api",
  1513. "stream",
  1514. "live",
  1515. "list"
  1516. ]
  1517. }
  1518. },
  1519. "response": []
  1520. },
  1521. {
  1522. "name": "create",
  1523. "request": {
  1524. "method": "POST",
  1525. "header": [
  1526. {
  1527. "key": "Content-Type",
  1528. "value": "application/json"
  1529. }
  1530. ],
  1531. "body": {
  1532. "mode": "raw",
  1533. "raw": "{\n \"meta\": {\n \"name\": \"My Live Stream\"\n },\n \"recording\": {\n \"mode\": \"automatic\"\n }\n}"
  1534. },
  1535. "url": {
  1536. "raw": "{{baseUrl}}/api/stream/live",
  1537. "host": [
  1538. "{{baseUrl}}"
  1539. ],
  1540. "path": [
  1541. "api",
  1542. "stream",
  1543. "live"
  1544. ]
  1545. }
  1546. },
  1547. "response": []
  1548. },
  1549. {
  1550. "name": "get",
  1551. "request": {
  1552. "method": "GET",
  1553. "header": [],
  1554. "url": {
  1555. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1556. "host": [
  1557. "{{baseUrl}}"
  1558. ],
  1559. "path": [
  1560. "api",
  1561. "stream",
  1562. "live",
  1563. ":liveInputId"
  1564. ],
  1565. "variable": [
  1566. {
  1567. "key": "liveInputId",
  1568. "value": "live_input_id_here"
  1569. }
  1570. ]
  1571. }
  1572. },
  1573. "response": []
  1574. },
  1575. {
  1576. "name": "update",
  1577. "request": {
  1578. "method": "PUT",
  1579. "header": [
  1580. {
  1581. "key": "Content-Type",
  1582. "value": "application/json"
  1583. }
  1584. ],
  1585. "body": {
  1586. "mode": "raw",
  1587. "raw": "{\n \"meta\": {\n \"name\": \"Updated Live Stream\"\n }\n}"
  1588. },
  1589. "url": {
  1590. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1591. "host": [
  1592. "{{baseUrl}}"
  1593. ],
  1594. "path": [
  1595. "api",
  1596. "stream",
  1597. "live",
  1598. ":liveInputId"
  1599. ],
  1600. "variable": [
  1601. {
  1602. "key": "liveInputId",
  1603. "value": "live_input_id_here"
  1604. }
  1605. ]
  1606. }
  1607. },
  1608. "response": []
  1609. },
  1610. {
  1611. "name": "delete",
  1612. "request": {
  1613. "method": "DELETE",
  1614. "header": [],
  1615. "url": {
  1616. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1617. "host": [
  1618. "{{baseUrl}}"
  1619. ],
  1620. "path": [
  1621. "api",
  1622. "stream",
  1623. "live",
  1624. ":liveInputId"
  1625. ],
  1626. "variable": [
  1627. {
  1628. "key": "liveInputId",
  1629. "value": "live_input_id_here"
  1630. }
  1631. ]
  1632. }
  1633. },
  1634. "response": []
  1635. },
  1636. {
  1637. "name": "playback",
  1638. "request": {
  1639. "method": "GET",
  1640. "header": [],
  1641. "url": {
  1642. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/playback",
  1643. "host": [
  1644. "{{baseUrl}}"
  1645. ],
  1646. "path": [
  1647. "api",
  1648. "stream",
  1649. "live",
  1650. ":liveInputId",
  1651. "playback"
  1652. ],
  1653. "variable": [
  1654. {
  1655. "key": "liveInputId",
  1656. "value": "live_input_id_here"
  1657. }
  1658. ]
  1659. }
  1660. },
  1661. "response": []
  1662. },
  1663. {
  1664. "name": "recordings",
  1665. "request": {
  1666. "method": "GET",
  1667. "header": [],
  1668. "url": {
  1669. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/recordings",
  1670. "host": [
  1671. "{{baseUrl}}"
  1672. ],
  1673. "path": [
  1674. "api",
  1675. "stream",
  1676. "live",
  1677. ":liveInputId",
  1678. "recordings"
  1679. ],
  1680. "variable": [
  1681. {
  1682. "key": "liveInputId",
  1683. "value": "live_input_id_here"
  1684. }
  1685. ]
  1686. }
  1687. },
  1688. "response": []
  1689. }
  1690. ]
  1691. }
  1692. ]
  1693. }
  1694. ]
  1695. }
  1696. ],
  1697. "auth": {
  1698. "type": "bearer",
  1699. "bearer": [
  1700. {
  1701. "key": "token",
  1702. "value": "{{accessToken}}",
  1703. "type": "string"
  1704. }
  1705. ]
  1706. },
  1707. "event": [
  1708. {
  1709. "listen": "prerequest",
  1710. "script": {
  1711. "type": "text/javascript",
  1712. "packages": {},
  1713. "requests": {},
  1714. "exec": [
  1715. ""
  1716. ]
  1717. }
  1718. },
  1719. {
  1720. "listen": "test",
  1721. "script": {
  1722. "type": "text/javascript",
  1723. "packages": {},
  1724. "requests": {},
  1725. "exec": [
  1726. ""
  1727. ]
  1728. }
  1729. }
  1730. ],
  1731. "variable": [
  1732. {
  1733. "key": "baseUrl",
  1734. "value": "http://localhost:8787"
  1735. },
  1736. {
  1737. "key": "accessToken",
  1738. "value": ""
  1739. },
  1740. {
  1741. "key": "refreshToken",
  1742. "value": ""
  1743. }
  1744. ]
  1745. }