ASI API (0.1.14)

Download OpenAPI specification:Download

This API aims to give access to ASI's devices' data on the behalf of these device's users. A getting started guide is available on https://api.asi.swiss/doc/getting_started.html. A JSON schema guide is available on https://api.asi.swiss/doc/jsonschema_guide.html. This API plans to have 4 releases per year and keep compatibility with the 4 latest released versions. Note that every endpoint has a trailing slash that is not optional.

Version 0.1.14 (latest)

  • Fix incorrect computed data after timeframe or activity update, uuid of this objects are now internal fields so they will soon be removed from API resource representation
  • Fix a bug where a manager could not create managed athletes
  • Fix documentation about Matlab jobs
  • Add JSON schema guide

Version 0.1.13

  • Athlete accounts managed by managers
  • Add routes to retrieve athlete or manager by their external ID

Version 0.1.12

  • Timeframe and activity export to file
  • Removed device /activate/ and /deactivate/, replaced by /own/ and /release-ownership/

Authentication

oauth2Security

This API uses OAuth 2 with the authorization code grant flow.

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: /oauth2/authorize
Token URL: /oauth2/token
Scopes:
  • all -

    Access to all data

Account

Authenticated user personnal account and profile.

Get authenticated user account and profile data

This operation is restricted to authenticated users.

Authorizations:

Responses

Response samples

Content type
application/json
Example
{
  • "id": 1,
  • "username": "jon.doe@example.com",
  • "email": "jon.doe@example.com",
  • "external_id": "string",
  • "managed_by": 1,
  • "athlete_profile":
    {
    }
}

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

User's name used to authenticate himselft/herself

email
required
string <email>

User's contact email address

external_id
string

User's external ID used from another organisation

object (ManagerProfile)

Responses

Request samples

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

Response samples

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

Retrieves a manager

This operation is restricted to the manager himself.

Authorizations:
path Parameters
manager
required
integer <int64>

Manager ID

Responses

Response samples

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