# Query status (/en/api-reference/api-ref/cloud-recording/query)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Queries the current status of a cloud recording task.

- OpenAPI: /openapi/cloud-recording/cloud-recording.en.yaml
- Operation ID: query-cloud-recording
- Method: GET
- Path: /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/query

## Servers

- https://api.sd-rtn.com

## Parameters

- `Content-Type` (header, optional) - `application/json`.
- `appid` (path, 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.
- `resourceid` (path, required) - The resource ID obtained from the `acquire` endpoint.
- `sid` (path, required) - The recording ID obtained from the `start` endpoint.
- `mode` (path, required) - The recording mode:
- `individual`: Individual recording mode.
- `mix`: Composite recording mode.
- `web`: Web page recording mode.

## Request body

No request body.

## Responses

### 200

The request succeeded.

- `serverResponse` (object) - The recording status. The fields returned vary depending on the recording mode and whether screenshot capture is enabled.
  - `serverResponse.status` (integer) - 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.
No schema.
  - `serverResponse.extensionServiceState` (array) - State of each extension service. Only returned in web page recording mode.
    - `serverResponse.extensionServiceState.items` (object)
      - `serverResponse.extensionServiceState.items.payload` (object) - Service-specific state.
        - `serverResponse.extensionServiceState.items.payload.fileList` (array) - Files generated during recording. Only returned by `web_recorder_service`.
          - `serverResponse.extensionServiceState.items.payload.fileList.items` (object)
            - `serverResponse.extensionServiceState.items.payload.fileList.items.filename` (string) - Name of the M3U8 or MP4 file.
No schema.
            - `serverResponse.extensionServiceState.items.payload.fileList.items.sliceStartTime` (integer) - Recording start time of the file, Unix timestamp in seconds.
No schema.
        - `serverResponse.extensionServiceState.items.payload.onhold` (boolean) - Whether recording is paused. `true` if paused, `false` if running. Only returned by `web_recorder_service`.
No schema.
        - `serverResponse.extensionServiceState.items.payload.state` (string) - Upload status:
- `"init"`: Initializing.
- `"inProgress"`: Running.
- `"exit"`: Stopped.
No schema.
        - `serverResponse.extensionServiceState.items.payload.outputs` (array) - CDN push output status. Only returned by `rtmp_publish_service`.
          - `serverResponse.extensionServiceState.items.payload.outputs.items` (object)
            - `serverResponse.extensionServiceState.items.payload.outputs.items.rtmpUrl` (string) - The CDN address the stream is being pushed to.
No schema.
            - `serverResponse.extensionServiceState.items.payload.outputs.items.status` (string) - Push status:
- `"connecting"`: Connecting to the CDN server.
- `"publishing"`: Push in progress.
- `"onhold"`: Push paused.
- `"disconnected"`: Failed to connect to the CDN server.
No schema.
      - `serverResponse.extensionServiceState.items.serviceName` (string) - Extension service name:
- `"web_recorder_service"`: Web page recording service.
- `"rtmp_publish_service"`: CDN push service.
No schema.
  - `serverResponse.sliceStartTime` (integer) - Recording start time, Unix timestamp in milliseconds. Only returned in individual recording mode.
No schema.
  - `serverResponse.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 when `avFileType` is `["hls"]`.
- `"json"`: When `avFileType` is `["hls","mp4"]` in individual or composite recording mode.
No schema.
  - `serverResponse.fileList` (string) - The recorded files. Only returned in individual and composite recording modes when screenshot capture is not enabled. When `fileListMode` is `"string"`, this is the filename of the M3U8 file. When `fileListMode` is `"json"`, this is an array of objects with the following fields:
    - `serverResponse.fileList.items` (object)
      - `serverResponse.fileList.items.fileName` (string) - Name of the M3U8 or MP4 file.
No schema.
      - `serverResponse.fileList.items.trackType` (string) - File type:
- `"audio"`: Audio only.
- `"video"`: Video only.
- `"audio_and_video"`: Audio and video.
No schema.
      - `serverResponse.fileList.items.uid` (string) - The UID whose stream is recorded. In composite recording mode, this is `"0"`.
No schema.
      - `serverResponse.fileList.items.mixedAllUser` (boolean) - `true` if all users are recorded in a single file; `false` if each user is recorded separately.
No schema.
      - `serverResponse.fileList.items.isPlayable` (boolean) - `true` if the file can be played online; `false` if it cannot.
No schema.
      - `serverResponse.fileList.items.sliceStartTime` (integer) - Recording start time of the file, Unix timestamp in seconds.
No schema.
- `resourceId` (string) - The cloud recording resource ID. Valid for five minutes; re-request from `acquire` if expired.

The resource ID used by cloud recording.
No schema.
- `sid` (string) - The recording ID. Uniquely identifies a recording session. Generated after the cloud recording service starts successfully.

The recording ID, identifying the current recording session.
No schema.
- `cname` (string) - The name of the channel to be recorded.

The name of the channel being recorded.
No schema.
- `uid` (string) - The UID used by the cloud recording service in the RTC channel.
No schema.
### default

The request failed. If the HTTP status code is not `200`, see the Cloud Recording response status codes for troubleshooting.

No schema.
