Skip to content

Fetch stream device parameters

GET
/v3/streams/{stream_id}/params
curl --request GET \
--url https://api.cardio.ai/v3/streams/1/params \
--header 'X-Api-Token: <X-Api-Token>'

Returns device state, pending device command, and custom duration for a stream.

stream_id
required
integer format: int64
>= 1

Stream identifier.

Stream parameters successfully retrieved.

Media typeapplication/json

Device-facing stream parameters.

object
device_state

Current device state.

string
Allowed values: UNKNOWN_DEVICE_STATE WAITING_FOR_START RECORDING RECORDING_COMPLETED UPLOADING UPLOADING_FAILED
device_command

Pending command for the device.

string
Allowed values: UNKNOWN_DEVICE_COMMAND START_DEVICE STOP_DEVICE RETRY_UPLOADING
custom_duration

Custom stream duration in milliseconds, rounded down.

integer format: int64
Example
{
"device_state": "UNKNOWN_DEVICE_STATE",
"device_command": "UNKNOWN_DEVICE_COMMAND"
}

Bad Request - missing or invalid parameters.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Unauthorized - missing, expired, or invalid token.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Forbidden - the provided token is not authorized to call this endpoint.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Not Found - requested resource does not exist or is unavailable.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Too Many Requests - rate limit exceeded.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}