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

FieldTypeDescription
x-api-keyStringAPI key used to upload data or end session
x-user-idStringThe user id that created the sleep session

1.3 Body

FieldTypeDescription
callback_eventString (INFERENCE_COMPLETE,SESSION_COMPLETE)Callback event type
INFERENCE_COMPLETE: If the analysis is completed within 5 or 20 minute increments
SESSION_COMPLETE: The entire session analysis is complete
callback_versionString
(V1,V2)
Callback version
V1: Follows the callback format of v1.0 documentation
V2:: Follows the callback format of the current version
callback_dataCallback Data ObjectCallback data

1.3.1 Callback Data Object in case of INFERENCE_COMPLETE

FieldTypeDescription
user_idStringuser id
session_idStringsession id
seq_numIntOrder number of the audio data uploaded
inference_seq_numIntNumber that converted seq_num into 5 minutes increments
e.g.) when uploading MELSPECTROGRAM, if seq_num 39, inference_seq_num is 3
stage_list[Int]Sleep stage results in previous 20 minutes frame
e.g.) if inference_seq_num is 6, you get back 40 values from 3 to 6
breath_stages[Int]Breathing stability stage results in previous 20 minutes frame
e.g.) if inference_seq_num is 6, you get back 40 values from 3 to 6

1.3.2 Callback Data Object in case of SESSION_COMPLETE

FieldTypeDescription
user_idStringuser id
session_idStringsession id
sleep_dataSleep Data ObjectFull 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.