Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

APIRequestResponseResponse status
WS API
Code Block
themeRDark
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
 }
}
Code Block
themeRDark
MESSAGE
destination:/user/service
content-type:application/json;charset=UTF-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
  }
 ]
}

200 OK

400 Object not found

500 Persist exception

REST API
Code Block
themeRDark
POST: /api/stream/history "application/json; charset=utf-8"
{
 "node":"3",
 "mediaId":"f3ad4670-8e83-11e9-8386-dbc3d191a79a",
 "name":"",
 "publisher":"",
 "status":""
 "limit":1,
 "offset":0
}
Code Block
themeRDark
{
    "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
        }
    ]
}

200 OK

400 Object not found

500 Persist exception

...

  • node – node identifier
  • mediaId – media session identifier
  • name – stream name
  • publisher - publisher identifier (for played streams)
  • status – stream status (PENDING, PUBLISHING, PLAYING, UNPUBLISHED, STOPPED, FAILED)
  • limit - maximum stream count in DB selection
  • offset - offset from stream table beginning
  • id - stream identifier in backend server database
  • createDate – stream creation date
  • endDate – stream termination date
  • duration - длительность потока
  • subscribers - list of identifiers of subscribers (for published streams)

If node Id is set, the response will contain only that node stream history information. If Id is not set, the response will contain all the streams history on backend server corresponding to the other query criteria.

If maximum stream count in DB selection is set to 0, all stream data will be selected from DB. This query can be terminated by timeout if streams count in DB is too big, so it is not recommended to send the query without limits.