The NOWATCH API
NOWATCH API (0.9.0)
https://docs.api.nowatch.tech/_mock/apis/
https://docs.api.nowatch.tech/nowatch/
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log/{id}
https://docs.api.nowatch.tech/nowatch/v1/sleep/log/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "id": "string", "start_datetime": "2019-08-24T14:15:22Z", "end_datetime": "2019-08-24T14:15:22Z", "userId": "string", "origin": 0, "details": [ -1 ], "confirmed": 0, "awakenings": [ { … } ], "modified_start_datetime": "2019-08-24T14:15:22Z", "modified_end_datetime": "2019-08-24T14:15:22Z" }
[UNKNOWN (-1), NAP (0), SLEPT_ENOUGH (1), RESTLESS_SLEEP (2), WOKE_UP_TIRED (3), WOKE_UP_ENERGISED (4)]
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log/{id}
https://docs.api.nowatch.tech/nowatch/v1/sleep/log/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"start_datetime": "string",
"end_datetime": "string",
"origin": 0,
"details": [
-1
],
"confirmed": 0,
"awakenings": [
{
"start_datetime": "string",
"end_datetime": "string",
"origin": 0,
"modified_start_datetime": "string",
"modified_end_datetime": "string"
}
],
"modified_start_datetime": "string",
"modified_end_datetime": "string"
}'- Mock server
https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log/{id}
https://docs.api.nowatch.tech/nowatch/v1/sleep/log/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock server
https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log
https://docs.api.nowatch.tech/nowatch/v1/sleep/log
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log?start_date=string&end_date=string' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'[ { "id": "string", "start_datetime": "2019-08-24T14:15:22Z", "end_datetime": "2019-08-24T14:15:22Z", "userId": "string", "origin": 0, "details": [ … ], "confirmed": 0, "awakenings": [ … ], "modified_start_datetime": "2019-08-24T14:15:22Z", "modified_end_datetime": "2019-08-24T14:15:22Z" } ]
[UNKNOWN (-1), NAP (0), SLEPT_ENOUGH (1), RESTLESS_SLEEP (2), WOKE_UP_TIRED (3), WOKE_UP_ENERGISED (4)]
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log
https://docs.api.nowatch.tech/nowatch/v1/sleep/log
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.api.nowatch.tech/_mock/apis/v1/sleep/log \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"sleep_logs": [
{
"start_datetime": "string",
"end_datetime": "string",
"origin": 0,
"details": [
-1
],
"confirmed": 0,
"awakenings": [
{
"start_datetime": "string",
"end_datetime": "string",
"origin": 0,
"modified_start_datetime": "string",
"modified_end_datetime": "string"
}
],
"modified_start_datetime": "string",
"modified_end_datetime": "string"
}
]
}'[ "string" ]
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep/processed
https://docs.api.nowatch.tech/nowatch/v2/sleep/processed
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.api.nowatch.tech/_mock/apis/v2/sleep/processed?start_date=string&end_date=string' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'shared-user: string'[ { "id": "string", "origin": -1, "confirmed_type": -1, "created_at": "2019-08-24T14:15:22Z", "start_datetime": "2019-08-24T14:15:22Z", "end_datetime": "2019-08-24T14:15:22Z", "details_data": [ … ], "stages": [ … ], "source_ids": [ … ], "metadata": {} } ]
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep/{id}
https://docs.api.nowatch.tech/nowatch/v2/sleep/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.api.nowatch.tech/_mock/apis/v2/sleep/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'shared-user: string'{ "id": "string", "origin": -1, "confirmed_type": -1, "created_at": "2019-08-24T14:15:22Z", "start_datetime": "2019-08-24T14:15:22Z", "end_datetime": "2019-08-24T14:15:22Z", "details_data": [ 0 ], "stages": [ {} ], "source_ids": [ "string" ], "metadata": {} }
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep/{id}
https://docs.api.nowatch.tech/nowatch/v2/sleep/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://docs.api.nowatch.tech/_mock/apis/v2/sleep/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": "string",
"origin": -1,
"confirmed_type": -1,
"created_at": "2019-08-24T14:15:22Z",
"start_datetime": "2019-08-24T14:15:22Z",
"end_datetime": "2019-08-24T14:15:22Z",
"details_data": [
0
],
"stages": [
{
"id": "string",
"start_datetime": "2019-08-24T14:15:22Z",
"end_datetime": "2019-08-24T14:15:22Z",
"type": 0
}
],
"source_ids": [
"string"
],
"metadata": {
"app_version": "string",
"algorithm_version": "string",
"platform": "string"
}
}'"string"
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep/{id}
https://docs.api.nowatch.tech/nowatch/v2/sleep/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.api.nowatch.tech/_mock/apis/v2/sleep/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep
https://docs.api.nowatch.tech/nowatch/v2/sleep
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.api.nowatch.tech/_mock/apis/v2/sleep?start_date=string&end_date=string' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'shared-user: string'[ { "id": "string", "origin": -1, "confirmed_type": -1, "created_at": "2019-08-24T14:15:22Z", "start_datetime": "2019-08-24T14:15:22Z", "end_datetime": "2019-08-24T14:15:22Z", "details_data": [ … ], "stages": [ … ], "source_ids": [ … ], "metadata": {} } ]
- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep
https://docs.api.nowatch.tech/nowatch/v2/sleep
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.api.nowatch.tech/_mock/apis/v2/sleep \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"sleeps": [
{
"id": "string",
"origin": -1,
"confirmed_type": -1,
"created_at": "2019-08-24T14:15:22Z",
"start_datetime": "2019-08-24T14:15:22Z",
"end_datetime": "2019-08-24T14:15:22Z",
"details_data": [
0
],
"stages": [
{
"id": "string",
"start_datetime": "2019-08-24T14:15:22Z",
"end_datetime": "2019-08-24T14:15:22Z",
"type": 0
}
],
"source_ids": [
"string"
],
"metadata": {
"app_version": "string",
"algorithm_version": "string",
"platform": "string"
}
}
]
}'- Mock server
https://docs.api.nowatch.tech/_mock/apis/v2/sleep/batch
https://docs.api.nowatch.tech/nowatch/v2/sleep/batch
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://docs.api.nowatch.tech/_mock/apis/v2/sleep/batch \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"sleeps": [
{
"id": "string",
"origin": -1,
"confirmed_type": -1,
"created_at": "2019-08-24T14:15:22Z",
"start_datetime": "2019-08-24T14:15:22Z",
"end_datetime": "2019-08-24T14:15:22Z",
"details_data": [
0
],
"stages": [
{
"id": "string",
"start_datetime": "2019-08-24T14:15:22Z",
"end_datetime": "2019-08-24T14:15:22Z",
"type": 0
}
],
"source_ids": [
"string"
],
"metadata": {
"app_version": "string",
"algorithm_version": "string",
"platform": "string"
}
}
]
}'[ "string" ]