REST Endpoints
Insiders API (1.22)
Download OpenAPI specification:Download
- Note that every endpoint has a trailing slash that is not optional
- API is protected by a throttling system to prevent abuse.
When too many requests are made to the API by a client, API will respond with HTTP 429.
Clients should check the
Retry-After
response's header indicating how long to wait before making a new request.
Get authenticated user account and profile data
This operation is restricted to authenticated users.
Authorizations:
Responses
Response samples
- 200
- 403
{- "id": 12,
- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "id": 12,
- "first_name": "Jon",
- "last_name": "Doe"
}, - "role": "MANAGER",
- "extra_permissions": [
- "can_create_managed_athletes"
]
}
Manager users are users that can interact with athletes and teams. They mainly assign performance data to athletes and invite into teams.
Creates a manager
This operation create a manager account and an email is sent to the user's email address, with the account credentials.
This operation is not restricted. Anyone can use this endpoint to register as a manager.
Authorizations:
Request Body schema: application/json
username required | string User's name used to authenticate himself/herself |
external_id | string User's external ID used from another organisation |
email required | string <email> User's contact email address |
object (ManagerProfile) |
Responses
Request samples
- Payload
{- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "first_name": "Jon",
- "last_name": "Doe"
}
}
Response samples
- 201
- 403
{- "id": 12,
- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "id": 12,
- "first_name": "Jon",
- "last_name": "Doe"
}
}
Retrieves a manager by its external id Deprecated
This operation is restricted to the manager himself.
Authorizations:
query Parameters
external-id required | string External ID |
Responses
Response samples
- 200
- 403
- 404
{- "id": 12,
- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "id": 12,
- "first_name": "Jon",
- "last_name": "Doe"
}
}
Retrieves a manager
This operation is restricted to the manager himself.
Authorizations:
path Parameters
manager required | integer Manager ID |
Responses
Response samples
- 200
- 403
- 404
{- "id": 12,
- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "id": 12,
- "first_name": "Jon",
- "last_name": "Doe"
}
}
Updates a manager
This operation is restricted to the manager himself.
Authorizations:
path Parameters
manager required | integer Manager ID |
Request Body schema: application/json
username required | string User's name used to authenticate himself/herself |
external_id | string User's external ID used from another organisation |
email required | string <email> User's contact email address |
object (ManagerProfile) |
Responses
Request samples
- Payload
{- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "first_name": "Jon",
- "last_name": "Doe"
}
}
Response samples
- 201
- 403
- 404
{- "id": 12,
- "username": "jon.doe@example.com",
- "external_id": "0123456789",
- "email": "jon.doe@example.com",
- "manager_profile": {
- "id": 12,
- "first_name": "Jon",
- "last_name": "Doe"
}
}
Changes the user's password
This operation is restricted to the manager himself.
Authorizations:
path Parameters
manager required | integer Manager ID |
Request Body schema: application/json
password | string <password> User's plain password |
Responses
Request samples
- Payload
{- "password": "SuperPassword$$123"
}
Response samples
- 404
{- "detail": "Not found"
}
Lists devices
This operation is restricted to manager users. It lists all devices they ever owned.
If current
is true
, it lists only devices they currently own.
Authorizations:
query Parameters
page | integer Page number |
limit | integer Number of results per page (max is 3000) |
ordering | string Enum: "device_name" "custom_name" "serial_number" "device_type" "activation_time" Order the results by specified field, ascendant. Prefix the field with |
search | string Multiple fields text search (case-insensitive partial matches).
|
current | boolean If |
device_name | string Filter on device_name (insensitive contains) |
serial_number | string Filter on serial_number (insensitive contains) |
device_type | string Filter on device_type (exact match) |
activation_time_from | string <date-time> Example: activation_time_from=2020-02-20T13:00:00+0100 Filter on activation_time (greater than or equal) |
activation_time_to | string <date-time> Example: activation_time_to=2020-02-20T18:00:00+0100 Filter on activation_time (lesser than or equal) |
custom_name | string Filter on custom_name (insensitive contains) |
activity | number Filter by activity (id), device will show up if linked to a timeframe, itself linked to this activity |
Responses
Response samples
- 200
- 403
{- "count": 150,
- "page": 2,
- "next": 3,
- "previous": 1,
- "results": [
- {
- "id": 12,
- "device_name": "864475041000000",
- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_type": "Model X 2000 Series",
- "firmware_version": "1.2.3",
- "custom_name": "My device 123"
}
]
}
Take ownership of a device
Give ownership to authenticated manager user and activate a device if it is not yet activated. Ownership start at request time and end at "2999-12-31T23:59:59.000Z".
This operation is restricted to the manager who currently owns the device or all manager users if device currently has no owner.
Authorizations:
Request Body schema: application/json
serial_number | string Serial number |
device_name | string Device name (identifier) |
Responses
Request samples
- Payload
{- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_name": "abcdefghij12345"
}
Response samples
- 201
- 400
- 403
- 404
{- "id": 12,
- "device_name": "864475041000000",
- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_type": "Model X 2000 Series",
- "firmware_version": "1.2.3",
- "custom_name": "My device 123"
}
Retrieves a device
This operation is restricted to the manager user who currently owns this device.
Authorizations:
path Parameters
device required | integer Device ID |
query Parameters
ordering | string Enum: "device_name" "custom_name" "serial_number" "device_type" "activation_time" Order the results by specified field, ascendant. Prefix the field with |
search | string Multiple fields text search (case-insensitive partial matches).
|
current | boolean If |
device_name | string Filter on device_name (insensitive contains) |
serial_number | string Filter on serial_number (insensitive contains) |
device_type | string Filter on device_type (exact match) |
activation_time_from | string <date-time> Example: activation_time_from=2020-02-20T13:00:00+0100 Filter on activation_time (greater than or equal) |
activation_time_to | string <date-time> Example: activation_time_to=2020-02-20T18:00:00+0100 Filter on activation_time (lesser than or equal) |
custom_name | string Filter on custom_name (insensitive contains) |
Responses
Response samples
- 200
- 403
- 404
{- "id": 12,
- "device_name": "864475041000000",
- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_type": "Model X 2000 Series",
- "firmware_version": "1.2.3",
- "custom_name": "My device 123"
}
Set device's custom name Deprecated
This operation is restricted to the manager user who currently owns this device.
Authorizations:
path Parameters
device required | integer Device ID |
Request Body schema: application/json
custom_name | string <= 60 characters A string matching the regex |
Responses
Request samples
- Payload
{- "custom_name": "My device 123"
}
Response samples
- 200
- 403
- 404
{- "id": 12,
- "device_name": "864475041000000",
- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_type": "Model X 2000 Series",
- "firmware_version": "1.2.3",
- "custom_name": "My device 123"
}
Relase device ownership
End authenticated manager user's current ownership on the device.
This operation is restricted to the manager who currently owns the device.
Authorizations:
path Parameters
device required | integer Device ID |
Responses
Response samples
- 400
- 403
- 404
{- "message": "Device has never been activated."
}
Bulk load an ASI file for a device
The .asi
file must be encoded in base64, then included in request body.
This operation is restricted to the manager who currently owns the device.
Authorizations:
path Parameters
device required | integer Device ID |
Request Body schema: application/json
asi_b64 required | string Base64 encoded |
Responses
Request samples
- Payload
{- "asi_b64": "QVNJAAAAEAQEBkFTSSBWMgAAAQUACAcIBwgHCAcIAhoAEAAQAA......"
}
Response samples
- 200
- 400
- 403
- 404
{- "id": 12,
- "job_id": "job-e429beeb-af8b-47ff-8e17-46e656fd5fa2",
- "state": "SUCCESS",
- "details": { }
}
Get bluetooth config for a device
Heartrate sensor corresponds to the pairing_1
field.
Powermeter sensor corresponds to the pairing_2
field.
For details about current
and target
configurations, see explanations for PATCH
.
This operation is restricted to the manager who currently owns the device.
Authorizations:
path Parameters
device required | integer Device ID |
Responses
Response samples
- 200
- 403
- 404
{- "status": "success",
- "data": {
- "current": {
- "pairing_1": {
- "mac_address": "02:32:f8:26:fa:ae",
- "name": "My heart rate bluetooth device"
}
}, - "target": {
- "pairing_1": {
- "mac_address": "02:32:f8:26:fa:ae",
- "name": "My heart rate bluetooth device"
}
}
}
}
Configure bluetooth pairing for a device
Both Heartrate (HR) and Powermeter bluetooth sensors are supported by the Intense device.
Heartrate sensor can be configured through the pairing_1
parameter.
Powermeter sensor can be configured through the pairing_2
parameter.
The Intense device can support both bluetooth sensors at the same time.
There are two different configurations to consider:
current
is the current configuration executed by the device as far as the server is aware. It will always be read only.target
is the configuration to be set on the device whenever it is ready to accept requests. This is the configuration that you can update. It will replacecurrent
only when the device starts and has successfully received the new configuration.
This means that a successful PATCH request is not guaranteed to result in a successful update to current
. You should make sure to properly handle any difference between current
and target
before making any further update to target
in order to avoid unwanted behavior.
This operation is restricted to the manager who currently owns the device.
Authorizations:
path Parameters
device required | integer Device ID |
query Parameters
immediate_sending | boolean If true, the configuration is immediately sent to device. Otherwise, it takes effect on device startup. |
Request Body schema: application/json
object | |||||
|
Responses
Request samples
- Payload
{- "pairing_1": {
- "mac_address": "02:32:f8:26:fa:ae",
- "name": "My heart rate bluetooth device"
}
}
Response samples
- 200
- 400
- 403
- 404
{- "status": "success",
- "data": {
- "current": {
- "pairing_1": {
- "mac_address": "02:32:f8:26:fa:ae",
- "name": "My heart rate bluetooth device"
}
}, - "target": {
- "pairing_1": {
- "mac_address": "02:32:f8:26:fa:ae",
- "name": "My heart rate bluetooth device"
}
}
}
}
Lists device ownerships
This operation is restricted to manager users.
Authorizations:
query Parameters
page | integer Page number |
limit | integer Number of results per page (max is 3000) |
device | string Filter on device ID |
device_name | string Filter on device's device name (exact match) |
start_time_from | string <date-time> Example: start_time_from=2020-02-20T18:00:00+0100 Filter on start_time (greater than or equal) |
start_time_to | string <date-time> Example: start_time_to=2020-02-20T18:00:00+0100 Filter on start_time (lesser than or equal) |
end_time_from | string <date-time> Example: end_time_from=2022-02-20T18:00:00+0100 Filter on end_time (greater than or equal) |
end_time_to | string <date-time> Example: end_time_to=2022-02-20T18:00:00+0100 Filter on end_time (lesser than or equal) |
Responses
Response samples
- 200
- 403
- 404
{- "id": 12,
- "start_time": "2019-11-21T19:57:45.000Z",
- "end_time": "2999-12-31T23:59:59.000Z",
- "device": 1,
- "manager": 1,
- "device_details": {
- "id": 12,
- "device_name": "864475041000000",
- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_type": "Model X 2000 Series",
- "firmware_version": "1.2.3",
- "custom_name": "My device 123"
}
}
Retrieves a device ownership
This operation is restricted to manager users.
Authorizations:
path Parameters
device_ownership required | integer Device ownership ID |
query Parameters
device | string Filter on device ID |
device_name | string Filter on device's device name (exact match) |
start_time_from | string <date-time> Example: start_time_from=2020-02-20T18:00:00+0100 Filter on start_time (greater than or equal) |
start_time_to | string <date-time> Example: start_time_to=2020-02-20T18:00:00+0100 Filter on start_time (lesser than or equal) |
end_time_from | string <date-time> Example: end_time_from=2022-02-20T18:00:00+0100 Filter on end_time (greater than or equal) |
end_time_to | string <date-time> Example: end_time_to=2022-02-20T18:00:00+0100 Filter on end_time (lesser than or equal) |
Responses
Response samples
- 200
- 403
- 404
{- "id": 12,
- "start_time": "2019-11-21T19:57:45.000Z",
- "end_time": "2999-12-31T23:59:59.000Z",
- "device": 1,
- "manager": 1,
- "device_details": {
- "id": 12,
- "device_name": "864475041000000",
- "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
- "device_type": "Model X 2000 Series",
- "firmware_version": "1.2.3",
- "custom_name": "My device 123"
}
}
Preprocessed data from a device worn by an athlete during an activity. Typically raw data with enhancement, like position in GPS cooridnates and relative to the field.
Retrieve device's latest timestamp
This operation is restricted to the manager who currently owns the device
Authorizations:
path Parameters
device required | integer Device ID |
Responses
Response samples
- 200
- 400
- 403
- 404
{- "timestamp": 1636800211900,
- "datetime": "2021-11-13T10:43:31.900000+00:00"
}
Retrieve device's latest preprocessed data
The response is unpaginated, and the items are ordered by timestamp in reverse order.
This operation is restricted to the manager who currently owns the device
Authorizations:
path Parameters
device required | integer Device ID |
query Parameters
size | integer Number of data to retrieve (max is 300) |
Responses
Response samples
- 200
- 400
- 403
- 404
[- {
- "gnss.altitude": 0,
- "gnss.latitude": 0,
- "gnss.longitude": 0,
- "gnss.speed": 0,
- "gnss.timestamp": 0,
- "ecg.hr": 0
}
]
Lists device's preprocessed data ranges of activity
A range is determined by a group of data close to another of 5 minutes or less between the previous and the next.
Interval between start
and stop
cannot exceed 14 days.
This operation is restricted to the manager who owned the device between start and stop.
Authorizations:
path Parameters
device required | integer Device ID |
query Parameters
required | integer or string Example: start=1622246400000 or 2021-05-29T00:00:00+0000 Sample start time in timestamp format in [ms] or in iso datetime format |
required | integer or string Example: stop=1622419200000 or 2021-05-31T00:00:00+0000 Sample stop time in timestamp format in [ms] or in iso datetime format |
start_iso required | string <date-time> Deprecated Example: start_iso=2021-05-29T00:00:00+0000 Query start datetime in iso format |
stop_iso required | string <date-time> Deprecated Example: stop_iso=2021-05-31T00:00:00+0000 Query stop datetime in iso format |
page | integer Page number |
limit | integer Number of results per page (max is 3000) |
Responses
Response samples
- 200
- 400
- 403
- 404
{- "count": 150,
- "page": 2,
- "next": 3,
- "previous": 1,
- "results": [
- {
- "start": "2021-05-29T16:12:00Z",
- "stop": "2021-05-29T17:31:11.900000Z",
- "size": 43830
}
]
}
Lists device's preprocessed data
Results of this query is cached for performance reasons. Cache is invalidated after 120 seconds.
Interval between start
and stop
cannot exceed 2 days.
This operation is restricted to the manager who owned the device between start and stop.
Authorizations:
path Parameters
device required | integer Device ID |
query Parameters
required | integer or string Example: start=1622246400000 or 2021-05-29T00:00:00+0000 Sample start time in timestamp format in [ms] or in iso datetime format |
required | integer or string Example: stop=1622419200000 or 2021-05-31T00:00:00+0000 Sample stop time in timestamp format in [ms] or in iso datetime format |
start_iso required | string <date-time> Deprecated Example: start_iso=2021-05-29T00:00:00+0000 Query start datetime in iso format |
stop_iso required | string <date-time> Deprecated Example: stop_iso=2021-05-31T00:00:00+0000 Query stop datetime in iso format |
page | integer Page number |
limit | integer Number of results per page (default is 10000, max is 25000) |
Responses
Response samples
- 200
- 400
- 403
- 404
{- "count": 150,
- "page": 2,
- "next": 3,
- "previous": 1,
- "results": [
- {
- "gnss.altitude": 0,
- "gnss.latitude": 0,
- "gnss.longitude": 0,
- "gnss.speed": 0,
- "gnss.timestamp": 0,
- "ecg.hr": 0
}
]
}
Get state and infos about a job
Replace /api/v1/matlab-jobs/{job}/info/
.
Authorizations:
path Parameters
job required | string Example: job-e429beeb-af8b-47ff-8e17-46e656fd5fa2 Job identifier |
Responses
Response samples
- 200
- 404
{- "id": 12,
- "job_id": "job-e429beeb-af8b-47ff-8e17-46e656fd5fa2",
- "state": "SUCCESS",
- "details": { }
}