Fetch athlete data
Athlete
Athlete
The Athlete
object is the access point for athlete personal information and training data. It's nested directly under the institution
entry point.
email
=> String
The email
field returns the athlete's email address associated with their FYTT account.
kpis(uuids: [String]*)
=> [AthleteKpi]
The kpis
field returns an array of athlete KPI data objects with your requested fields. It accepts a required uuids
argument, which should be an array of UUID strings that specifies which KPIs you're requesting.
kpvs(uuids: [String]*)
=> [AthleteKpv]
The kpvs
field returns an array of athlete KPV data objects with your requested fields. It accepts a required uuids
argument, which should be an array of UUID strings that specifies which KPVs you're requesting.
name
=> String
The name
field returns the athlete's name (combined first and last names) as stored in their FYTT account.
sessions(startDate: ISO 8601 Date String*, endDate: ISO 8601 Date String*)
=> [Session]
The sessions
field returns an array of Session
objects that were assigned to the athlete within the specified date range. It accepts two required arguments: a startDate
string in ISO 8601 Date format ("YYYY-MM-DD"
) to specify the beginning of the desired date range, and an endDate
string in ISO 8601 Date format to specify the end of the desired date range.
This field can be used to retrieve sessions that were scheduled in the past, as well as sessions that are scheduled in the future. Past sessions may or may not contain recorded athlete data depending on whether or not the athlete actually started the session and recorded data from within the UI.
* indicates required argument
Sample Query
Example:
query {
institution {
athletes(athleteEmails: ["[email protected]", "[email protected]"]) {
name
}
}
}
Response:
{
"data": {
"institution": {
"athletes": [
{ "name": "Sally Jones" },
{ "name": "Jen Johnson" },
]
}
}
}