Callback
Function that delivers the analyzed results by calling the desired HTTP callback URL, if the parameter is entered in the upload and session end API at Session API, the analysis results will be delivered in the following format
1. Request
1.1 Method
POST
1.2 Header
Field | Type | Description |
---|---|---|
x-api-key | String | API key used to upload data or end session |
x-user-id | String | The user id that created the sleep session |
1.3 Body
Field | Type | Description |
---|---|---|
callback_event | String ( | Callback event type |
callback_version | String | Callback version |
callback_data | Callback Data Object | Callback data |
1.3.1 Callback Data Object in case of INFERENCE_COMPLETE
Field | Type | Description |
---|---|---|
user_id | String | user id |
session_id | String | session id |
seq_num | Int | Order number of the audio data uploaded |
inference_seq_num | Int | Number that converted seq_num into 5 minutes increments |
stage_list | [Int] | Sleep stage results in previous 20 minutes frame |
breath_stages | [Int] | Breathing stability stage results in previous 20 minutes frame |
1.3.2 Callback Data Object in case of SESSION_COMPLETE
Field | Type | Description |
---|---|---|
user_id | String | user id |
session_id | String | session id |
sleep_data | Sleep Data Object | Full Sleep Analysis Results |
1.3.3 Sleep Data Object
The data will be delivered in the same format as the "result" field of the Get Single Session.
Updated about 2 months ago