Query status
https://api.sd-rtn.com/v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/queryAfter starting a recording, call this endpoint to query its current status.
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.
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.
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.
- serverResponse object
The recording status. The fields returned vary depending on the recording mode and whether screenshot capture is enabled.
Show propertiesHide properties
- status number
Current status of the cloud service:
0: Not started.1: Initialization complete.2: Components starting.3: Some components ready.4: All components ready.5: In progress.6: Stop requested.7: All components stopped.8: Exited.20: Exited abnormally.
- extensionServiceState array[object]
State of each extension service. Only returned in web page recording mode.
Show propertiesHide properties
- serviceName string
Extension service name:
"web_recorder_service": Web page recording service."rtmp_publish_service": CDN push service.
- payload object
Service-specific state.
Show propertiesHide properties
- state string
Upload status:
"init": Initializing."inProgress": Running."exit": Stopped.
- onhold boolean
Whether recording is paused.
trueif paused,falseif running. Only returned byweb_recorder_service. - fileList array[object]
Files generated during recording. Only returned by
web_recorder_service.Show propertiesHide properties
- filename string
Name of the M3U8 or MP4 file.
- sliceStartTime number
Recording start time of the file, Unix timestamp in seconds.
- outputs array[object]
CDN push output status. Only returned by
rtmp_publish_service.
- fileListMode string
Data format of
fileList. Only returned in individual and composite recording modes when screenshot capture is not enabled."string": In composite recording mode whenavFileTypeis["hls"]."json": WhenavFileTypeis["hls","mp4"]in individual or composite recording mode.
- fileList string or array[object]
The recorded files. Only returned in individual and composite recording modes when screenshot capture is not enabled. When
fileListModeis"string", this is the filename of the M3U8 file. WhenfileListModeis"json", this is an array of objects with the following fields:Show propertiesHide properties
- fileName string
Name of the M3U8 or MP4 file.
- trackType string
File type:
"audio": Audio only."video": Video only."audio_and_video": Audio and video.
- uid string
The UID whose stream is recorded. In composite recording mode, this is
"0". - mixedAllUser boolean
trueif all users are recorded in a single file;falseif each user is recorded separately. - isPlayable boolean
trueif the file can be played online;falseif it cannot. - sliceStartTime number
Recording start time of the file, Unix timestamp in seconds.
- sliceStartTime number
Recording start time, Unix timestamp in milliseconds. Only returned in individual recording mode.
-
If the returned status code is not
200, the request failed. See Response status codes for troubleshooting.