Skip to content

Find stream by device

POST
/v3/streams/find
curl --request POST \
--url https://api.cardio.ai/v3/streams/find \
--header 'Content-Type: application/json' \
--header 'X-Api-Token: <X-Api-Token>' \
--data '{ "device_id": "example" }'

Resolves a device identifier to its stream ID. Use this when the device knows its own identifier but not the task created for it.

Stream lookup request.

Media typeapplication/json

Request payload for finding an existing stream by device identifier.

object
device_id
required

Device identifier used to find a task waiting for ECG data.

string
>= 1 characters
Examplegenerated
{
"device_id": "example"
}

Successful response containing the stream ID.

Media typeapplication/json

Response payload for stream lookup.

object
stream_id
required

Stream identifier. This is the task ID backing the stream.

integer format: int64
Examplegenerated
{
"stream_id": 1
}

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"
}

Unsupported Media Type - Content-Type must be application/json.

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"
}