Update task settings
https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/updateAfter starting a recording task, call this endpoint to update the subscription list, pause or resume web page recording, or update the CDN push address.
- 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
updatemultiple times in succession, wait for the previousupdateresponse before sending the next request to avoid unexpected results.
Request
Path parameters
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.
The resource ID obtained from the acquire endpoint.
The recording ID obtained from the start endpoint.
The recording mode:
individual: Individual recording mode.mix: Composite recording mode.web: Web page recording mode.
Request body
BODYrequired
- clientRequest objectrequired
Show propertiesHide properties
- streamSubscribe objectnullable
Updates the subscription lists. Only applicable in individual recording and composite recording modes.
Show propertiesHide properties
- audioUidList objectnullable
The audio subscription list. Only applicable when
streamTypesis0or2.Show propertiesHide properties
- subscribeAudioUids array[string]nullable
Audio streams to subscribe to. The array length cannot exceed 32. Set to
["#allstream#"]to subscribe to all UIDs. Cannot be set together withunsubscribeAudioUids. - unsubscribeAudioUids array[string]nullable
Audio streams to exclude. The service subscribes to all other UIDs. The array length cannot exceed 32. Cannot be set together with
subscribeAudioUids.
- videoUidList objectnullable
The video subscription list. Only applicable when
streamTypesis1or2.Show propertiesHide properties
- subscribeVideoUids array[string]nullable
Video streams to subscribe to. The array length cannot exceed 32. Set to
["#allstream#"]to subscribe to all UIDs. Cannot be set together withunsubscribeVideoUids. - unsubscribeVideoUids array[string]nullable
Video streams to exclude. The service subscribes to all other UIDs. The array length cannot exceed 32. Cannot be set together with
subscribeVideoUids.
- webRecordingConfig objectnullable
Updates web page recording settings. Only applicable in web page recording mode.
Show propertiesHide properties
- onhold booleannullable
Default:
falseWhether to pause web page recording:
true: Pauses recording and stops generating slice files.false: Resumes recording and continues generating slice files.
- rtmpPublishConfig objectnullable
Updates the CDN push configuration. Only applicable when pushing web page recording to CDN.
- storageConfig objectnullable
Updates the third-party cloud storage configuration. Use this to refresh an expiring
stsToken.Show propertiesHide properties
- vendor numberrequired
Third-party cloud storage platform:
1: Amazon S32: Alibaba Cloud3: Tencent Cloud5: Microsoft Azure6: Google Cloud7: Huawei Cloud8: Baidu IntelligentCloud11: S3-compatible storage. Specify the domain name inextensionParams.endpoint.
- region numberrequired
The region of the third-party cloud storage.
infoTo ensure upload success and real-time performance, the cloud storage region must match the region of the server where you initiate the request. See Third-party cloud storage regions.
- bucket stringrequired
The cloud storage bucket name. Must comply with the naming rules of the corresponding cloud storage service.
- accessKey stringrequired
The access key for the third-party cloud storage.
- secretKey stringrequired
The secret key for the third-party cloud storage.
- stsToken stringnullable
A temporary security token issued by the cloud provider's Security Token Service (STS), granting limited access to cloud storage resources. Currently supported only for Amazon S3 (
1), Alibaba Cloud (2), and Tencent Cloud (3). - stsExpiration numbernullable
The
stsTokenexpiration time as a Unix timestamp in seconds.- Use Uint64 storage to avoid timestamp overflow.
- Set the longest possible validity period when applying the token. The minimum validity period is 4 hours.
- If the recording task runs longer than 1 hour, reapply a new
stsTokenevery 60 minutes and callupdateagain to refresh thestorageConfig.
- fileNamePrefix array[string]nullable
The storage path prefix for recorded files. For example, setting
["directory1","directory2"]results in a file name prefix ofdirectory1/directory2/. The total prefix length, including slashes, cannot exceed 128 characters. Supported characters: lowercase lettersa-z, uppercase lettersA-Z, digits0-9. - extensionParams objectnullable
Encryption and tagging settings applied to uploaded recording files by the cloud storage service.
Show propertiesHide properties
- sse stringrequired
The encryption mode for uploaded files. Applicable to Amazon S3 only. See the Amazon S3 documentation.
kms: KMS encryption.aes256: AES256 encryption.
- tag stringrequired
Tag content applied to uploaded files. Applicable to Alibaba Cloud and Amazon S3 only.
- endpoint stringnullable
The domain name for S3 protocol cloud storage. This field is required when you set
vendorto11.
Response
Response body
-
If the returned status code is
200, the request was successful.OK
- cname string
The name of the channel being recorded.
- uid string
The UID used by the cloud recording service in the RTC channel.
- resourceId string
The resource ID used by cloud recording.
- sid string
The recording ID, identifying the current recording session.
-
If the returned status code is not
200, the request failed. See Response status codes for troubleshooting.