Skip to main content

REST Endpoints

Insiders API (1.22)

Download OpenAPI specification:Download

Warnings ⚠️

  • 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.

Account

Authenticated user personnal account and profile.

Get authenticated user account and profile data

This operation is restricted to authenticated users.

Authorizations:
OAuth2Security

Responses

Response samples

Content type
application/json
Example
{
  • "id": 12,
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    },
  • "role": "MANAGER",
  • "extra_permissions": [
    ]
}

Managers

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:
OAuth2Security
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

Content type
application/json
{
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    }
}

Response samples

Content type
application/json
{
  • "id": 12,
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    }
}

Retrieves a manager by its external id Deprecated

This operation is restricted to the manager himself.

Authorizations:
OAuth2Security
query Parameters
external-id
required
string

External ID

Responses

Response samples

Content type
application/json
{
  • "id": 12,
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    }
}

Retrieves a manager

This operation is restricted to the manager himself.

Authorizations:
OAuth2Security
path Parameters
manager
required
integer

Manager ID

Responses

Response samples

Content type
application/json
{
  • "id": 12,
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    }
}

Updates a manager

This operation is restricted to the manager himself.

Authorizations:
OAuth2Security
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

Content type
application/json
{
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    }
}

Response samples

Content type
application/json
{
  • "id": 12,
  • "username": "jon.doe@example.com",
  • "external_id": "0123456789",
  • "email": "jon.doe@example.com",
  • "manager_profile": {
    }
}

Deletes a manager

This operation is restricted to the manager himself.

Authorizations:
OAuth2Security
path Parameters
manager
required
integer

Manager ID

Responses

Response samples

Content type
application/json
{
  • "detail": "You do not have permission to perform this action."
}

Changes the user's password

This operation is restricted to the manager himself.

Authorizations:
OAuth2Security
path Parameters
manager
required
integer

Manager ID

Request Body schema: application/json
password
string <password>

User's plain password

Responses

Request samples

Content type
application/json
{
  • "password": "SuperPassword$$123"
}

Response samples

Content type
application/json
{
  • "detail": "Not found"
}

Devices

Devices are sensors developped and made available by Insiders.

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:
OAuth2Security
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 - to reverse order.

search
string

Multiple fields text search (case-insensitive partial matches).

  • Device name
  • Custom name
  • Serial number
current
boolean

If true, list only manager's devices currently owned. If not or unspecified, list all previously and currently owned devices.

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

Content type
application/json
{
  • "count": 150,
  • "page": 2,
  • "next": 3,
  • "previous": 1,
  • "results": [
    ]
}

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:
OAuth2Security
Request Body schema: application/json
serial_number
string

Serial number

device_name
string

Device name (identifier)

Responses

Request samples

Content type
application/json
{
  • "serial_number": "a8e035ee-66be-4c90-a82a-437ada22a8dd",
  • "device_name": "abcdefghij12345"
}

Response samples

Content type
application/json
{
  • "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:
OAuth2Security
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 - to reverse order.

search
string

Multiple fields text search (case-insensitive partial matches).

  • Device name
  • Custom name
  • Serial number
current
boolean

If true, list only manager's devices currently owned. If not or unspecified, list all previously and currently owned devices.

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

Content type
application/json
{
  • "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:
OAuth2Security
path Parameters
device
required
integer

Device ID

Request Body schema: application/json
custom_name
string <= 60 characters

A string matching the regex /^[\w\_\-\ ]+$/

Responses

Request samples

Content type
application/json
{
  • "custom_name": "My device 123"
}

Response samples

Content type
application/json
{
  • "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:
OAuth2Security
path Parameters
device
required
integer

Device ID

Responses

Response samples

Content type
application/json
{
  • "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:
OAuth2Security
path Parameters
device
required
integer

Device ID

Request Body schema: application/json
asi_b64
required
string

Base64 encoded .asi file

Responses

Request samples

Content type
application/json
{
  • "asi_b64": "QVNJAAAAEAQEBkFTSSBWMgAAAQUACAcIBwgHCAcIAhoAEAAQAA......"
}

Response samples

Content type
application/json
{
  • "id": 12,
  • "job_id": "job-e429beeb-af8b-47ff-8e17-46e656fd5fa2",
  • "state": "SUCCESS",
  • "details": { }
}

Bluetooth

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:
OAuth2Security
path Parameters
device
required
integer

Device ID

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

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 replace current 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:
OAuth2Security
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
mac_address
required
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "pairing_1": {
    }
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

DeviceOwnerships

Device ownerships define that a device is owned by a manager during a certain time

Lists device ownerships

This operation is restricted to manager users.

Authorizations:
OAuth2Security
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

Content type
application/json
{
  • "id": 12,
  • "start_time": "2019-11-21T19:57:45.000Z",
  • "end_time": "2999-12-31T23:59:59.000Z",
  • "device": 1,
  • "manager": 1,
  • "device_details": {
    }
}

Retrieves a device ownership

This operation is restricted to manager users.

Authorizations:
OAuth2Security
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

Content type
application/json
{
  • "id": 12,
  • "start_time": "2019-11-21T19:57:45.000Z",
  • "end_time": "2999-12-31T23:59:59.000Z",
  • "device": 1,
  • "manager": 1,
  • "device_details": {
    }
}

PreprocessedData

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:
OAuth2Security
path Parameters
device
required
integer

Device ID

Responses

Response samples

Content type
application/json
{
  • "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:
OAuth2Security
path Parameters
device
required
integer

Device ID

query Parameters
size
integer

Number of data to retrieve (max is 300)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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:
OAuth2Security
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

Content type
application/json
{
  • "count": 150,
  • "page": 2,
  • "next": 3,
  • "previous": 1,
  • "results": [
    ]
}

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:
OAuth2Security
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

Content type
application/json
{
  • "count": 150,
  • "page": 2,
  • "next": 3,
  • "previous": 1,
  • "results": [
    ]
}

Jobs

Computing jobs states and details.

Get state and infos about a job

Replace /api/v1/matlab-jobs/{job}/info/.

Authorizations:
OAuth2Security
path Parameters
job
required
string
Example: job-e429beeb-af8b-47ff-8e17-46e656fd5fa2

Job identifier

Responses

Response samples

Content type
application/json
{
  • "id": 12,
  • "job_id": "job-e429beeb-af8b-47ff-8e17-46e656fd5fa2",
  • "state": "SUCCESS",
  • "details": { }
}