Skip to contents

Get the tests for an account. You can specify a time frame from, or to, which the tests should come (or be synced).

Usage

get_tests(
 from = NULL,
 to = NULL,
 sync = FALSE,
 athleteId = NULL,
 typeId = NULL,
 teamId = NULL,
 groupId = NULL,
 includeInactive = FALSE
 )

Arguments

from

Optionally supply a time (Unix time stamp) you want the tests from. If you do not supply this value you will receive every test. This parameter is best suited for bulk exports of historical data

to

Optionally supply a time (Unix time stamp) you want the tests to. If you do not supply this value you will receive every test from the beginning of time or the optionally supplied from parameter. This parameter is best suited for bulk exports of historical data.

sync

The result set will include updated and newly created tests. This parameter is best suited to keep your database in sync with the Hawkin database. If you do not supply this value you will receive every test.

athleteId

Supply an athlete’s id to receive tests for a specific athlete

typeId

Supply a value of type string. Must be canonical test Id, test type name, or test name abbreviation.

Names | Abbreviations: "Countermovement Jump" | "CMJ", "Squat Jump" | "SJ", "Isometric Test" | "ISO", "Drop Jump" | "DJ", "Free Run" | "FREE", "CMJ Rebound" | "CMJR", "Multi Rebound" | "MR", "Weigh In" | "WI", "Drop Landing" | "DL", "TS Free Run" | "TSFR", "TS Isometric Test" | "TSISO"

teamId

Supply a team’s ID, a list of team IDs, or a string of a comma separated team id’s to receive tests from the specified teams. A maximum of 10 teams can be fetched at once.

groupId

Supply a group’s ID, a list of group IDs, or a string of a comma separated group id’s to receive tests from the specified groups. A maximum of 10 groups can be fetched at once.

includeInactive

There was a change to the default API configuration to reflect the majority of users API configuration. Inactive tests or tests where active = false are returned in these configuration. Be default, includeInactive is set to FALSE. To return all tests, including disabled trials, set includeInactive to TRUE.

Value

Response will be a data frame containing the trials within the time range (if specified).

Column NameTypeDescription
idstrTest trial unique ID
activelogiThe trial is active and not disabled
timestampintUNIX time stamp of trial
segmentchrDescription of the test type and trial
number of the session (testType:trialNo)
test_type_idchrId of the test type of the trial
test_type_namechrName of the test type of the trial
test_type_canonicalIdchrCanonical Id of the test type of the trial
test_type_tag_idschrString of Ids associated with tags used during
the test trial
test_type_tag_nameschrString of names of tags used during the
test trial
test_type_tag_descchrString of descriptions of tags used during
the test trial
athlete_idchrUnique Id of the athlete
athlete_namechrAthlete given name
athlete_activelogiThe athlete is active
athlete_teamslistList containing Ids of each team the athlete is on
athlete_groupslistList containing Ids of each group the athlete is in

All metrics from each test type are included as the remaining variables unless typeId is provided, then only the metrics of that test type will be returned. If a trial does not have data for a variable it is returned NA.

Examples