Tests ¶
tests¶
POST /api/v1/tests/¶
Create Test
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Request body
{
"title": null,
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": null,
"results": null,
"tags": [
"string"
]
}
Schema of the request body
{
"properties": {
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Title"
},
"sport": {
"$ref": "#/components/schemas/Sport"
},
"start": {
"type": "string",
"format": "date-time",
"title": "Start"
},
"end": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "End"
},
"results": {
"anyOf": [
{
"$ref": "#/components/schemas/TestResults"
},
{
"type": "null"
}
]
},
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
}
},
"type": "object",
"required": [
"sport",
"start"
],
"title": "TestCreate"
}
Responses
{
"tags": [
"string"
],
"id": "string",
"created_by": null,
"title": null,
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": null,
"results": null,
"app_metadata": null,
"start_local": "2022-04-13T15:42:05.901Z",
"end_local": null
}
Schema of the response body
{
"properties": {
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
},
"id": {
"type": "string",
"title": "Id"
},
"created_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Created By"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Title"
},
"sport": {
"$ref": "#/components/schemas/Sport"
},
"start": {
"type": "string",
"format": "date-time",
"title": "Start"
},
"end": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "End"
},
"results": {
"anyOf": [
{
"$ref": "#/components/schemas/TestResults"
},
{
"type": "null"
}
]
},
"app_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "App Metadata"
},
"start_local": {
"type": "string",
"format": "date-time",
"title": "Start Local",
"readOnly": true
},
"end_local": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "End Local",
"readOnly": true
}
},
"type": "object",
"required": [
"id",
"sport",
"start",
"start_local",
"end_local"
],
"title": "TestSummary"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/tests/¶
List Tests
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
created_by |
query | No | |||
end |
query | No | |||
limit |
query | integer | 50 | No | |
offset |
query | integer | 0 | No | |
refreshed-token |
header | No | |||
sport |
query | array | No | ||
start |
query | No | |||
tags |
query | array | No | ||
token |
cookie | string | No |
Responses
[
{
"tags": [
"string"
],
"id": "string",
"created_by": null,
"title": null,
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": null,
"results": null,
"app_metadata": null,
"start_local": "2022-04-13T15:42:05.901Z",
"end_local": null
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TestSummary"
},
"title": "Response List Tests Api V1 Tests Get"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/tests/{test_id}¶
Get Test
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
test_id |
path | string | No | ||
token |
cookie | string | No | ||
traces |
query | auto | No | How traces are matched to this test. `auto` (default): traces whose timestamp falls in the test's time range, plus any traces explicitly linked to this test, minus any traces explicitly linked to a different test. `linked`: only traces explicitly linked to this test via `test_id`, regardless of timestamp. Affects only the `traces` list; `activities` is always time-overlap matched. |
Responses
{
"tags": [
"string"
],
"id": "string",
"created_by": null,
"title": null,
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": null,
"results": null,
"app_metadata": null,
"traces": null,
"activities": null,
"start_local": "2022-04-13T15:42:05.901Z",
"end_local": null
}
Schema of the response body
{
"properties": {
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
},
"id": {
"type": "string",
"title": "Id"
},
"created_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Created By"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Title"
},
"sport": {
"$ref": "#/components/schemas/Sport"
},
"start": {
"type": "string",
"format": "date-time",
"title": "Start"
},
"end": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "End"
},
"results": {
"anyOf": [
{
"$ref": "#/components/schemas/TestResults"
},
{
"type": "null"
}
]
},
"app_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "App Metadata"
},
"traces": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/TraceDetails"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Traces"
},
"activities": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/ActivitySummary"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Activities"
},
"start_local": {
"type": "string",
"format": "date-time",
"title": "Start Local",
"readOnly": true
},
"end_local": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "End Local",
"readOnly": true
}
},
"type": "object",
"required": [
"id",
"sport",
"start",
"start_local",
"end_local"
],
"title": "TestDetails"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
PUT /api/v1/tests/{test_id}¶
Update Test
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
test_id |
path | string | No | ||
token |
cookie | string | No |
Request body
{
"title": null,
"sport": "cycling",
"start": "2022-04-13T15:42:05.901Z",
"end": null,
"results": null,
"tags": [
"string"
]
}
Schema of the request body
{
"properties": {
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Title"
},
"sport": {
"$ref": "#/components/schemas/Sport"
},
"start": {
"type": "string",
"format": "date-time",
"title": "Start"
},
"end": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "End"
},
"results": {
"anyOf": [
{
"$ref": "#/components/schemas/TestResults"
},
{
"type": "null"
}
]
},
"tags": {
"items": {
"type": "string"
},
"type": "array",
"title": "Tags"
}
},
"type": "object",
"required": [
"sport",
"start"
],
"title": "TestUpdate",
"description": "PUT semantics: full replace. Omitted optional fields are set to null."
}
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
DELETE /api/v1/tests/{test_id}¶
Delete Test
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
test_id |
path | string | No | ||
token |
cookie | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
PUT /api/v1/tests/{test_id}/app-metadata¶
Put Test Metadata
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
test_id |
path | string | No | ||
token |
cookie | string | No |
Request body
Schema of the request body
{
"type": "object",
"additionalProperties": true,
"title": "Data"
}
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
DELETE /api/v1/tests/{test_id}/app-metadata¶
Delete Test Metadata
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
test_id |
path | string | No | ||
token |
cookie | string | No |
Responses
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Schemas¶
ActivitySummary¶
| Name | Type | Description |
|---|---|---|
app_metadata |
||
duration |
string(duration) | |
end |
string(date-time) | |
end_local |
string(date-time) | |
id |
string | |
laps |
||
metrics |
Array<Metric> | |
source_id |
string | |
sport |
Sport | |
start |
string(date-time) | |
start_local |
string(date-time) | |
summary |
||
tags |
Array<string> | |
traces |
ActivitySummarySummary¶
| Name | Type | Description |
|---|---|---|
altitude |
||
cadence |
||
core_temperature |
||
distance |
||
heart_rate |
||
power |
||
smo2 |
||
speed |
||
temperature |
AltitudeSummary¶
| Name | Type | Description |
|---|---|---|
gain |
||
loss |
||
max |
||
mean |
||
min |
CadenceSummary¶
| Name | Type | Description |
|---|---|---|
max |
||
mean |
CoreTemperatureSummary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
DistanceSummary¶
| Name | Type | Description |
|---|---|---|
sum |
HeartRateSummary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
Lap¶
| Name | Type | Description |
|---|---|---|
altitude |
||
cadence |
||
core_temperature |
||
distance |
||
duration |
string(duration) | |
end |
string(date-time) | |
end_local |
string(date-time) | |
heart_rate |
||
power |
||
smo2 |
||
speed |
||
start |
string(date-time) | |
start_local |
string(date-time) | |
temperature |
Marker¶
| Name | Type | Description |
|---|---|---|
heart_rate |
||
lactate |
||
power |
||
speed |
||
vo2 |
Metric¶
Type: string
PowerSummary¶
| Name | Type | Description |
|---|---|---|
max |
||
mean |
Smo2Summary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
SpeedSummary¶
| Name | Type | Description |
|---|---|---|
max |
||
mean |
Sport¶
Type: string
TemperatureSummary¶
| Name | Type | Description |
|---|---|---|
end |
||
max |
||
mean |
||
min |
||
start |
TestCreate¶
| Name | Type | Description |
|---|---|---|
end |
||
results |
||
sport |
Sport | |
start |
string(date-time) | |
tags |
Array<string> | |
title |
TestDetails¶
| Name | Type | Description |
|---|---|---|
activities |
||
app_metadata |
||
created_by |
||
end |
||
end_local |
||
id |
string | |
results |
||
sport |
Sport | |
start |
string(date-time) | |
start_local |
string(date-time) | |
tags |
Array<string> | |
title |
||
traces |
TestResults¶
| Name | Type | Description |
|---|---|---|
critical_power |
||
critical_speed |
||
d_prime |
||
economy |
||
efficiency |
||
fatmax |
||
first_threshold |
||
heart_rate_max |
||
lt1 |
||
lt2 |
||
mlss |
||
second_threshold |
||
vlamax |
||
vo2max |
||
vo2peak |
||
vt1 |
||
vt2 |
||
w_prime |
TestSummary¶
| Name | Type | Description |
|---|---|---|
app_metadata |
||
created_by |
||
end |
||
end_local |
||
id |
string | |
results |
||
sport |
Sport | |
start |
string(date-time) | |
start_local |
string(date-time) | |
tags |
Array<string> | |
title |
TestUpdate¶
| Name | Type | Description |
|---|---|---|
end |
||
results |
||
sport |
Sport | |
start |
string(date-time) | |
tags |
Array<string> | |
title |
TraceDetails¶
| Name | Type | Description |
|---|---|---|
activity |
||
app_metadata |
||
heart_rate |
||
id |
string | |
lactate |
||
lap |
||
notes |
||
power |
||
rpe |
||
speed |
||
sport |
||
tags |
Array<string> | |
test |
||
test_id |
||
test_match |
||
timestamp |
string(date-time) | |
timestamp_local |
string(date-time) | |
vo2 |
TraceResolution¶
Type: string
ValidationError¶
| Name | Type | Description |
|---|---|---|
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| HTTPBearer | http | bearer | |
| HTTPBasic | http | basic |