Find stream by device
POST
/v3/streams/find
const url = 'https://api.cardio.ai/v3/streams/find';const options = { method: 'POST', headers: {'X-Api-Token': '<X-Api-Token>', 'Content-Type': 'application/json'}, body: '{"device_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Stream lookup request.
Media type application/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
Example generated
{ "device_id": "example"}Responses
Section titled “ Responses ”Successful response containing the stream ID.
Media type application/json
Response payload for stream lookup.
object
stream_id
required
Stream identifier. This is the task ID backing the stream.
integer format: uint64
Example generated
{ "stream_id": 1}Bad Request - missing or invalid parameters.
Media type application/json
string
Example generated
exampleUnauthorized - missing, expired, or invalid token.
Media type application/json
string
Example generated
exampleForbidden - the provided token is not authorized to call this endpoint.
Media type application/json
string
Example generated
exampleNot Found - requested resource does not exist or is unavailable.
Media type application/json
string
Example generated
exampleUnsupported Media Type - Content-Type must be application/json.
Media type application/json
string
Example generated
exampleToo Many Requests - rate limit exceeded.
Media type application/json
string
Example generated
example