postman_collection.json 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. {
  2. "info": {
  3. "name": "tg-live-game",
  4. "description": "TG Live Game Backend API Collection",
  5. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  6. },
  7. "variable": [
  8. {
  9. "key": "baseUrl",
  10. "value": "http://localhost:8787",
  11. "type": "string"
  12. },
  13. {
  14. "key": "accessToken",
  15. "value": "",
  16. "type": "string"
  17. },
  18. {
  19. "key": "refreshToken",
  20. "value": "",
  21. "type": "string"
  22. }
  23. ],
  24. "auth": {
  25. "type": "bearer",
  26. "bearer": [
  27. {
  28. "key": "token",
  29. "value": "{{accessToken}}",
  30. "type": "string"
  31. }
  32. ]
  33. },
  34. "item": [
  35. {
  36. "name": "tg-live-game-hono",
  37. "item": [
  38. {
  39. "name": "auth",
  40. "item": [
  41. {
  42. "name": "register",
  43. "request": {
  44. "method": "POST",
  45. "header": [
  46. { "key": "Content-Type", "value": "application/json" }
  47. ],
  48. "body": {
  49. "mode": "raw",
  50. "raw": "{\n \"username\": \"testuser\",\n \"password\": \"test123456\",\n \"email\": \"test@example.com\"\n}"
  51. },
  52. "url": {
  53. "raw": "{{baseUrl}}/api/auth/register",
  54. "host": ["{{baseUrl}}"],
  55. "path": ["api", "auth", "register"]
  56. }
  57. }
  58. },
  59. {
  60. "name": "login",
  61. "event": [
  62. {
  63. "listen": "test",
  64. "script": {
  65. "exec": [
  66. "var jsonData = pm.response.json();",
  67. "if (jsonData.code === 200 && jsonData.data) {",
  68. " pm.collectionVariables.set('accessToken', jsonData.data.accessToken);",
  69. " pm.collectionVariables.set('refreshToken', jsonData.data.refreshToken);",
  70. "}"
  71. ],
  72. "type": "text/javascript"
  73. }
  74. }
  75. ],
  76. "request": {
  77. "method": "POST",
  78. "header": [
  79. { "key": "Content-Type", "value": "application/json" }
  80. ],
  81. "body": {
  82. "mode": "raw",
  83. "raw": "{\n \"username\": \"admin\",\n \"password\": \"admin123\"\n}"
  84. },
  85. "url": {
  86. "raw": "{{baseUrl}}/api/auth/login",
  87. "host": ["{{baseUrl}}"],
  88. "path": ["api", "auth", "login"]
  89. }
  90. }
  91. },
  92. {
  93. "name": "refresh",
  94. "event": [
  95. {
  96. "listen": "test",
  97. "script": {
  98. "exec": [
  99. "var jsonData = pm.response.json();",
  100. "if (jsonData.code === 200 && jsonData.data) {",
  101. " pm.collectionVariables.set('accessToken', jsonData.data.accessToken);",
  102. " pm.collectionVariables.set('refreshToken', jsonData.data.refreshToken);",
  103. "}"
  104. ],
  105. "type": "text/javascript"
  106. }
  107. }
  108. ],
  109. "request": {
  110. "method": "POST",
  111. "header": [
  112. { "key": "Content-Type", "value": "application/json" }
  113. ],
  114. "body": {
  115. "mode": "raw",
  116. "raw": "{\n \"refreshToken\": \"{{refreshToken}}\"\n}"
  117. },
  118. "url": {
  119. "raw": "{{baseUrl}}/api/auth/refresh",
  120. "host": ["{{baseUrl}}"],
  121. "path": ["api", "auth", "refresh"]
  122. }
  123. }
  124. },
  125. {
  126. "name": "me",
  127. "request": {
  128. "method": "GET",
  129. "header": [],
  130. "url": {
  131. "raw": "{{baseUrl}}/api/auth/me",
  132. "host": ["{{baseUrl}}"],
  133. "path": ["api", "auth", "me"]
  134. }
  135. }
  136. },
  137. {
  138. "name": "change-password",
  139. "request": {
  140. "method": "POST",
  141. "header": [
  142. { "key": "Content-Type", "value": "application/json" }
  143. ],
  144. "body": {
  145. "mode": "raw",
  146. "raw": "{\n \"oldPassword\": \"admin123\",\n \"newPassword\": \"newpassword123\"\n}"
  147. },
  148. "url": {
  149. "raw": "{{baseUrl}}/api/auth/change-password",
  150. "host": ["{{baseUrl}}"],
  151. "path": ["api", "auth", "change-password"]
  152. }
  153. }
  154. },
  155. {
  156. "name": "logout",
  157. "request": {
  158. "method": "POST",
  159. "header": [],
  160. "url": {
  161. "raw": "{{baseUrl}}/api/auth/logout",
  162. "host": ["{{baseUrl}}"],
  163. "path": ["api", "auth", "logout"]
  164. }
  165. }
  166. }
  167. ]
  168. },
  169. {
  170. "name": "users",
  171. "item": [
  172. {
  173. "name": "list",
  174. "request": {
  175. "method": "GET",
  176. "header": [],
  177. "url": {
  178. "raw": "{{baseUrl}}/api/users?page=1&pageSize=20",
  179. "host": ["{{baseUrl}}"],
  180. "path": ["api", "users"],
  181. "query": [
  182. { "key": "page", "value": "1" },
  183. { "key": "pageSize", "value": "20" },
  184. { "key": "role", "value": "", "disabled": true },
  185. { "key": "status", "value": "", "disabled": true },
  186. { "key": "search", "value": "", "disabled": true }
  187. ]
  188. }
  189. }
  190. },
  191. {
  192. "name": "get",
  193. "request": {
  194. "method": "GET",
  195. "header": [],
  196. "url": {
  197. "raw": "{{baseUrl}}/api/users/:id",
  198. "host": ["{{baseUrl}}"],
  199. "path": ["api", "users", ":id"],
  200. "variable": [
  201. { "key": "id", "value": "user_id_here" }
  202. ]
  203. }
  204. }
  205. },
  206. {
  207. "name": "create",
  208. "request": {
  209. "method": "POST",
  210. "header": [
  211. { "key": "Content-Type", "value": "application/json" }
  212. ],
  213. "body": {
  214. "mode": "raw",
  215. "raw": "{\n \"username\": \"newuser\",\n \"password\": \"password123\",\n \"email\": \"newuser@example.com\",\n \"role\": \"viewer\"\n}"
  216. },
  217. "url": {
  218. "raw": "{{baseUrl}}/api/users",
  219. "host": ["{{baseUrl}}"],
  220. "path": ["api", "users"]
  221. }
  222. }
  223. },
  224. {
  225. "name": "update",
  226. "request": {
  227. "method": "PUT",
  228. "header": [
  229. { "key": "Content-Type", "value": "application/json" }
  230. ],
  231. "body": {
  232. "mode": "raw",
  233. "raw": "{\n \"email\": \"updated@example.com\",\n \"role\": \"operator\",\n \"status\": \"active\"\n}"
  234. },
  235. "url": {
  236. "raw": "{{baseUrl}}/api/users/:id",
  237. "host": ["{{baseUrl}}"],
  238. "path": ["api", "users", ":id"],
  239. "variable": [
  240. { "key": "id", "value": "user_id_here" }
  241. ]
  242. }
  243. }
  244. },
  245. {
  246. "name": "delete",
  247. "request": {
  248. "method": "DELETE",
  249. "header": [],
  250. "url": {
  251. "raw": "{{baseUrl}}/api/users/:id",
  252. "host": ["{{baseUrl}}"],
  253. "path": ["api", "users", ":id"],
  254. "variable": [
  255. { "key": "id", "value": "user_id_here" }
  256. ]
  257. }
  258. }
  259. },
  260. {
  261. "name": "permissions",
  262. "item": [
  263. {
  264. "name": "list",
  265. "request": {
  266. "method": "GET",
  267. "header": [],
  268. "url": {
  269. "raw": "{{baseUrl}}/api/users/:id/permissions",
  270. "host": ["{{baseUrl}}"],
  271. "path": ["api", "users", ":id", "permissions"],
  272. "variable": [
  273. { "key": "id", "value": "user_id_here" }
  274. ]
  275. }
  276. }
  277. },
  278. {
  279. "name": "add",
  280. "request": {
  281. "method": "POST",
  282. "header": [
  283. { "key": "Content-Type", "value": "application/json" }
  284. ],
  285. "body": {
  286. "mode": "raw",
  287. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"permission\": \"view\"\n}"
  288. },
  289. "url": {
  290. "raw": "{{baseUrl}}/api/users/:id/permissions",
  291. "host": ["{{baseUrl}}"],
  292. "path": ["api", "users", ":id", "permissions"],
  293. "variable": [
  294. { "key": "id", "value": "user_id_here" }
  295. ]
  296. }
  297. }
  298. },
  299. {
  300. "name": "delete",
  301. "request": {
  302. "method": "DELETE",
  303. "header": [],
  304. "url": {
  305. "raw": "{{baseUrl}}/api/users/:id/permissions/:permissionId",
  306. "host": ["{{baseUrl}}"],
  307. "path": ["api", "users", ":id", "permissions", ":permissionId"],
  308. "variable": [
  309. { "key": "id", "value": "user_id_here" },
  310. { "key": "permissionId", "value": "permission_id_here" }
  311. ]
  312. }
  313. }
  314. }
  315. ]
  316. }
  317. ]
  318. },
  319. {
  320. "name": "cameras",
  321. "item": [
  322. {
  323. "name": "list",
  324. "request": {
  325. "method": "GET",
  326. "header": [],
  327. "url": {
  328. "raw": "{{baseUrl}}/api/cameras?page=1&pageSize=20",
  329. "host": ["{{baseUrl}}"],
  330. "path": ["api", "cameras"],
  331. "query": [
  332. { "key": "page", "value": "1" },
  333. { "key": "pageSize", "value": "20" },
  334. { "key": "status", "value": "", "disabled": true },
  335. { "key": "type", "value": "", "disabled": true },
  336. { "key": "search", "value": "", "disabled": true }
  337. ]
  338. }
  339. }
  340. },
  341. {
  342. "name": "get",
  343. "request": {
  344. "method": "GET",
  345. "header": [],
  346. "url": {
  347. "raw": "{{baseUrl}}/api/cameras/:id",
  348. "host": ["{{baseUrl}}"],
  349. "path": ["api", "cameras", ":id"],
  350. "variable": [
  351. { "key": "id", "value": "camera_id_here" }
  352. ]
  353. }
  354. }
  355. },
  356. {
  357. "name": "create",
  358. "request": {
  359. "method": "POST",
  360. "header": [
  361. { "key": "Content-Type", "value": "application/json" }
  362. ],
  363. "body": {
  364. "mode": "raw",
  365. "raw": "{\n \"name\": \"Camera 1\",\n \"type\": \"rtsp\",\n \"protocol\": \"rtmps\",\n \"rtsp_url\": \"rtsp://example.com/stream\",\n \"location\": \"Room 101\"\n}"
  366. },
  367. "url": {
  368. "raw": "{{baseUrl}}/api/cameras",
  369. "host": ["{{baseUrl}}"],
  370. "path": ["api", "cameras"]
  371. }
  372. }
  373. },
  374. {
  375. "name": "update",
  376. "request": {
  377. "method": "PUT",
  378. "header": [
  379. { "key": "Content-Type", "value": "application/json" }
  380. ],
  381. "body": {
  382. "mode": "raw",
  383. "raw": "{\n \"name\": \"Camera 1 Updated\",\n \"location\": \"Room 102\",\n \"status\": \"online\"\n}"
  384. },
  385. "url": {
  386. "raw": "{{baseUrl}}/api/cameras/:id",
  387. "host": ["{{baseUrl}}"],
  388. "path": ["api", "cameras", ":id"],
  389. "variable": [
  390. { "key": "id", "value": "camera_id_here" }
  391. ]
  392. }
  393. }
  394. },
  395. {
  396. "name": "delete",
  397. "request": {
  398. "method": "DELETE",
  399. "header": [],
  400. "url": {
  401. "raw": "{{baseUrl}}/api/cameras/:id",
  402. "host": ["{{baseUrl}}"],
  403. "path": ["api", "cameras", ":id"],
  404. "variable": [
  405. { "key": "id", "value": "camera_id_here" }
  406. ]
  407. }
  408. }
  409. },
  410. {
  411. "name": "sessions",
  412. "request": {
  413. "method": "GET",
  414. "header": [],
  415. "url": {
  416. "raw": "{{baseUrl}}/api/cameras/:id/sessions?page=1&pageSize=20",
  417. "host": ["{{baseUrl}}"],
  418. "path": ["api", "cameras", ":id", "sessions"],
  419. "query": [
  420. { "key": "page", "value": "1" },
  421. { "key": "pageSize", "value": "20" },
  422. { "key": "status", "value": "", "disabled": true }
  423. ],
  424. "variable": [
  425. { "key": "id", "value": "camera_id_here" }
  426. ]
  427. }
  428. }
  429. }
  430. ]
  431. },
  432. {
  433. "name": "sessions",
  434. "item": [
  435. {
  436. "name": "list",
  437. "request": {
  438. "method": "GET",
  439. "header": [],
  440. "url": {
  441. "raw": "{{baseUrl}}/api/sessions?page=1&pageSize=20",
  442. "host": ["{{baseUrl}}"],
  443. "path": ["api", "sessions"],
  444. "query": [
  445. { "key": "page", "value": "1" },
  446. { "key": "pageSize", "value": "20" },
  447. { "key": "status", "value": "", "disabled": true },
  448. { "key": "camera_id", "value": "", "disabled": true }
  449. ]
  450. }
  451. }
  452. },
  453. {
  454. "name": "live",
  455. "request": {
  456. "method": "GET",
  457. "header": [],
  458. "url": {
  459. "raw": "{{baseUrl}}/api/sessions/live",
  460. "host": ["{{baseUrl}}"],
  461. "path": ["api", "sessions", "live"]
  462. }
  463. }
  464. },
  465. {
  466. "name": "get",
  467. "request": {
  468. "method": "GET",
  469. "header": [],
  470. "url": {
  471. "raw": "{{baseUrl}}/api/sessions/:id",
  472. "host": ["{{baseUrl}}"],
  473. "path": ["api", "sessions", ":id"],
  474. "variable": [
  475. { "key": "id", "value": "session_id_here" }
  476. ]
  477. }
  478. }
  479. },
  480. {
  481. "name": "start",
  482. "request": {
  483. "method": "POST",
  484. "header": [
  485. { "key": "Content-Type", "value": "application/json" }
  486. ],
  487. "body": {
  488. "mode": "raw",
  489. "raw": "{\n \"camera_id\": \"camera_id_here\",\n \"live_input_id\": \"live_input_id_here\"\n}"
  490. },
  491. "url": {
  492. "raw": "{{baseUrl}}/api/sessions",
  493. "host": ["{{baseUrl}}"],
  494. "path": ["api", "sessions"]
  495. }
  496. }
  497. },
  498. {
  499. "name": "end",
  500. "request": {
  501. "method": "PUT",
  502. "header": [
  503. { "key": "Content-Type", "value": "application/json" }
  504. ],
  505. "body": {
  506. "mode": "raw",
  507. "raw": "{\n \"recording_id\": \"recording_id_here\"\n}"
  508. },
  509. "url": {
  510. "raw": "{{baseUrl}}/api/sessions/:id/end",
  511. "host": ["{{baseUrl}}"],
  512. "path": ["api", "sessions", ":id", "end"],
  513. "variable": [
  514. { "key": "id", "value": "session_id_here" }
  515. ]
  516. }
  517. }
  518. },
  519. {
  520. "name": "update-viewers",
  521. "request": {
  522. "method": "PUT",
  523. "header": [
  524. { "key": "Content-Type", "value": "application/json" }
  525. ],
  526. "body": {
  527. "mode": "raw",
  528. "raw": "{\n \"viewer_count\": 100\n}"
  529. },
  530. "url": {
  531. "raw": "{{baseUrl}}/api/sessions/:id/viewers",
  532. "host": ["{{baseUrl}}"],
  533. "path": ["api", "sessions", ":id", "viewers"],
  534. "variable": [
  535. { "key": "id", "value": "session_id_here" }
  536. ]
  537. }
  538. }
  539. },
  540. {
  541. "name": "stats",
  542. "request": {
  543. "method": "GET",
  544. "header": [],
  545. "url": {
  546. "raw": "{{baseUrl}}/api/sessions/:id/stats",
  547. "host": ["{{baseUrl}}"],
  548. "path": ["api", "sessions", ":id", "stats"],
  549. "variable": [
  550. { "key": "id", "value": "session_id_here" }
  551. ]
  552. }
  553. }
  554. },
  555. {
  556. "name": "delete",
  557. "request": {
  558. "method": "DELETE",
  559. "header": [],
  560. "url": {
  561. "raw": "{{baseUrl}}/api/sessions/:id",
  562. "host": ["{{baseUrl}}"],
  563. "path": ["api", "sessions", ":id"],
  564. "variable": [
  565. { "key": "id", "value": "session_id_here" }
  566. ]
  567. }
  568. }
  569. }
  570. ]
  571. },
  572. {
  573. "name": "stats",
  574. "item": [
  575. {
  576. "name": "view",
  577. "item": [
  578. {
  579. "name": "start",
  580. "request": {
  581. "auth": { "type": "noauth" },
  582. "method": "POST",
  583. "header": [
  584. { "key": "Content-Type", "value": "application/json" }
  585. ],
  586. "body": {
  587. "mode": "raw",
  588. "raw": "{\n \"video_id\": \"video_id_here\"\n}"
  589. },
  590. "url": {
  591. "raw": "{{baseUrl}}/api/stats/view/start",
  592. "host": ["{{baseUrl}}"],
  593. "path": ["api", "stats", "view", "start"]
  594. }
  595. }
  596. },
  597. {
  598. "name": "end",
  599. "request": {
  600. "auth": { "type": "noauth" },
  601. "method": "POST",
  602. "header": [
  603. { "key": "Content-Type", "value": "application/json" }
  604. ],
  605. "body": {
  606. "mode": "raw",
  607. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 300\n}"
  608. },
  609. "url": {
  610. "raw": "{{baseUrl}}/api/stats/view/end",
  611. "host": ["{{baseUrl}}"],
  612. "path": ["api", "stats", "view", "end"]
  613. }
  614. }
  615. },
  616. {
  617. "name": "heartbeat",
  618. "request": {
  619. "auth": { "type": "noauth" },
  620. "method": "POST",
  621. "header": [
  622. { "key": "Content-Type", "value": "application/json" }
  623. ],
  624. "body": {
  625. "mode": "raw",
  626. "raw": "{\n \"view_id\": \"view_id_here\",\n \"watch_duration\": 60\n}"
  627. },
  628. "url": {
  629. "raw": "{{baseUrl}}/api/stats/view/heartbeat",
  630. "host": ["{{baseUrl}}"],
  631. "path": ["api", "stats", "view", "heartbeat"]
  632. }
  633. }
  634. }
  635. ]
  636. },
  637. {
  638. "name": "video",
  639. "request": {
  640. "method": "GET",
  641. "header": [],
  642. "url": {
  643. "raw": "{{baseUrl}}/api/stats/video/:videoId",
  644. "host": ["{{baseUrl}}"],
  645. "path": ["api", "stats", "video", ":videoId"],
  646. "variable": [
  647. { "key": "videoId", "value": "video_id_here" }
  648. ]
  649. }
  650. }
  651. },
  652. {
  653. "name": "session",
  654. "request": {
  655. "method": "GET",
  656. "header": [],
  657. "url": {
  658. "raw": "{{baseUrl}}/api/stats/session/:sessionId",
  659. "host": ["{{baseUrl}}"],
  660. "path": ["api", "stats", "session", ":sessionId"],
  661. "variable": [
  662. { "key": "sessionId", "value": "session_id_here" }
  663. ]
  664. }
  665. }
  666. },
  667. {
  668. "name": "overview",
  669. "request": {
  670. "method": "GET",
  671. "header": [],
  672. "url": {
  673. "raw": "{{baseUrl}}/api/stats/overview?days=7",
  674. "host": ["{{baseUrl}}"],
  675. "path": ["api", "stats", "overview"],
  676. "query": [
  677. { "key": "days", "value": "7" }
  678. ]
  679. }
  680. }
  681. },
  682. {
  683. "name": "views",
  684. "request": {
  685. "method": "GET",
  686. "header": [],
  687. "url": {
  688. "raw": "{{baseUrl}}/api/stats/views?page=1&pageSize=50",
  689. "host": ["{{baseUrl}}"],
  690. "path": ["api", "stats", "views"],
  691. "query": [
  692. { "key": "page", "value": "1" },
  693. { "key": "pageSize", "value": "50" },
  694. { "key": "video_id", "value": "", "disabled": true },
  695. { "key": "session_id", "value": "", "disabled": true },
  696. { "key": "user_id", "value": "", "disabled": true }
  697. ]
  698. }
  699. }
  700. }
  701. ]
  702. },
  703. {
  704. "name": "audit-logs",
  705. "item": [
  706. {
  707. "name": "list",
  708. "request": {
  709. "method": "GET",
  710. "header": [],
  711. "url": {
  712. "raw": "{{baseUrl}}/api/audit-logs?page=1&pageSize=50",
  713. "host": ["{{baseUrl}}"],
  714. "path": ["api", "audit-logs"],
  715. "query": [
  716. { "key": "page", "value": "1" },
  717. { "key": "pageSize", "value": "50" },
  718. { "key": "action", "value": "", "disabled": true },
  719. { "key": "resource", "value": "", "disabled": true },
  720. { "key": "user_id", "value": "", "disabled": true },
  721. { "key": "start_date", "value": "", "disabled": true },
  722. { "key": "end_date", "value": "", "disabled": true }
  723. ]
  724. }
  725. }
  726. },
  727. {
  728. "name": "get",
  729. "request": {
  730. "method": "GET",
  731. "header": [],
  732. "url": {
  733. "raw": "{{baseUrl}}/api/audit-logs/:id",
  734. "host": ["{{baseUrl}}"],
  735. "path": ["api", "audit-logs", ":id"],
  736. "variable": [
  737. { "key": "id", "value": "log_id_here" }
  738. ]
  739. }
  740. }
  741. },
  742. {
  743. "name": "stats",
  744. "item": [
  745. {
  746. "name": "summary",
  747. "request": {
  748. "method": "GET",
  749. "header": [],
  750. "url": {
  751. "raw": "{{baseUrl}}/api/audit-logs/stats/summary?days=7",
  752. "host": ["{{baseUrl}}"],
  753. "path": ["api", "audit-logs", "stats", "summary"],
  754. "query": [
  755. { "key": "days", "value": "7" }
  756. ]
  757. }
  758. }
  759. }
  760. ]
  761. },
  762. {
  763. "name": "user",
  764. "request": {
  765. "method": "GET",
  766. "header": [],
  767. "url": {
  768. "raw": "{{baseUrl}}/api/audit-logs/user/:userId?page=1&pageSize=20",
  769. "host": ["{{baseUrl}}"],
  770. "path": ["api", "audit-logs", "user", ":userId"],
  771. "query": [
  772. { "key": "page", "value": "1" },
  773. { "key": "pageSize", "value": "20" }
  774. ],
  775. "variable": [
  776. { "key": "userId", "value": "user_id_here" }
  777. ]
  778. }
  779. }
  780. },
  781. {
  782. "name": "resource",
  783. "request": {
  784. "method": "GET",
  785. "header": [],
  786. "url": {
  787. "raw": "{{baseUrl}}/api/audit-logs/resource/:resource/:resourceId?page=1&pageSize=20",
  788. "host": ["{{baseUrl}}"],
  789. "path": ["api", "audit-logs", "resource", ":resource", ":resourceId"],
  790. "query": [
  791. { "key": "page", "value": "1" },
  792. { "key": "pageSize", "value": "20" }
  793. ],
  794. "variable": [
  795. { "key": "resource", "value": "camera" },
  796. { "key": "resourceId", "value": "resource_id_here" }
  797. ]
  798. }
  799. }
  800. }
  801. ]
  802. },
  803. {
  804. "name": "stream",
  805. "item": [
  806. {
  807. "name": "video",
  808. "item": [
  809. {
  810. "name": "list",
  811. "request": {
  812. "method": "GET",
  813. "header": [],
  814. "url": {
  815. "raw": "{{baseUrl}}/api/stream/video/list",
  816. "host": ["{{baseUrl}}"],
  817. "path": ["api", "stream", "video", "list"]
  818. }
  819. }
  820. },
  821. {
  822. "name": "get",
  823. "request": {
  824. "method": "GET",
  825. "header": [],
  826. "url": {
  827. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  828. "host": ["{{baseUrl}}"],
  829. "path": ["api", "stream", "video", ":videoId"],
  830. "variable": [
  831. { "key": "videoId", "value": "video_id_here" }
  832. ]
  833. }
  834. }
  835. },
  836. {
  837. "name": "delete",
  838. "request": {
  839. "method": "DELETE",
  840. "header": [],
  841. "url": {
  842. "raw": "{{baseUrl}}/api/stream/video/:videoId",
  843. "host": ["{{baseUrl}}"],
  844. "path": ["api", "stream", "video", ":videoId"],
  845. "variable": [
  846. { "key": "videoId", "value": "video_id_here" }
  847. ]
  848. }
  849. }
  850. },
  851. {
  852. "name": "import",
  853. "request": {
  854. "method": "POST",
  855. "header": [
  856. { "key": "Content-Type", "value": "application/json" }
  857. ],
  858. "body": {
  859. "mode": "raw",
  860. "raw": "{\n \"url\": \"https://example.com/video.mp4\",\n \"meta\": {\n \"name\": \"My Video\"\n }\n}"
  861. },
  862. "url": {
  863. "raw": "{{baseUrl}}/api/stream/video/import",
  864. "host": ["{{baseUrl}}"],
  865. "path": ["api", "stream", "video", "import"]
  866. }
  867. }
  868. },
  869. {
  870. "name": "upload-url",
  871. "request": {
  872. "method": "POST",
  873. "header": [
  874. { "key": "Content-Type", "value": "application/json" }
  875. ],
  876. "body": {
  877. "mode": "raw",
  878. "raw": "{\n \"maxDurationSeconds\": 3600,\n \"meta\": {\n \"name\": \"My Upload\"\n }\n}"
  879. },
  880. "url": {
  881. "raw": "{{baseUrl}}/api/stream/video/upload-url",
  882. "host": ["{{baseUrl}}"],
  883. "path": ["api", "stream", "video", "upload-url"]
  884. }
  885. }
  886. },
  887. {
  888. "name": "playback",
  889. "request": {
  890. "method": "GET",
  891. "header": [],
  892. "url": {
  893. "raw": "{{baseUrl}}/api/stream/video/:videoId/playback",
  894. "host": ["{{baseUrl}}"],
  895. "path": ["api", "stream", "video", ":videoId", "playback"],
  896. "variable": [
  897. { "key": "videoId", "value": "video_id_here" }
  898. ]
  899. }
  900. }
  901. }
  902. ]
  903. },
  904. {
  905. "name": "live",
  906. "item": [
  907. {
  908. "name": "list",
  909. "request": {
  910. "method": "GET",
  911. "header": [],
  912. "url": {
  913. "raw": "{{baseUrl}}/api/stream/live/list",
  914. "host": ["{{baseUrl}}"],
  915. "path": ["api", "stream", "live", "list"]
  916. }
  917. }
  918. },
  919. {
  920. "name": "create",
  921. "request": {
  922. "method": "POST",
  923. "header": [
  924. { "key": "Content-Type", "value": "application/json" }
  925. ],
  926. "body": {
  927. "mode": "raw",
  928. "raw": "{\n \"meta\": {\n \"name\": \"My Live Stream\"\n },\n \"recording\": {\n \"mode\": \"automatic\"\n }\n}"
  929. },
  930. "url": {
  931. "raw": "{{baseUrl}}/api/stream/live",
  932. "host": ["{{baseUrl}}"],
  933. "path": ["api", "stream", "live"]
  934. }
  935. }
  936. },
  937. {
  938. "name": "get",
  939. "request": {
  940. "method": "GET",
  941. "header": [],
  942. "url": {
  943. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  944. "host": ["{{baseUrl}}"],
  945. "path": ["api", "stream", "live", ":liveInputId"],
  946. "variable": [
  947. { "key": "liveInputId", "value": "live_input_id_here" }
  948. ]
  949. }
  950. }
  951. },
  952. {
  953. "name": "update",
  954. "request": {
  955. "method": "PUT",
  956. "header": [
  957. { "key": "Content-Type", "value": "application/json" }
  958. ],
  959. "body": {
  960. "mode": "raw",
  961. "raw": "{\n \"meta\": {\n \"name\": \"Updated Live Stream\"\n }\n}"
  962. },
  963. "url": {
  964. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  965. "host": ["{{baseUrl}}"],
  966. "path": ["api", "stream", "live", ":liveInputId"],
  967. "variable": [
  968. { "key": "liveInputId", "value": "live_input_id_here" }
  969. ]
  970. }
  971. }
  972. },
  973. {
  974. "name": "delete",
  975. "request": {
  976. "method": "DELETE",
  977. "header": [],
  978. "url": {
  979. "raw": "{{baseUrl}}/api/stream/live/:liveInputId",
  980. "host": ["{{baseUrl}}"],
  981. "path": ["api", "stream", "live", ":liveInputId"],
  982. "variable": [
  983. { "key": "liveInputId", "value": "live_input_id_here" }
  984. ]
  985. }
  986. }
  987. },
  988. {
  989. "name": "playback",
  990. "request": {
  991. "method": "GET",
  992. "header": [],
  993. "url": {
  994. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/playback",
  995. "host": ["{{baseUrl}}"],
  996. "path": ["api", "stream", "live", ":liveInputId", "playback"],
  997. "variable": [
  998. { "key": "liveInputId", "value": "live_input_id_here" }
  999. ]
  1000. }
  1001. }
  1002. },
  1003. {
  1004. "name": "recordings",
  1005. "request": {
  1006. "method": "GET",
  1007. "header": [],
  1008. "url": {
  1009. "raw": "{{baseUrl}}/api/stream/live/:liveInputId/recordings",
  1010. "host": ["{{baseUrl}}"],
  1011. "path": ["api", "stream", "live", ":liveInputId", "recordings"],
  1012. "variable": [
  1013. { "key": "liveInputId", "value": "live_input_id_here" }
  1014. ]
  1015. }
  1016. }
  1017. }
  1018. ]
  1019. }
  1020. ]
  1021. }
  1022. ]
  1023. }
  1024. ]
  1025. }