Date: Thu, 28 Mar 2024 23:44:52 +0100 (CET) Message-ID: <283304522.47235.1711665892407@docs.flashphoner.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_47234_1134658329.1711665892407" ------=_Part_47234_1134658329.1711665892407 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Information about the streams on monitored nodes can be obtained from ba= ckend server with Websocket = API or REST API.
Current streams information can be= obtained with /api/stream/list request
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/stream/list content-length:207 { "requestId":"f2378c35-e7ca-4241-b382-29f696f0dddb", "realm":"/api/stream/list", "payload": { "node":"", "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a", "name":"", "publisher":"", "status":"", "showClosed":false, "nodeIp":"192.168.1.5", "nodeHostName":"" } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:3-35 content-length:210 { "requestId":"f2378c35-e7ca-4241-b382-29f696f0dddb", "status":200, "reason":"SUCCESS", "payload":[ { "name":"test", "publisher":null, "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a", "age":229, "status":"PUBLISHING" } ] }=20 |
200 OK 400 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/stream= /list "application/json; charset=3Dutf-8" { "node":"", "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a", "name":"", "publisher":"", "status":"", "showClosed":false, "nodeIp":"", "nodeHostName":"yourserver.com" }=20 |
=20
{ "status": 200, "reason": "SUCCESS", "payload": [ { "name": "test", "publisher": null, "mediaId": "f3ad4670-8e83-11e9-8386-dbc3d191a79a", "age": 152, "status": "PUBLISHING" } ] }=20 |
200 OK 400 Object not found 500 P= ersist exception |
Where
Response data are obtained from current metrics cache.
Current instantaneous metric values for stream published or played on WC= S can be obtained with /api/stream/metrics request
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/stream/metrics content-length:176 { "requestId":"e6d022e5-b5ae-4b6e-ad6e-e1c188e324d7", "realm":"/api/stream/metrics", "payload": { "node":"3", "mediaId":"5d03b340-8e8c-11e9-92b7-23d635edebe6", "limit":10, "offset":0 } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:2-18 content-length:1764 { "requestId":"e6d022e5-b5ae-4b6e-ad6e-e1c188e324d7", "status": 200, "reason": "SUCCESS", "payload": [ { "AUDIO_SYNC": 3769496857356, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.644Z", "AUDIO_RATE": 29816, "seq": 14, "AUDIO_LOST": 41 }, { "AUDIO_SYNC": 3769496857236, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.52Z", "AUDIO_RATE": 31048, "seq": 14, "AUDIO_LOST": 41 }, { "VIDEO_SYNC": 3769496857221, "VIDEO_CODEC": 119, "VIDEO_NACK": 38, "VIDEO_PLI": 0, "VIDEO_RATE": 404488, "VIDEO_WIDTH": 320, "time": "2019-06-14T10:27:37.494Z", "VIDEO_FPS": 23, "VIDEO_HEIGHT": 240, "seq": 16 }, { "AUDIO_SYNC": 3769496857116, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.397Z", "AUDIO_RATE": 29304, "seq": 14, "AUDIO_LOST": 41 }, { "VIDEO_SYNC": 3769496857029, "VIDEO_CODEC": 119, "VIDEO_NACK": 38, "VIDEO_PLI": 0, "VIDEO_RATE": 409056, "VIDEO_WIDTH": 320, "time": "2019-06-14T10:27:37.301Z", "VIDEO_FPS": 22, "VIDEO_HEIGHT": 240, "seq": 16 }, { "AUDIO_SYNC": 3769496856996, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.285Z", "AUDIO_RATE": 28112, "seq": 14, "AUDIO_LOST": 41 }, { "AUDIO_SYNC": 3769496856876, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.16Z", "AUDIO_RATE": 28248, "seq": 14, "AUDIO_LOST": 41 }, { "VIDEO_SYNC": 3769496856806, "VIDEO_CODEC": 119, "VIDEO_NACK": 37, "VIDEO_PLI": 0, "VIDEO_RATE": 430992, "VIDEO_WIDTH": 320, "time": "2019-06-14T10:27:37.124Z", "VIDEO_FPS": 22, "VIDEO_HEIGHT": 240, "seq": 16 }, { "AUDIO_SYNC": 3769496856756, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.039Z", "AUDIO_RATE": 27424, "seq": 14, "AUDIO_LOST": 41 }, { "AUDIO_SYNC": 3769496856636, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:36.923Z", "AUDIO_RATE": 26888, "seq": 14, "AUDIO_LOST": 41 } ] }=20 |
200 OK 400 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/stream= /metrics "application/json; charset=3Dutf-8" { "node":"3", "mediaId":"5d03b340-8e8c-11e9-92b7-23d635edebe6", "limit":10, "offset":0 }=20 |
=20
{ "status": 200, "reason": "SUCCESS", "payload": [ { "AUDIO_SYNC": 3769496857356, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.644Z", "AUDIO_RATE": 29816, "seq": 14, "AUDIO_LOST": 41 }, { "AUDIO_SYNC": 3769496857236, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.52Z", "AUDIO_RATE": 31048, "seq": 14, "AUDIO_LOST": 41 }, { "VIDEO_SYNC": 3769496857221, "VIDEO_CODEC": 119, "VIDEO_NACK": 38, "VIDEO_PLI": 0, "VIDEO_RATE": 404488, "VIDEO_WIDTH": 320, "time": "2019-06-14T10:27:37.494Z", "VIDEO_FPS": 23, "VIDEO_HEIGHT": 240, "seq": 16 }, { "AUDIO_SYNC": 3769496857116, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.397Z", "AUDIO_RATE": 29304, "seq": 14, "AUDIO_LOST": 41 }, { "VIDEO_SYNC": 3769496857029, "VIDEO_CODEC": 119, "VIDEO_NACK": 38, "VIDEO_PLI": 0, "VIDEO_RATE": 409056, "VIDEO_WIDTH": 320, "time": "2019-06-14T10:27:37.301Z", "VIDEO_FPS": 22, "VIDEO_HEIGHT": 240, "seq": 16 }, { "AUDIO_SYNC": 3769496856996, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.285Z", "AUDIO_RATE": 28112, "seq": 14, "AUDIO_LOST": 41 }, { "AUDIO_SYNC": 3769496856876, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.16Z", "AUDIO_RATE": 28248, "seq": 14, "AUDIO_LOST": 41 }, { "VIDEO_SYNC": 3769496856806, "VIDEO_CODEC": 119, "VIDEO_NACK": 37, "VIDEO_PLI": 0, "VIDEO_RATE": 430992, "VIDEO_WIDTH": 320, "time": "2019-06-14T10:27:37.124Z", "VIDEO_FPS": 22, "VIDEO_HEIGHT": 240, "seq": 16 }, { "AUDIO_SYNC": 3769496856756, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:37.039Z", "AUDIO_RATE": 27424, "seq": 14, "AUDIO_LOST": 41 }, { "AUDIO_SYNC": 3769496856636, "AUDIO_CODEC": 111, "time": "2019-06-14T10:27:36.923Z", "AUDIO_RATE": 26888, "seq": 14, "AUDIO_LOST": 41 } ] }=20 |
200 OK 400 Object not found 500 P= ersist exception |
=D0=97=D0=B4=D0=B5=D1=81=D1=8C:
Response also contains current instantaneous metric values from cache.= p>
Stream history information can be = obtained with /api/stream/history request
API | Request | Response | Response status |
---|---|---|---|
WS API |
=20
SEND destination:/app/api/stream/history content-length:191 { "requestId":"4a700886-a559-42b7-b43d-82679d8573d6", "realm":"/api/stream/history", "payload": { "node":"3", "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a", "name":"", "publisher":"", "status":"" "limit":1, "offset":0 } }=20 |
=20
MESSAGE destination:/user/service content-type:application/json;charset=3DUTF-8 subscription:sub-1 message-id:3-39 content-length:310 { "requestId":"4a700886-a559-42b7-b43d-82679d8573d6", "status":200, "reason":"SUCCESS", "payload":[ { "id":265, "name":"test", "status":"UNPUBLISHED", "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a", "createDate":"2019-06-14T09:08:20.560+0000", "endDate":null, "publisher":0, "duration":598658, "subscribers":[], "node":3 } ] }=20 |
200 OK 400 Object not found 500 P= ersist exception |
REST API |
=20
POST: /api/stream= /history "application/json; charset=3Dutf-8" { "node":"3", "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a", "name":"", "publisher":"", "status":"" "limit":1, "offset":0 }=20 |
=20
{ "status": 200, "reason": "SUCCESS", "payload": [ { "id": 265, "name": "test", "status": "UNPUBLISHED", "mediaId": "f3ad4670-8e83-11e9-8386-dbc3d191a79a", "createDate": 1560503300560, "endDate": null, "publisher": 0, "duration": 598658, "subscribers": [], "node": 3 } ] }=20 |
200 OK 400 Object not found 500 P= ersist exception |
Where
If node Id is set, the response wi= ll contain only that node stream history information. If Id is no= t set, the response will contain all the streams histor= y on backend server corresponding to the other query criteria.
If maximum stream count in DB selection is set to 0, all stream data wil= l be selected from DB. This query can be terminated by timeout if streams c= ount in DB is too big, so it is not recommended to send the query without l= imits.