Query status

Updated

Queries the current status of a cloud recording task.

GET
https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/query

After starting a recording, call this endpoint to query its current status.

Note

This endpoint is only valid within an active recording session. If the recording was not started successfully or has already ended, the request returns 404.

Path Parameters

appidstring
Required

The App ID of your project.

  • For web page recording mode, enter the App ID for which the cloud recording service is enabled.
  • For individual and composite recording modes, use the same App ID as the channel to be recorded. Ensure that the cloud recording service has been enabled for this App ID.
resourceidstring
Required

The resource ID obtained from the acquire endpoint.

sidstring
Required

The recording ID obtained from the start endpoint.

modestring
Required

The recording mode:

  • individual: Individual recording mode.
  • mix: Composite recording mode.
  • web: Web page recording mode.

Header Parameters

Content-Typestring

application/json.

Response

  • If the returned status code is 200, the request was successful.

  • If the returned status code is not 200, the request failed. See Response status codes for troubleshooting.

Response Body

The request succeeded.

cnamestring

The name of the channel to be recorded.

The name of the channel being recorded.

uidstring

The UID used by the cloud recording service in the RTC channel.

resourceIdstring

The cloud recording resource ID. Valid for five minutes; re-request from acquire if expired.

The resource ID used by cloud recording.

sidstring

The recording ID. Uniquely identifies a recording session. Generated after the cloud recording service starts successfully.

The recording ID, identifying the current recording session.

serverResponseobject

The recording status. The fields returned vary depending on the recording mode and whether screenshot capture is enabled.

Response example

{
    "cname": "httpClient463224",
    "uid": "527841",
    "resourceId": "JyvK8nXHuV1BE.....",
    "sid": "38f8e3c.....",
    "serverResponse": {
      "status": 0,
      "extensionServiceState": [
        {
          "payload": {
            "fileList": [
              {
                "filename": "xxx.m3u8",
                "sliceStartTime": 0
              }
            ],
            "onhold": true,
            "state": "inProgress"
          },
          "serviceName": "web_recorder_service"
        }
      ]
    }
  }
{
    "code": 62,
    "reason": "request timeout"
  }

Authorization

This endpoint requires authentication.

basicAuth

Request examples

curl --request GET \    --url https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/query \    --header 'Authorization: Basic <credentials>'

Response example

{  "resourceId": "string",  "sid": "string",  "serverResponse": {    "status": 0,    "extensionServiceState": [      {        "payload": {          "fileList": [            {              "filename": "string",              "sliceStartTime": 0            }          ],          "onhold": true,          "state": "string"        },        "serviceName": "string"      }    ]  },  "cname": "string",  "uid": "string"}