Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
https://dum-staging.aetherdigitaltherapy.com
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {ACCESS_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Main Aether API (api.aetherdigitaltherapy.com) is used to authorize requests to this API too. You can retrieve access token by calling the /api/login endpoint on main Aether API. Then use your access token same way as in main API. Requests from local network do not require any authorization.
Charts
Get chart breakdown
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/charts/grip/2" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_from\": \"2023-05-01\",
\"date_to\": \"2023-05-10\",
\"group\": \"grip\",
\"grips\": [
1,
2,
5
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/charts/grip/2"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_from": "2023-05-01",
"date_to": "2023-05-10",
"group": "grip",
"grips": [
1,
2,
5
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success response):
[
{
"group_by": "1",
"device_id": "66",
"grip": "1",
"instances": "158",
"time": "62050",
"percentage": "31.3492",
"goal": "158"
},
{
"group_by": "2",
"device_id": "66",
"grip": "2",
"instances": "44",
"time": "2524",
"percentage": "8.7302",
"goal": "44"
},
{
"group_by": "3",
"device_id": "66",
"grip": "3",
"instances": "6",
"time": "24",
"percentage": "1.1905",
"goal": "6"
},
{
"group_by": "4",
"device_id": "66",
"grip": "4",
"instances": "44",
"time": "8234",
"percentage": "8.7302",
"goal": "44"
},
{
"group_by": "6",
"device_id": "66",
"grip": "6",
"instances": "164",
"time": "134904",
"percentage": "32.5397",
"goal": "164"
},
{
"group_by": "7",
"device_id": "66",
"grip": "7",
"instances": "52",
"time": "8760",
"percentage": "10.3175",
"goal": "52"
},
{
"group_by": "8",
"device_id": "66",
"grip": "8",
"instances": "14",
"time": "160",
"percentage": "2.7778",
"goal": "14"
},
{
"group_by": "9",
"device_id": "66",
"grip": "9",
"instances": "22",
"time": "11746",
"percentage": "4.3651",
"goal": "22"
}
]
Received response:
Request failed with error:
Get chart grasp count
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/charts/grip-count/8" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_from\": \"2023-05-01\",
\"date_to\": \"2023-05-10\",
\"group\": \"grip\",
\"grips\": [
1,
2,
5
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/charts/grip-count/8"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_from": "2023-05-01",
"date_to": "2023-05-10",
"group": "grip",
"grips": [
1,
2,
5
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success response):
[
{
"group_by": "1",
"device_id": "75",
"grip": "1",
"instances": "324",
"percentage": "36.7764",
"goal": "9"
},
{
"group_by": "2",
"device_id": "75",
"grip": "2",
"instances": "6",
"percentage": "0.6810",
"goal": "3"
},
{
"group_by": "3",
"device_id": "75",
"grip": "3",
"instances": "11",
"percentage": "1.2486",
"goal": "2"
},
{
"group_by": "6",
"device_id": "75",
"grip": "6",
"instances": "374",
"percentage": "42.4518",
"goal": "9"
},
{
"group_by": "7",
"device_id": "75",
"grip": "7",
"instances": "24",
"percentage": "2.7242",
"goal": "6"
},
{
"group_by": "8",
"device_id": "75",
"grip": "8",
"instances": "1",
"percentage": "0.1135",
"goal": "1"
},
{
"group_by": "12",
"device_id": "75",
"grip": "12",
"instances": "141",
"percentage": "16.0045",
"goal": "5"
}
]
Received response:
Request failed with error:
Get emg peak chart data
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/charts/emg-peak/9" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"period\": \"day\",
\"date_from\": \"2023-05-01\",
\"date_to\": \"2023-05-10\"
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/charts/emg-peak/9"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"period": "day",
"date_from": "2023-05-01",
"date_to": "2023-05-10"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success response for full range):
[
{
"device_id": 1,
"period": "all",
"datetime_interval": "04:45:00",
"count": "160"
},
{
"device_id": 1,
"period": "all",
"datetime_interval": "05:00:00",
"count": "792"
},
{
"device_id": 1,
"period": "all",
"datetime_interval": "05:15:00",
"count": "1112"
},
{
"device_id": 1,
"period": "all",
"datetime_interval": "05:30:00",
"count": "880"
},
{
"device_id": 1,
"period": "all",
"datetime_interval": "05:45:00",
"count": "848"
}
]
Example response (200, Success response month):
[
{
"device_id": 1,
"period": "month",
"datetime_interval": "2022-07 18:45",
"count": "2184"
},
{
"device_id": 1,
"period": "month",
"datetime_interval": "2022-07 19:00",
"count": "2800"
},
{
"device_id": 1,
"period": "month",
"datetime_interval": "2022-07 19:15",
"count": "1312"
},
{
"device_id": 1,
"period": "month",
"datetime_interval": "2022-07 19:30",
"count": "1064"
},
]
Example response (200, Success response day):
[
{
"device_id": 1,
"period": "day",
"datetime_interval": "2022-07-27 15:00",
"count": "304"
},
{
"device_id": 1,
"period": "day",
"datetime_interval": "2022-07-27 15:15",
"count": "2032"
},
{
"device_id": 1,
"period": "day",
"datetime_interval": "2022-07-27 15:30",
"count": "2296"
},
{
"device_id": 1,
"period": "day",
"datetime_interval": "2022-07-27 15:45",
"count": "2544"
}
]
Received response:
Request failed with error:
Get chart velocity level data
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/charts/velocity-level/4" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_from\": \"2023-05-01\",
\"date_to\": \"2023-05-10\",
\"group\": \"grip\",
\"grips\": [
1,
2,
5
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/charts/velocity-level/4"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_from": "2023-05-01",
"date_to": "2023-05-10",
"group": "grip",
"grips": [
1,
2,
5
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success response):
[
{
"group_by": "15",
"device_id": 1016,
"grip": 1,
"velocity_open_1": "127",
"velocity_open_2": "127",
"velocity_open_3": "0",
"velocity_close_1": "508",
"velocity_close_2": "0",
"velocity_close_3": "0"
},
{
"group_by": "15",
"device_id": 1016,
"grip": 2,
"velocity_open_1": "3683",
"velocity_open_2": "4826",
"velocity_open_3": "5334",
"velocity_close_1": "32131",
"velocity_close_2": "2159",
"velocity_close_3": "4445"
},
{
"group_by": "15",
"device_id": 1016,
"grip": 6,
"velocity_open_1": "4064",
"velocity_open_2": "4572",
"velocity_open_3": "6858",
"velocity_close_1": "27178",
"velocity_close_2": "1270",
"velocity_close_3": "1651"
},
{
"group_by": "15",
"device_id": 1016,
"grip": 7,
"velocity_open_1": "254",
"velocity_open_2": "889",
"velocity_open_3": "0",
"velocity_close_1": "1651",
"velocity_close_2": "127",
"velocity_close_3": "0"
}
]
Received response:
Request failed with error:
Get chart active and passive time spent
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/charts/time-spent/19" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_from\": \"2023-05-01\",
\"date_to\": \"2023-05-10\",
\"group\": \"day\"
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/charts/time-spent/19"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date_from": "2023-05-01",
"date_to": "2023-05-10",
"group": "day"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success response for day group):
[
{
"passive_time": 0,
"active_time": 0,
"group_by": "2023-12-03"
},
{
"passive_time": 0,
"active_time": 0,
"group_by": "2023-12-04"
},
{
"passive_time": 0,
"active_time": 0,
"group_by": "2023-12-05"
},
{
"passive_time": 0,
"active_time": 0,
"group_by": "2023-12-06"
},
{
"passive_time": 25128,
"active_time": 0,
"group_by": "2023-12-07"
},
{
"passive_time": 86022,
"active_time": 377,
"group_by": "2023-12-08"
},
{
"passive_time": 86399,
"active_time": 0,
"group_by": "2023-12-09"
}
]
Example response (200, Success response for all data):
{
"passive_time": 38600,
"active_time": 1000,
"percentage_passive_time": 97.47,
"percentage_active_time": 2.52,
"group_by": "none"
}
Received response:
Request failed with error:
Clean data
Save EMG peak
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"sensor": 0, "emg_peak": 92, "datetime": "2022-05-30 12:00:00"},
{"sensor": 1, "emg_peak": 50, "datetime": "2022-05-30 12:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/emg-peaks" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"sensor\": 1,
\"emg_peak\": 92,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/emg-peaks"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"sensor": 1,
"emg_peak": 92,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save grasp count
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"grip": 1, "grasp_count": 5, "datetime": "2022-05-30 12:00:00"},
{"grip": 2, "grasp_count": 30, "datetime": "2022-05-30 12:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grasp-count" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"grip\": 1,
\"grasp_count\": 5,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grasp-count"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"grip": 1,
"grasp_count": 5,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save grip switches
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{
"switched_from_grip": 1,
"n_switches_to_1": 1,
"n_switches_to_2": 0,
"n_switches_to_3": 0,
"n_switches_to_4": 0,
"n_switches_to_5": 1,
"n_switches_to_6": 0,
"n_switches_to_7": 3,
"n_switches_to_8": 1,
"n_switches_to_9": 1,
"datetime": "2022-05-30 00:00:00"
},
{
"switched_from_grip": 2,
"n_switches_to_1": 1,
"n_switches_to_2": 0,
"n_switches_to_3": 0,
"n_switches_to_4": 11,
"n_switches_to_5": 1,
"n_switches_to_6": 5,
"n_switches_to_7": 3,
"n_switches_to_8": 1,
"n_switches_to_9": 1,
"datetime": "2022-05-30 00:00:00"
},
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-switches" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"switched_from_grip\": 1,
\"n_switches_to_1\": 1,
\"n_switches_to_2\": 1,
\"n_switches_to_3\": 1,
\"n_switches_to_4\": 1,
\"n_switches_to_5\": 1,
\"n_switches_to_6\": 1,
\"n_switches_to_7\": 1,
\"n_switches_to_8\": 1,
\"n_switches_to_9\": 1,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-switches"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"switched_from_grip": 1,
"n_switches_to_1": 1,
"n_switches_to_2": 1,
"n_switches_to_3": 1,
"n_switches_to_4": 1,
"n_switches_to_5": 1,
"n_switches_to_6": 1,
"n_switches_to_7": 1,
"n_switches_to_8": 1,
"n_switches_to_9": 1,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save grip transitions
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"grip": 1, "time_spent": "26.5", "datetime": "2022-05-30 12:00:00"},
{"grip": 7, "time_spent": "15.0", "datetime": "2022-05-30 12:23:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-transitions" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"grip\": 1,
\"time_spent\": 100,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-transitions"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"grip": 1,
"time_spent": 100,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save motor currents
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"avg_current_motor_1": 220, "avg_current_motor_2": 199, "avg_current_motor_3": 185, "avg_current_motor_4": 195, "avg_current_motor_5": 201, "datetime": "2022-05-30 12:00:00"},
{"avg_current_motor_1": 201, "avg_current_motor_2": 195, "avg_current_motor_3": 220, "avg_current_motor_4": 185, "avg_current_motor_5": 199, "datetime": "2022-05-30 13:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/motor-currents" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"avg_current_motor_1\": 220,
\"avg_current_motor_2\": 220,
\"avg_current_motor_3\": 220,
\"avg_current_motor_4\": 220,
\"avg_current_motor_5\": 220,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/motor-currents"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"avg_current_motor_1": 220,
"avg_current_motor_2": 220,
"avg_current_motor_3": 220,
"avg_current_motor_4": 220,
"avg_current_motor_5": 220,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save open close cycles
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"grip_type": 1, "n_open_cycles": 10, "n_close_cycles": 8, "datetime": "2022-05-30 12:00:00"},
{"grip_type": 5, "n_open_cycles": 15, "n_close_cycles": 18, "datetime": "2022-05-30 12:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/oc-cycles" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"grip_type\": 1,
\"n_open_cycles\": 10,
\"n_close_cycles\": 8,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/oc-cycles"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"grip_type": 1,
"n_open_cycles": 10,
"n_close_cycles": 8,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save stall times
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"stall_time_motor_1": 10, "stall_time_motor_2": 10, "stall_time_motor_3": 10, "stall_time_motor_4": 10, "stall_time_motor_5": 10, "datetime": "2022-05-30 12:00:00"},
{"stall_time_motor_1": 10, "stall_time_motor_2": 10, "stall_time_motor_3": 10, "stall_time_motor_4": 10, "stall_time_motor_5": 10, "datetime": "2022-05-30 13:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/stall-times" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"stall_time_motor_1\": 10,
\"stall_time_motor_2\": 10,
\"stall_time_motor_3\": 10,
\"stall_time_motor_4\": 10,
\"stall_time_motor_5\": 10,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/stall-times"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"stall_time_motor_1": 10,
"stall_time_motor_2": 10,
"stall_time_motor_3": 10,
"stall_time_motor_4": 10,
"stall_time_motor_5": 10,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save velocity levels
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{
"grip": 1,
"t_open_velocity_1": 1024, "t_open_velocity_2": 256, "t_open_velocity_3": 0,
"t_close_velocity_1": 1024, "t_close_velocity_2": 256, "t_close_velocity_3": 0,
"t_powermode": 35, "datetime": "2022-05-30 12:00:00"
},
{
"grip": 2,
"t_open_velocity_1": 1024, "t_open_velocity_2": 256, "t_open_velocity_3": 0,
"t_close_velocity_1": 1024, "t_close_velocity_2": 256, "t_close_velocity_3": 0,
"t_powermode": 35, "datetime": "2022-05-30 12:00:00"
}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/velocity-levels" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"grip\": 1,
\"t_open_velocity_1\": 1024,
\"t_open_velocity_2\": 768,
\"t_open_velocity_3\": 512,
\"t_close_velocity_1\": 1024,
\"t_close_velocity_2\": 512,
\"t_close_velocity_3\": 256,
\"t_powermode\": 35,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/velocity-levels"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"grip": 1,
"t_open_velocity_1": 1024,
"t_open_velocity_2": 768,
"t_open_velocity_3": 512,
"t_close_velocity_1": 1024,
"t_close_velocity_2": 512,
"t_close_velocity_3": 256,
"t_powermode": 35,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save data errors
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"error_code": 256, "datetime": "2022-05-30 12:00:00"},
{"error_code": 30, "datetime": "2022-05-30 13:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/errors" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"error_code\": 256,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/errors"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"error_code": 256,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save active time
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"active_time": 7, "datetime": "2022-06-30 12:00:00"},
{"active_time": 30, "datetime": "2022-06-30 12:23:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/active-time" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"active_time\": 30,
\"datetime\": \"2022-06-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/active-time"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"active_time": 30,
"datetime": "2022-06-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save power ups/downs
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"power": 1, "datetime": "2022-06-30 12:00:00"},
{"power": 0, "datetime": "2022-06-30 12:30:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/power" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"power\": 1,
\"datetime\": \"2022-06-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/power"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"power": 1,
"datetime": "2022-06-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save wear time
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"wear_time": 112, "datetime": "2024-04-12 12:00:00"},
{"wear_time": 212, "datetime": "2024-04-13 12:00:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/wear-time" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"wear_time\": 30,
\"datetime\": \"2022-06-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/wear-time"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"wear_time": 30,
"datetime": "2022-06-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Save grip transitions (V2)
requires authentication
Request body should look like:
{
"device_id": 1,
"data": [
{"grip": 1, "transitions": 50, "time_spent": "26.5", "datetime": "2022-05-30 12:00:00"},
{"grip": 7, "transitions": 30, "time_spent": "15.0", "datetime": "2022-05-30 12:23:00"}
]
}
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-transitions/v2" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"device_id\": 1,
\"data\": [
{
\"grip\": 1,
\"transitions\": 30,
\"time_spent\": 100,
\"datetime\": \"2022-05-30 12:00:00\"
}
]
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-transitions/v2"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"device_id": 1,
"data": [
{
"grip": 1,
"transitions": 30,
"time_spent": 100,
"datetime": "2022-05-30 12:00:00"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Saved 100 entries"
}
Received response:
Request failed with error:
Get latest grip transition (V2)
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-transition/v2/16" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/clean-data/grip-transition/v2/16"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 3491,
"device_id": 774,
"grip": "8",
"transitions": "162",
"time_spent": "662.50",
"datetime": "1995-04-25 00:55:02"
}
Example response (403, Insufficient permission):
{
"message": "Insufficient permission"
}
Example response (404, No grip transitions for given device):
{
"message": "No grip transitions (V2) for given device"
}
Received response:
Request failed with error:
Goals
Get goals status
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/goals/status" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"devices\": [
1
],
\"date_from\": \"2023-05-01\",
\"date_to\": \"2023-05-10\"
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/goals/status"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"devices": [
1
],
"date_from": "2023-05-01",
"date_to": "2023-05-10"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
vary: Origin
{
"message": "Unauthenticated (invalid token)"
}
Received response:
Request failed with error:
Raw data
Send raw file
requires authentication
Save raw file with DUM data to process later
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/raw-data" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "device_id=1" \
--form "type=background" \
--form "upload_date=1971-01-09 21:30:06" \
--form "file=@/tmp/phphaWpSm" const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-data"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('device_id', '1');
body.append('type', 'background');
body.append('upload_date', '1971-01-09 21:30:06');
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"id": 15606,
"device_id": 877,
"file": "/tmp/fakernbOchp",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "manual",
"upload_date": "1999-08-01 01:24:13",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
Received response:
Request failed with error:
Download raw file
requires authentication
Download raw file with DUM data to process. Once fetched data is marked as processed and will not be available on this endpoint anymore.
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/raw-data" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-data"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 15607,
"device_id": 659,
"file": "/tmp/fakerae2JR0",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "manual",
"upload_date": "1972-12-22 10:49:44",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
Example response (404, No data to process):
{
"message": "No data to process"
}
Received response:
Request failed with error:
Show all raw files
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/raw-files?order=asc&perpage=20&page=1" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-files"
);
const params = {
"order": "asc",
"perpage": "20",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"paginator": {
"total": 2,
"count": 2,
"perpage": 20,
"current_page": 1,
"last_page": 1
},
"items": [
{
"id": 15608,
"device_id": 579,
"file": "/tmp/fakerCtCGef",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "fetching",
"upload_date": "1980-11-13 13:28:52",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
},
{
"id": 15609,
"device_id": 132,
"file": "/tmp/fakerLOEsLm",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "fetching",
"upload_date": "2021-12-27 09:40:08",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
]
}
Received response:
Request failed with error:
Update raw file information
requires authentication
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/raw-file/cumque" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_corrupted\": 0,
\"version\": \"release\\/1.6.0\"
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-file/cumque"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_corrupted": 0,
"version": "release\/1.6.0"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 15610,
"device_id": 795,
"file": "/tmp/fakerykUNrV",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "fetching",
"upload_date": "1981-05-07 11:27:53",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
Example response (404, File not found):
{
"message": "File not found"
}
Received response:
Request failed with error:
Send raw file (V2)
requires authentication
Save raw file with DUM data to process later
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/raw-data/v2" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "device_id=1" \
--form "type=background" \
--form "upload_date=2014-11-26 23:32:58" \
--form "file=@/tmp/phpr5uB5B" const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-data/v2"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('device_id', '1');
body.append('type', 'background');
body.append('upload_date', '2014-11-26 23:32:58');
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"id": 4083,
"device_id": 210,
"file": "/tmp/fakerHP1w6D",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "manual",
"upload_date": "2015-11-30 10:00:06",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
Received response:
Request failed with error:
Download raw file (V2)
requires authentication
Download raw file with DUM data to process. Once fetched data is marked as processed and will not be available on this endpoint anymore.
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/raw-data/v2" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-data/v2"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 4084,
"device_id": 934,
"file": "/tmp/fakerRjSs3P",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "fetching",
"upload_date": "1985-01-27 15:36:03",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
Example response (404, No data to process):
{
"message": "No data to process"
}
Received response:
Request failed with error:
Show all raw files (V2)
requires authentication
Example request:
curl --request GET \
--get "https://dum-staging.aetherdigitaltherapy.com/api/raw-files/v2?order=asc&perpage=20&page=1" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-files/v2"
);
const params = {
"order": "asc",
"perpage": "20",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"paginator": {
"total": 2,
"count": 2,
"perpage": 20,
"current_page": 1,
"last_page": 1
},
"items": [
{
"id": 4085,
"device_id": 793,
"file": "/tmp/fakerBaEULa",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "manual",
"upload_date": "1981-04-27 01:51:33",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
},
{
"id": 4086,
"device_id": 805,
"file": "/tmp/fakerDijf1U",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "fetching",
"upload_date": "1995-11-07 05:20:51",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
]
}
Received response:
Request failed with error:
Update raw file information (V2)
requires authentication
Example request:
curl --request POST \
"https://dum-staging.aetherdigitaltherapy.com/api/raw-file/v2/in" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_corrupted\": 0,
\"version\": \"release\\/1.6.0\"
}"
const url = new URL(
"https://dum-staging.aetherdigitaltherapy.com/api/raw-file/v2/in"
);
const headers = {
"Authorization": "Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_corrupted": 0,
"version": "release\/1.6.0"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 4087,
"device_id": 538,
"file": "/tmp/fakerXXrhou",
"status": "0",
"is_corrupted": "0",
"version": null,
"type": "fetching",
"upload_date": "1981-05-07 15:50:42",
"created_at": "2024-12-13T13:37:37.000000Z",
"updated_at": "2024-12-13T13:37:37.000000Z"
}
Example response (404, File not found):
{
"message": "File not found"
}
Received response:
Request failed with error: