tg-live-game.postman_collection.json 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398
  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": ["{{baseUrl}}"],
  47. "path": ["api", "auth", "register"]
  48. }
  49. },
  50. "response": []
  51. },
  52. {
  53. "name": "login",
  54. "event": [
  55. {
  56. "listen": "test",
  57. "script": {
  58. "exec": [
  59. "var jsonData = pm.response.json();",
  60. "if (jsonData.code === 200 && jsonData.data) {",
  61. " pm.collectionVariables.set('accessToken', jsonData.data.accessToken);",
  62. " pm.collectionVariables.set('refreshToken', jsonData.data.refreshToken);",
  63. "}"
  64. ],
  65. "type": "text/javascript",
  66. "packages": {},
  67. "requests": {}
  68. }
  69. }
  70. ],
  71. "request": {
  72. "method": "POST",
  73. "header": [
  74. {
  75. "key": "Content-Type",
  76. "value": "application/json"
  77. }
  78. ],
  79. "body": {
  80. "mode": "raw",
  81. "raw": "{\n \"username\": \"pwtk001\",\n \"password\": \"test123456\"\n}"
  82. },
  83. "url": {
  84. "raw": "{{baseUrl}}/api/auth/login",
  85. "host": ["{{baseUrl}}"],
  86. "path": ["api", "auth", "login"]
  87. }
  88. },
  89. "response": []
  90. },
  91. {
  92. "name": "refresh",
  93. "event": [
  94. {
  95. "listen": "test",
  96. "script": {
  97. "exec": [
  98. "var jsonData = pm.response.json();",
  99. "if (jsonData.code === 200 && jsonData.data) {",
  100. " pm.collectionVariables.set('accessToken', jsonData.data.accessToken);",
  101. " pm.collectionVariables.set('refreshToken', jsonData.data.refreshToken);",
  102. "}"
  103. ],
  104. "type": "text/javascript"
  105. }
  106. }
  107. ],
  108. "request": {
  109. "method": "POST",
  110. "header": [
  111. {
  112. "key": "Content-Type",
  113. "value": "application/json"
  114. }
  115. ],
  116. "body": {
  117. "mode": "raw",
  118. "raw": "{\n \"refreshToken\": \"{{refreshToken}}\"\n}"
  119. },
  120. "url": {
  121. "raw": "{{baseUrl}}/api/auth/refresh",
  122. "host": ["{{baseUrl}}"],
  123. "path": ["api", "auth", "refresh"]
  124. }
  125. },
  126. "response": []
  127. },
  128. {
  129. "name": "me",
  130. "request": {
  131. "method": "GET",
  132. "header": [],
  133. "url": {
  134. "raw": "{{baseUrl}}/api/auth/me",
  135. "host": ["{{baseUrl}}"],
  136. "path": ["api", "auth", "me"]
  137. }
  138. },
  139. "response": []
  140. },
  141. {
  142. "name": "change-password",
  143. "request": {
  144. "method": "POST",
  145. "header": [
  146. {
  147. "key": "Content-Type",
  148. "value": "application/json"
  149. }
  150. ],
  151. "body": {
  152. "mode": "raw",
  153. "raw": "{\n \"oldPassword\": \"admin123\",\n \"newPassword\": \"newpassword123\"\n}"
  154. },
  155. "url": {
  156. "raw": "{{baseUrl}}/api/auth/change-password",
  157. "host": ["{{baseUrl}}"],
  158. "path": ["api", "auth", "change-password"]
  159. }
  160. },
  161. "response": []
  162. },
  163. {
  164. "name": "logout",
  165. "request": {
  166. "method": "POST",
  167. "header": [],
  168. "url": {
  169. "raw": "{{baseUrl}}/api/auth/logout",
  170. "host": ["{{baseUrl}}"],
  171. "path": ["api", "auth", "logout"]
  172. }
  173. },
  174. "response": []
  175. }
  176. ]
  177. },
  178. {
  179. "name": "users",
  180. "item": [
  181. {
  182. "name": "permissions",
  183. "item": [
  184. {
  185. "name": "list",
  186. "request": {
  187. "method": "GET",
  188. "header": [],
  189. "url": {
  190. "raw": "{{baseUrl}}/api/users/:id/permissions",
  191. "host": ["{{baseUrl}}"],
  192. "path": ["api", "users", ":id", "permissions"],
  193. "variable": [
  194. {
  195. "key": "id",
  196. "value": "69270add987591d84a5385ecea3d5ab0"
  197. }
  198. ]
  199. }
  200. },
  201. "response": []
  202. },
  203. {
  204. "name": "add",
  205. "request": {
  206. "method": "POST",
  207. "header": [
  208. {
  209. "key": "Content-Type",
  210. "value": "application/json"
  211. }
  212. ],
  213. "body": {
  214. "mode": "raw",
  215. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"permission\": \"view\"\n}"
  216. },
  217. "url": {
  218. "raw": "{{baseUrl}}/api/users/:id/permissions",
  219. "host": ["{{baseUrl}}"],
  220. "path": ["api", "users", ":id", "permissions"],
  221. "variable": [
  222. {
  223. "key": "id",
  224. "value": "user_id_here"
  225. }
  226. ]
  227. }
  228. },
  229. "response": []
  230. },
  231. {
  232. "name": "delete",
  233. "request": {
  234. "method": "DELETE",
  235. "header": [],
  236. "url": {
  237. "raw": "{{baseUrl}}/api/users/:id/permissions/:permissionId",
  238. "host": ["{{baseUrl}}"],
  239. "path": ["api", "users", ":id", "permissions", ":permissionId"],
  240. "variable": [
  241. {
  242. "key": "id",
  243. "value": "user_id_here"
  244. },
  245. {
  246. "key": "permissionId",
  247. "value": "permission_id_here"
  248. }
  249. ]
  250. }
  251. },
  252. "response": []
  253. }
  254. ]
  255. },
  256. {
  257. "name": "list",
  258. "request": {
  259. "auth": {
  260. "type": "bearer",
  261. "bearer": [
  262. {
  263. "key": "token",
  264. "value": "{{accessToken}}",
  265. "type": "string"
  266. }
  267. ]
  268. },
  269. "method": "GET",
  270. "header": [],
  271. "url": {
  272. "raw": "{{baseUrl}}/api/users?page=1&pageSize=20",
  273. "host": ["{{baseUrl}}"],
  274. "path": ["api", "users"],
  275. "query": [
  276. {
  277. "key": "page",
  278. "value": "1"
  279. },
  280. {
  281. "key": "pageSize",
  282. "value": "20"
  283. },
  284. {
  285. "key": "role",
  286. "value": "",
  287. "disabled": true
  288. },
  289. {
  290. "key": "status",
  291. "value": "",
  292. "disabled": true
  293. },
  294. {
  295. "key": "search",
  296. "value": "",
  297. "disabled": true
  298. }
  299. ]
  300. }
  301. },
  302. "response": []
  303. },
  304. {
  305. "name": "get",
  306. "request": {
  307. "method": "GET",
  308. "header": [],
  309. "url": {
  310. "raw": "{{baseUrl}}/api/users/:id",
  311. "host": ["{{baseUrl}}"],
  312. "path": ["api", "users", ":id"],
  313. "variable": [
  314. {
  315. "key": "id",
  316. "value": "cdee69f27a05ae30d7b7622879ce1ddf"
  317. }
  318. ]
  319. }
  320. },
  321. "response": []
  322. },
  323. {
  324. "name": "create",
  325. "request": {
  326. "method": "POST",
  327. "header": [
  328. {
  329. "key": "Content-Type",
  330. "value": "application/json"
  331. }
  332. ],
  333. "body": {
  334. "mode": "raw",
  335. "raw": "{\n \"username\": \"newuser1\",\n \"password\": \"password123\",\n \"email\": \"newuser@example.com\",\n \"role\": \"viewer\"\n}"
  336. },
  337. "url": {
  338. "raw": "{{baseUrl}}/api/users",
  339. "host": ["{{baseUrl}}"],
  340. "path": ["api", "users"]
  341. }
  342. },
  343. "response": []
  344. },
  345. {
  346. "name": "update",
  347. "request": {
  348. "method": "PUT",
  349. "header": [
  350. {
  351. "key": "Content-Type",
  352. "value": "application/json"
  353. }
  354. ],
  355. "body": {
  356. "mode": "raw",
  357. "raw": "{\n \"email\": \"updated@example.com\",\n \"role\": \"operator\",\n \"status\": \"active\"\n}"
  358. },
  359. "url": {
  360. "raw": "{{baseUrl}}/api/users/:id",
  361. "host": ["{{baseUrl}}"],
  362. "path": ["api", "users", ":id"],
  363. "variable": [
  364. {
  365. "key": "id",
  366. "value": "db09b553ed4e1070be2f065c12e4fe81"
  367. }
  368. ]
  369. }
  370. },
  371. "response": []
  372. },
  373. {
  374. "name": "delete",
  375. "request": {
  376. "method": "DELETE",
  377. "header": [],
  378. "url": {
  379. "raw": "{{baseUrl}}/api/users/:id",
  380. "host": ["{{baseUrl}}"],
  381. "path": ["api", "users", ":id"],
  382. "variable": [
  383. {
  384. "key": "id",
  385. "value": "db09b553ed4e1070be2f065c12e4fe81"
  386. }
  387. ]
  388. }
  389. },
  390. "response": []
  391. }
  392. ]
  393. },
  394. {
  395. "name": "cameras",
  396. "item": [
  397. {
  398. "name": "list",
  399. "request": {
  400. "method": "GET",
  401. "header": [],
  402. "url": {
  403. "raw": "{{baseUrl}}/api/cameras?page=1&pageSize=20",
  404. "host": ["{{baseUrl}}"],
  405. "path": ["api", "cameras"],
  406. "query": [
  407. {
  408. "key": "page",
  409. "value": "1"
  410. },
  411. {
  412. "key": "pageSize",
  413. "value": "20"
  414. },
  415. {
  416. "key": "status",
  417. "value": "",
  418. "disabled": true
  419. },
  420. {
  421. "key": "type",
  422. "value": "",
  423. "disabled": true
  424. },
  425. {
  426. "key": "search",
  427. "value": "",
  428. "disabled": true
  429. }
  430. ]
  431. }
  432. },
  433. "response": []
  434. },
  435. {
  436. "name": "get",
  437. "request": {
  438. "method": "GET",
  439. "header": [],
  440. "url": {
  441. "raw": "{{baseUrl}}/api/cameras/:id",
  442. "host": ["{{baseUrl}}"],
  443. "path": ["api", "cameras", ":id"],
  444. "variable": [
  445. {
  446. "key": "id",
  447. "value": "camera_id_here"
  448. }
  449. ]
  450. }
  451. },
  452. "response": []
  453. },
  454. {
  455. "name": "create",
  456. "request": {
  457. "method": "POST",
  458. "header": [
  459. {
  460. "key": "Content-Type",
  461. "value": "application/json"
  462. }
  463. ],
  464. "body": {
  465. "mode": "raw",
  466. "raw": "{\n \"name\": \"Camera 1\",\n \"type\": \"rtsp\",\n \"protocol\": \"rtmps\",\n \"rtsp_url\": \"rtsp://example.com/stream\",\n \"location\": \"Room 101\"\n}"
  467. },
  468. "url": {
  469. "raw": "{{baseUrl}}/api/cameras",
  470. "host": ["{{baseUrl}}"],
  471. "path": ["api", "cameras"]
  472. }
  473. },
  474. "response": []
  475. },
  476. {
  477. "name": "update",
  478. "request": {
  479. "method": "PUT",
  480. "header": [
  481. {
  482. "key": "Content-Type",
  483. "value": "application/json"
  484. }
  485. ],
  486. "body": {
  487. "mode": "raw",
  488. "raw": "{\n \"name\": \"Camera 1 Updated\",\n \"location\": \"Room 102\",\n \"status\": \"online\"\n}"
  489. },
  490. "url": {
  491. "raw": "{{baseUrl}}/api/cameras/:id",
  492. "host": ["{{baseUrl}}"],
  493. "path": ["api", "cameras", ":id"],
  494. "variable": [
  495. {
  496. "key": "id",
  497. "value": "camera_id_here"
  498. }
  499. ]
  500. }
  501. },
  502. "response": []
  503. },
  504. {
  505. "name": "delete",
  506. "request": {
  507. "method": "DELETE",
  508. "header": [],
  509. "url": {
  510. "raw": "{{baseUrl}}/api/cameras/:id",
  511. "host": ["{{baseUrl}}"],
  512. "path": ["api", "cameras", ":id"],
  513. "variable": [
  514. {
  515. "key": "id",
  516. "value": "camera_id_here"
  517. }
  518. ]
  519. }
  520. },
  521. "response": []
  522. },
  523. {
  524. "name": "sessions",
  525. "request": {
  526. "method": "GET",
  527. "header": [],
  528. "url": {
  529. "raw": "{{baseUrl}}/api/cameras/:id/sessions?page=1&pageSize=20",
  530. "host": ["{{baseUrl}}"],
  531. "path": ["api", "cameras", ":id", "sessions"],
  532. "query": [
  533. {
  534. "key": "page",
  535. "value": "1"
  536. },
  537. {
  538. "key": "pageSize",
  539. "value": "20"
  540. },
  541. {
  542. "key": "status",
  543. "value": "",
  544. "disabled": true
  545. }
  546. ],
  547. "variable": [
  548. {
  549. "key": "id",
  550. "value": "camera_id_here"
  551. }
  552. ]
  553. }
  554. },
  555. "response": []
  556. }
  557. ]
  558. },
  559. {
  560. "name": "sessions",
  561. "item": [
  562. {
  563. "name": "list",
  564. "request": {
  565. "method": "GET",
  566. "header": [],
  567. "url": {
  568. "raw": "{{baseUrl}}/api/sessions?page=1&pageSize=20",
  569. "host": ["{{baseUrl}}"],
  570. "path": ["api", "sessions"],
  571. "query": [
  572. {
  573. "key": "page",
  574. "value": "1"
  575. },
  576. {
  577. "key": "pageSize",
  578. "value": "20"
  579. },
  580. {
  581. "key": "status",
  582. "value": "",
  583. "disabled": true
  584. },
  585. {
  586. "key": "camera_id",
  587. "value": "",
  588. "disabled": true
  589. }
  590. ]
  591. }
  592. },
  593. "response": []
  594. },
  595. {
  596. "name": "live",
  597. "request": {
  598. "method": "GET",
  599. "header": [],
  600. "url": {
  601. "raw": "{{baseUrl}}/api/sessions/live",
  602. "host": ["{{baseUrl}}"],
  603. "path": ["api", "sessions", "live"]
  604. }
  605. },
  606. "response": []
  607. },
  608. {
  609. "name": "get",
  610. "request": {
  611. "method": "GET",
  612. "header": [],
  613. "url": {
  614. "raw": "{{baseUrl}}/api/sessions/:id",
  615. "host": ["{{baseUrl}}"],
  616. "path": ["api", "sessions", ":id"],
  617. "variable": [
  618. {
  619. "key": "id",
  620. "value": "session_id_here"
  621. }
  622. ]
  623. }
  624. },
  625. "response": []
  626. },
  627. {
  628. "name": "start",
  629. "request": {
  630. "method": "POST",
  631. "header": [
  632. {
  633. "key": "Content-Type",
  634. "value": "application/json"
  635. }
  636. ],
  637. "body": {
  638. "mode": "raw",
  639. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"live_input_id\": \"live_input_id_here\"\n}"
  640. },
  641. "url": {
  642. "raw": "{{baseUrl}}/api/sessions",
  643. "host": ["{{baseUrl}}"],
  644. "path": ["api", "sessions"]
  645. }
  646. },
  647. "response": []
  648. },
  649. {
  650. "name": "end",
  651. "request": {
  652. "method": "PUT",
  653. "header": [
  654. {
  655. "key": "Content-Type",
  656. "value": "application/json"
  657. }
  658. ],
  659. "body": {
  660. "mode": "raw",
  661. "raw": "{\n \"recording_id\": \"recording_id_here\"\n}"
  662. },
  663. "url": {
  664. "raw": "{{baseUrl}}/api/sessions/:id/end",
  665. "host": ["{{baseUrl}}"],
  666. "path": ["api", "sessions", ":id", "end"],
  667. "variable": [
  668. {
  669. "key": "id",
  670. "value": "session_id_here"
  671. }
  672. ]
  673. }
  674. },
  675. "response": []
  676. },
  677. {
  678. "name": "update-viewers",
  679. "request": {
  680. "method": "PUT",
  681. "header": [
  682. {
  683. "key": "Content-Type",
  684. "value": "application/json"
  685. }
  686. ],
  687. "body": {
  688. "mode": "raw",
  689. "raw": "{\n \"viewer_count\": 100\n}"
  690. },
  691. "url": {
  692. "raw": "{{baseUrl}}/api/sessions/:id/viewers",
  693. "host": ["{{baseUrl}}"],
  694. "path": ["api", "sessions", ":id", "viewers"],
  695. "variable": [
  696. {
  697. "key": "id",
  698. "value": "session_id_here"
  699. }
  700. ]
  701. }
  702. },
  703. "response": []
  704. },
  705. {
  706. "name": "stats",
  707. "request": {
  708. "method": "GET",
  709. "header": [],
  710. "url": {
  711. "raw": "{{baseUrl}}/api/sessions/:id/stats",
  712. "host": ["{{baseUrl}}"],
  713. "path": ["api", "sessions", ":id", "stats"],
  714. "variable": [
  715. {
  716. "key": "id",
  717. "value": "session_id_here"
  718. }
  719. ]
  720. }
  721. },
  722. "response": []
  723. },
  724. {
  725. "name": "delete",
  726. "request": {
  727. "method": "DELETE",
  728. "header": [],
  729. "url": {
  730. "raw": "{{baseUrl}}/api/sessions/:id",
  731. "host": ["{{baseUrl}}"],
  732. "path": ["api", "sessions", ":id"],
  733. "variable": [
  734. {
  735. "key": "id",
  736. "value": "session_id_here"
  737. }
  738. ]
  739. }
  740. },
  741. "response": []
  742. }
  743. ]
  744. },
  745. {
  746. "name": "stats",
  747. "item": [
  748. {
  749. "name": "view",
  750. "item": [
  751. {
  752. "name": "start",
  753. "request": {
  754. "auth": {
  755. "type": "noauth"
  756. },
  757. "method": "POST",
  758. "header": [
  759. {
  760. "key": "Content-Type",
  761. "value": "application/json"
  762. }
  763. ],
  764. "body": {
  765. "mode": "raw",
  766. "raw": "{\n \"video_id\": \"video_id_here\"\n}"
  767. },
  768. "url": {
  769. "raw": "{{baseUrl}}/api/stats/view/start",
  770. "host": ["{{baseUrl}}"],
  771. "path": ["api", "stats", "view", "start"]
  772. }
  773. },
  774. "response": []
  775. },
  776. {
  777. "name": "end",
  778. "request": {
  779. "auth": {
  780. "type": "noauth"
  781. },
  782. "method": "POST",
  783. "header": [
  784. {
  785. "key": "Content-Type",
  786. "value": "application/json"
  787. }
  788. ],
  789. "body": {
  790. "mode": "raw",
  791. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 300\n}"
  792. },
  793. "url": {
  794. "raw": "{{baseUrl}}/api/stats/view/end",
  795. "host": ["{{baseUrl}}"],
  796. "path": ["api", "stats", "view", "end"]
  797. }
  798. },
  799. "response": []
  800. },
  801. {
  802. "name": "heartbeat",
  803. "request": {
  804. "auth": {
  805. "type": "noauth"
  806. },
  807. "method": "POST",
  808. "header": [
  809. {
  810. "key": "Content-Type",
  811. "value": "application/json"
  812. }
  813. ],
  814. "body": {
  815. "mode": "raw",
  816. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 60\n}"
  817. },
  818. "url": {
  819. "raw": "{{baseUrl}}/api/stats/view/heartbeat",
  820. "host": ["{{baseUrl}}"],
  821. "path": ["api", "stats", "view", "heartbeat"]
  822. }
  823. },
  824. "response": []
  825. }
  826. ]
  827. },
  828. {
  829. "name": "video",
  830. "request": {
  831. "method": "GET",
  832. "header": [],
  833. "url": {
  834. "raw": "{{baseUrl}}/api/stats/video/:videoId",
  835. "host": ["{{baseUrl}}"],
  836. "path": ["api", "stats", "video", ":videoId"],
  837. "variable": [
  838. {
  839. "key": "videoId",
  840. "value": "video_id_here"
  841. }
  842. ]
  843. }
  844. },
  845. "response": []
  846. },
  847. {
  848. "name": "session",
  849. "request": {
  850. "method": "GET",
  851. "header": [],
  852. "url": {
  853. "raw": "{{baseUrl}}/api/stats/session/:sessionId",
  854. "host": ["{{baseUrl}}"],
  855. "path": ["api", "stats", "session", ":sessionId"],
  856. "variable": [
  857. {
  858. "key": "sessionId",
  859. "value": "session_id_here"
  860. }
  861. ]
  862. }
  863. },
  864. "response": []
  865. },
  866. {
  867. "name": "overview",
  868. "request": {
  869. "method": "GET",
  870. "header": [],
  871. "url": {
  872. "raw": "{{baseUrl}}/api/stats/overview?days=7",
  873. "host": ["{{baseUrl}}"],
  874. "path": ["api", "stats", "overview"],
  875. "query": [
  876. {
  877. "key": "days",
  878. "value": "7"
  879. }
  880. ]
  881. }
  882. },
  883. "response": []
  884. },
  885. {
  886. "name": "views",
  887. "request": {
  888. "method": "GET",
  889. "header": [],
  890. "url": {
  891. "raw": "{{baseUrl}}/api/stats/views?page=1&pageSize=50",
  892. "host": ["{{baseUrl}}"],
  893. "path": ["api", "stats", "views"],
  894. "query": [
  895. {
  896. "key": "page",
  897. "value": "1"
  898. },
  899. {
  900. "key": "pageSize",
  901. "value": "50"
  902. },
  903. {
  904. "key": "video_id",
  905. "value": "",
  906. "disabled": true
  907. },
  908. {
  909. "key": "session_id",
  910. "value": "",
  911. "disabled": true
  912. },
  913. {
  914. "key": "user_id",
  915. "value": "",
  916. "disabled": true
  917. }
  918. ]
  919. }
  920. },
  921. "response": []
  922. }
  923. ]
  924. },
  925. {
  926. "name": "audit-logs",
  927. "item": [
  928. {
  929. "name": "stats",
  930. "item": [
  931. {
  932. "name": "summary",
  933. "request": {
  934. "method": "GET",
  935. "header": [],
  936. "url": {
  937. "raw": "{{baseUrl}}/api/audit-logs/stats/summary?days=7",
  938. "host": ["{{baseUrl}}"],
  939. "path": ["api", "audit-logs", "stats", "summary"],
  940. "query": [
  941. {
  942. "key": "days",
  943. "value": "7"
  944. }
  945. ]
  946. }
  947. },
  948. "response": []
  949. }
  950. ]
  951. },
  952. {
  953. "name": "list",
  954. "request": {
  955. "method": "GET",
  956. "header": [],
  957. "url": {
  958. "raw": "{{baseUrl}}/api/audit-logs?page=1&pageSize=50",
  959. "host": ["{{baseUrl}}"],
  960. "path": ["api", "audit-logs"],
  961. "query": [
  962. {
  963. "key": "page",
  964. "value": "1"
  965. },
  966. {
  967. "key": "pageSize",
  968. "value": "50"
  969. },
  970. {
  971. "key": "action",
  972. "value": "",
  973. "disabled": true
  974. },
  975. {
  976. "key": "resource",
  977. "value": "",
  978. "disabled": true
  979. },
  980. {
  981. "key": "user_id",
  982. "value": "",
  983. "disabled": true
  984. },
  985. {
  986. "key": "start_date",
  987. "value": "",
  988. "disabled": true
  989. },
  990. {
  991. "key": "end_date",
  992. "value": "",
  993. "disabled": true
  994. }
  995. ]
  996. }
  997. },
  998. "response": []
  999. },
  1000. {
  1001. "name": "get",
  1002. "request": {
  1003. "method": "GET",
  1004. "header": [],
  1005. "url": {
  1006. "raw": "{{baseUrl}}/api/audit-logs/:id",
  1007. "host": ["{{baseUrl}}"],
  1008. "path": ["api", "audit-logs", ":id"],
  1009. "variable": [
  1010. {
  1011. "key": "id",
  1012. "value": "log_id_here"
  1013. }
  1014. ]
  1015. }
  1016. },
  1017. "response": []
  1018. },
  1019. {
  1020. "name": "user",
  1021. "request": {
  1022. "method": "GET",
  1023. "header": [],
  1024. "url": {
  1025. "raw": "{{baseUrl}}/api/audit-logs/user/:userId?page=1&pageSize=20",
  1026. "host": ["{{baseUrl}}"],
  1027. "path": ["api", "audit-logs", "user", ":userId"],
  1028. "query": [
  1029. {
  1030. "key": "page",
  1031. "value": "1"
  1032. },
  1033. {
  1034. "key": "pageSize",
  1035. "value": "20"
  1036. }
  1037. ],
  1038. "variable": [
  1039. {
  1040. "key": "userId",
  1041. "value": "user_id_here"
  1042. }
  1043. ]
  1044. }
  1045. },
  1046. "response": []
  1047. },
  1048. {
  1049. "name": "resource",
  1050. "request": {
  1051. "method": "GET",
  1052. "header": [],
  1053. "url": {
  1054. "raw": "{{baseUrl}}/api/audit-logs/resource/:resource/:resourceId?page=1&pageSize=20",
  1055. "host": ["{{baseUrl}}"],
  1056. "path": ["api", "audit-logs", "resource", ":resource", ":resourceId"],
  1057. "query": [
  1058. {
  1059. "key": "page",
  1060. "value": "1"
  1061. },
  1062. {
  1063. "key": "pageSize",
  1064. "value": "20"
  1065. }
  1066. ],
  1067. "variable": [
  1068. {
  1069. "key": "resource",
  1070. "value": "camera"
  1071. },
  1072. {
  1073. "key": "resourceId",
  1074. "value": "resource_id_here"
  1075. }
  1076. ]
  1077. }
  1078. },
  1079. "response": []
  1080. }
  1081. ]
  1082. },
  1083. {
  1084. "name": "stream",
  1085. "item": [
  1086. {
  1087. "name": "video",
  1088. "item": [
  1089. {
  1090. "name": "list",
  1091. "request": {
  1092. "method": "GET",
  1093. "header": [],
  1094. "url": {
  1095. "raw": "{{baseUrl}}/api/stream/video/list",
  1096. "host": ["{{baseUrl}}"],
  1097. "path": ["api", "stream", "video", "list"]
  1098. }
  1099. },
  1100. "response": []
  1101. },
  1102. {
  1103. "name": "get",
  1104. "request": {
  1105. "method": "GET",
  1106. "header": [],
  1107. "url": {
  1108. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  1109. "host": ["{{baseUrl}}"],
  1110. "path": ["api", "stream", "video", ":videoId"],
  1111. "variable": [
  1112. {
  1113. "key": "videoId",
  1114. "value": "video_id_here"
  1115. }
  1116. ]
  1117. }
  1118. },
  1119. "response": []
  1120. },
  1121. {
  1122. "name": "delete",
  1123. "request": {
  1124. "method": "DELETE",
  1125. "header": [],
  1126. "url": {
  1127. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  1128. "host": ["{{baseUrl}}"],
  1129. "path": ["api", "stream", "video", ":videoId"],
  1130. "variable": [
  1131. {
  1132. "key": "videoId",
  1133. "value": "video_id_here"
  1134. }
  1135. ]
  1136. }
  1137. },
  1138. "response": []
  1139. },
  1140. {
  1141. "name": "import",
  1142. "request": {
  1143. "method": "POST",
  1144. "header": [
  1145. {
  1146. "key": "Content-Type",
  1147. "value": "application/json"
  1148. }
  1149. ],
  1150. "body": {
  1151. "mode": "raw",
  1152. "raw": "{\n \"url\": \"https://example.com/video.mp4\",\n \"meta\": {\n \"name\": \"My Video\"\n }\n}"
  1153. },
  1154. "url": {
  1155. "raw": "{{baseUrl}}/api/stream/video/import",
  1156. "host": ["{{baseUrl}}"],
  1157. "path": ["api", "stream", "video", "import"]
  1158. }
  1159. },
  1160. "response": []
  1161. },
  1162. {
  1163. "name": "upload-url",
  1164. "request": {
  1165. "method": "POST",
  1166. "header": [
  1167. {
  1168. "key": "Content-Type",
  1169. "value": "application/json"
  1170. }
  1171. ],
  1172. "body": {
  1173. "mode": "raw",
  1174. "raw": "{\n \"maxDurationSeconds\": 3600,\n \"meta\": {\n \"name\": \"My Upload\"\n }\n}"
  1175. },
  1176. "url": {
  1177. "raw": "{{baseUrl}}/api/stream/video/upload-url",
  1178. "host": ["{{baseUrl}}"],
  1179. "path": ["api", "stream", "video", "upload-url"]
  1180. }
  1181. },
  1182. "response": []
  1183. },
  1184. {
  1185. "name": "playback",
  1186. "request": {
  1187. "method": "GET",
  1188. "header": [],
  1189. "url": {
  1190. "raw": "{{baseUrl}}/api/stream/video/:videoId/playback",
  1191. "host": ["{{baseUrl}}"],
  1192. "path": ["api", "stream", "video", ":videoId", "playback"],
  1193. "variable": [
  1194. {
  1195. "key": "videoId",
  1196. "value": "video_id_here"
  1197. }
  1198. ]
  1199. }
  1200. },
  1201. "response": []
  1202. }
  1203. ]
  1204. },
  1205. {
  1206. "name": "live",
  1207. "item": [
  1208. {
  1209. "name": "list",
  1210. "request": {
  1211. "method": "GET",
  1212. "header": [],
  1213. "url": {
  1214. "raw": "{{baseUrl}}/api/stream/live/list",
  1215. "host": ["{{baseUrl}}"],
  1216. "path": ["api", "stream", "live", "list"]
  1217. }
  1218. },
  1219. "response": []
  1220. },
  1221. {
  1222. "name": "create",
  1223. "request": {
  1224. "method": "POST",
  1225. "header": [
  1226. {
  1227. "key": "Content-Type",
  1228. "value": "application/json"
  1229. }
  1230. ],
  1231. "body": {
  1232. "mode": "raw",
  1233. "raw": "{\n \"meta\": {\n \"name\": \"My Live Stream\"\n },\n \"recording\": {\n \"mode\": \"automatic\"\n }\n}"
  1234. },
  1235. "url": {
  1236. "raw": "{{baseUrl}}/api/stream/live",
  1237. "host": ["{{baseUrl}}"],
  1238. "path": ["api", "stream", "live"]
  1239. }
  1240. },
  1241. "response": []
  1242. },
  1243. {
  1244. "name": "get",
  1245. "request": {
  1246. "method": "GET",
  1247. "header": [],
  1248. "url": {
  1249. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1250. "host": ["{{baseUrl}}"],
  1251. "path": ["api", "stream", "live", ":liveInputId"],
  1252. "variable": [
  1253. {
  1254. "key": "liveInputId",
  1255. "value": "live_input_id_here"
  1256. }
  1257. ]
  1258. }
  1259. },
  1260. "response": []
  1261. },
  1262. {
  1263. "name": "update",
  1264. "request": {
  1265. "method": "PUT",
  1266. "header": [
  1267. {
  1268. "key": "Content-Type",
  1269. "value": "application/json"
  1270. }
  1271. ],
  1272. "body": {
  1273. "mode": "raw",
  1274. "raw": "{\n \"meta\": {\n \"name\": \"Updated Live Stream\"\n }\n}"
  1275. },
  1276. "url": {
  1277. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1278. "host": ["{{baseUrl}}"],
  1279. "path": ["api", "stream", "live", ":liveInputId"],
  1280. "variable": [
  1281. {
  1282. "key": "liveInputId",
  1283. "value": "live_input_id_here"
  1284. }
  1285. ]
  1286. }
  1287. },
  1288. "response": []
  1289. },
  1290. {
  1291. "name": "delete",
  1292. "request": {
  1293. "method": "DELETE",
  1294. "header": [],
  1295. "url": {
  1296. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  1297. "host": ["{{baseUrl}}"],
  1298. "path": ["api", "stream", "live", ":liveInputId"],
  1299. "variable": [
  1300. {
  1301. "key": "liveInputId",
  1302. "value": "live_input_id_here"
  1303. }
  1304. ]
  1305. }
  1306. },
  1307. "response": []
  1308. },
  1309. {
  1310. "name": "playback",
  1311. "request": {
  1312. "method": "GET",
  1313. "header": [],
  1314. "url": {
  1315. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/playback",
  1316. "host": ["{{baseUrl}}"],
  1317. "path": ["api", "stream", "live", ":liveInputId", "playback"],
  1318. "variable": [
  1319. {
  1320. "key": "liveInputId",
  1321. "value": "live_input_id_here"
  1322. }
  1323. ]
  1324. }
  1325. },
  1326. "response": []
  1327. },
  1328. {
  1329. "name": "recordings",
  1330. "request": {
  1331. "method": "GET",
  1332. "header": [],
  1333. "url": {
  1334. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/recordings",
  1335. "host": ["{{baseUrl}}"],
  1336. "path": ["api", "stream", "live", ":liveInputId", "recordings"],
  1337. "variable": [
  1338. {
  1339. "key": "liveInputId",
  1340. "value": "live_input_id_here"
  1341. }
  1342. ]
  1343. }
  1344. },
  1345. "response": []
  1346. }
  1347. ]
  1348. }
  1349. ]
  1350. }
  1351. ]
  1352. }
  1353. ],
  1354. "auth": {
  1355. "type": "bearer",
  1356. "bearer": [
  1357. {
  1358. "key": "token",
  1359. "value": "{{accessToken}}",
  1360. "type": "string"
  1361. }
  1362. ]
  1363. },
  1364. "event": [
  1365. {
  1366. "listen": "prerequest",
  1367. "script": {
  1368. "type": "text/javascript",
  1369. "packages": {},
  1370. "requests": {},
  1371. "exec": [""]
  1372. }
  1373. },
  1374. {
  1375. "listen": "test",
  1376. "script": {
  1377. "type": "text/javascript",
  1378. "packages": {},
  1379. "requests": {},
  1380. "exec": [""]
  1381. }
  1382. }
  1383. ],
  1384. "variable": [
  1385. {
  1386. "key": "baseUrl",
  1387. "value": "http://localhost:8787"
  1388. },
  1389. {
  1390. "key": "accessToken",
  1391. "value": ""
  1392. },
  1393. {
  1394. "key": "refreshToken",
  1395. "value": ""
  1396. }
  1397. ]
  1398. }