Update task settings

Updated

Updates the settings of an active cloud recording task.

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

After starting a recording task, call this endpoint to update the subscription list, pause or resume web page recording, or update the CDN push address.

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.
  • If you need to call update multiple times in succession, wait for the previous update response before sending the next request to avoid unexpected results.

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.

Request Body

application/json

cnamestring
Required

The name of the channel to record. Must match the cname used in the acquire request. The name of the channel being recorded.

uidstring
Required

The UID used by the cloud recording service in the channel. Must match the uid used in the acquire request. The UID used by the cloud recording service in the RTC channel.

clientRequestobject
Required
streamSubscribeobject

Updates the subscription lists. Only applicable in individual recording and composite recording modes.

webRecordingConfigobject

Updates web page recording settings. Only applicable in web page recording mode.

rtmpPublishConfigobject

Updates the CDN push configuration. Only applicable when pushing web page recording to CDN.

storageConfigobject

Updates the third-party cloud storage configuration. Use this to refresh an expiring stsToken.

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.

Response example

{
    "code": 404,
    "reason": "failed to find worker"
  }

Authorization

This endpoint requires authentication.

basicAuth

Request examples

curl --request POST \    --url https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/update \    --header 'Authorization: Basic <credentials>' \    --header 'Content-Type: application/json' \    --data '{    "cname": "httpClient463224",    "uid": "527841",    "clientRequest": {      "streamSubscribe": {        "audioUidList": {          "subscribeAudioUids": ["#allstream#"]        },        "videoUidList": {          "unsubscribeVideoUids": ["444", "555", "666"]        }      }    }  }'

Response example

{  "cname": "string",  "uid": "string",  "resourceId": "string",  "sid": "string"}