Firstbeat Cloud API (1.1.0)

Download OpenAPI specification:

account

Register as an API consumer

Register as a new API consumer using a name that uniquely and unambiguously identifies you or your organization

Request Body schema: */*
required

Created API Consumer object

consumerName
required
string [ 2 .. 100 ] characters

Responses

Response samples

Content type
application/json
{
  • "id": "0df33d4b-f526-4040-ad6e-447589f810f5",
  • "consumerName": "Firstbeat Technologies",
  • "sharedSecret": "5e03d766-4d55-4c88-a011-f0785bccb671"
}

Request an API key

Retrieve consumer specific API key needed to access other endpoints

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

Responses

Response samples

Content type
application/json
{
  • "apiKey": "uBncM0LcXT40ncZfZYSkW448cAdPAgLCKHiJ2fG6"
}

Get a new shared secret

Retrieve a new shared secret that must be confirmed using /account/new-secret/confirm endpoint before it can be used for other purposes

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "sharedSecret": "4c70e131-8c81-49eb-a14f-c682c310767b"
}

Confirm new shared secret

Confirm your possession of a new shared secret and invalidate the previous shared secret

header Parameters
Authorization
required
string

Use the new shared secret to generate the token. Format: Bearer NEW_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

sports

Get accounts

Get Firstbeat Sports accounts linked to your API consumer

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "accounts": [
    ]
}

Get possible values of sportsType

Get possible values for field sportsType in measurements and sessions

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
[
  • "football",
  • "americanFootball",
  • "rugbySevens",
  • "rugbyUnion",
  • "rugbyLeague",
  • "fieldHockey",
  • "iceHockey",
  • "ringette",
  • "baseball",
  • "basketball",
  • "futsal",
  • "volleyball",
  • "beachVolleyball",
  • "floorball",
  • "handball",
  • "lacrosse",
  • "softball",
  • "gaelicFootball",
  • "australianFootball",
  • "cricket",
  • "tennis",
  • "badminton",
  • "squash",
  • "ultimate",
  • "trailRunning",
  • "running",
  • "treadmillRunning",
  • "orienteering",
  • "strength",
  • "cardio",
  • "xcSkiing",
  • "biathlon",
  • "roadCycling",
  • "indoorCycling",
  • "mountainBiking",
  • "bmx",
  • "alpineSkiing",
  • "swimming",
  • "walking",
  • "nordicWalking",
  • "snowboarding",
  • "rowing",
  • "mountaineering",
  • "hiking",
  • "multisport",
  • "triathlon",
  • "golf",
  • "inlineSkating",
  • "climbing",
  • "iceSkating",
  • "taekwondo"
]

Get possible values of eventType

Get possible values for field eventType in measurements and sessions

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
[
  • "race",
  • "game",
  • "rehab",
  • "recovery",
  • "training"
]

Get list of athletes

Get athletes that belong to the specified account

path Parameters
accountId
required
string

Id of the account

query Parameters
offset
number

Skip a number of first items in the response

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "more": false,
  • "athletes": [
    ]
}

Get athlete

Get athlete

path Parameters
accountId
required
string

Id of the account

athleteId
required
integer

Id of the athlete

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "athleteId": 356255,
  • "firstName": "John",
  • "lastName": "Doe",
  • "email": "john.doe@example.com"
}

Get athlete measurements

List all measurements of an athlete

path Parameters
accountId
required
string

Id of the account

athleteId
required
integer

Id of the athlete

query Parameters
fromTime
string <date-time>

Limit the response to measurements that start earliest at specified time

toTime
string <date-time>

Limit the response to measurements that start before specified time

exerciseType
string

Limit the response to measurements of specified exercise type, also known as title

measurementType
string
Enum: "exercise" "quickRecoveryTest" "night" "manual"

Limit the response to measurements of specified measurement type

sportsType
string

Limit the response to measurements of specified sports. To make a single query for more than one sports, pass them as a comma-separated list. See Sports Type and Event Type for possible values.

eventType
string

Limit the response to measurements from a specific type of event. To make a single query for more than one event type, pass them as a comma-separated list. See Sports Type and Event Type for possible values.

offset
number

Skip a number of first items in the response

includeLaps
boolean

Include laps in the response

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "more": false,
  • "measurements": [
    ]
}

Get athlete measurement results

Get athlete measurement results

path Parameters
accountId
required
string

Id of the account

athleteId
required
integer

Id of the athlete

measurementId
required
integer

Id of the measurement

query Parameters
var
string

Specify names of requested variables in a comma-separated string

format
string
Enum: "binary" "list"

Request time series either as binary data or JSON lists of numbers

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "athleteId": 356262,
  • "measurementId": 3397522,
  • "sessionId": 41,
  • "startTime": "2015-09-25T07:47:26Z",
  • "endTime": "2015-09-25T08:33:12Z",
  • "measurementType": "exercise",
  • "exerciseType": "Morning exercise",
  • "sportsType": "running",
  • "eventType": "training",
  • "notes": "Thirty minutes of interval training",
  • "variables": [
    ]
}

Get athlete measurement lap results

Get analysis results for lap in athlete's measurement

path Parameters
accountId
required
string

Id of the account

athleteId
required
integer

Id of the athlete

measurementId
required
integer

Id of the measurement

lapId
required
integer

Id of the lap

query Parameters
var
string

Specify names of requested variables in a comma-separated string

format
string
Enum: "binary" "list"

Request time series either as binary data or JSON lists of numbers

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "athleteId": 77013,
  • "measurementId": 3397522,
  • "sessionId": 41,
  • "lapId": 864843,
  • "name": "2nd interval",
  • "startTime": "2015-09-25T07:50:32Z",
  • "endTime": "2015-09-25T07:52:30Z",
  • "measurementType": "exercise",
  • "exerciseType": "Morning exercise",
  • "sportsType": "running",
  • "eventType": "training",
  • "notes": "Thirty minutes of interval training",
  • "variables": [
    ]
}

Get coaches

Get all coaches in an account

path Parameters
accountId
required
string

Id of the account

query Parameters
offset
number

Skip a number of first items in the response

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "more": false,
  • "coaches": [
    ]
}

Get coach

Get coach info

path Parameters
accountId
required
string

Id of the account

coachId
required
integer

Id of the coach

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "coachId": 362791,
  • "firstName": "Some",
  • "lastName": "Coach",
  • "email": "some.coach@example.com"
}

Get teams

Get all teams and groups in an account

path Parameters
accountId
required
string

Id of the account

query Parameters
offset
number

Skip a number of first items in the response

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "more": false,
  • "teams": [
    ]
}

Get team

Get team and its groups

path Parameters
accountId
required
string

Id of the account

teamId
required
integer

Id of the team/group

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "teamId": 1786,
  • "name": "A great team",
  • "athleteIds": [
    ],
  • "groups": [
    ]
}

Get team athletes

Get all athletes in a team or group

path Parameters
accountId
required
string

Id of the account

teamId
required
integer

Id of the team or group

query Parameters
offset
number

Skip a number of first items in the response

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "more": false,
  • "athletes": [
    ]
}

Get team sessions

Get all sessions of a team or group

path Parameters
accountId
required
string

Id of the account

teamId
required
integer

Id of the team or group

query Parameters
offset
number

Skip a number of first items in the response

fromTime
string <date-time>

Limit the response to sessions that start earliest at specified time

toTime
string <date-time>

Limit the response to sessions that start before specified time

type
string

Limit the response to sessions of specified type, also known as title

sportsType
string

Limit the response to measurements of specified sports. To make a single query for more than one sports, pass them as a comma-separated list. See Sports Type and Event Type for possible values.

eventType
string

Limit the response to measurements from a specific type of event. To make a single query for more than one event type, pass them as a comma-separated list. See Sports Type and Event Type for possible values.

includeLaps
boolean

Include laps in the response

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "more": false,
  • "sessions": [
    ]
}

Get session results

Get session results

path Parameters
accountId
required
string

Id of the account

teamId
required
integer

Id of the team/group

sessionId
required
integer

Id of the session

query Parameters
var
string

Specify names of requested variables in a comma-separated string

format
string
Enum: "binary" "list"

Request time series either as binary data or JSON lists of numbers

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "measurements": [
    ]
}

Get session lap results

Get session lap results

path Parameters
accountId
required
string

Id of the account

teamId
required
integer

Id of the team/group

sessionId
required
integer

Id of the session

lapId
required
integer

Id of the lap

query Parameters
var
string

Specify names of requested variables in a comma-separated string

format
string
Enum: "binary" "list"

Request time series either as binary data or JSON lists of numbers

header Parameters
Authorization
required
string

format: Bearer YOUR_TOKEN

x-api-key
required
string

API key received from /account/api-key endpoint

Responses

Response samples

Content type
application/json
{
  • "measurements": [
    ]
}