v1

latestOpenAPI 3.0.1GNU General Public License v3 (GPL-3)2026-07-145265194.5 KB
measurements

Get pairs of measurements for correlational analysis

Pairs cause measurements with effect measurements grouped over the duration of action after the onset delay.

get/v3/pairs

Query parameters

causeVariableNamestring

Deprecated: Name of the hypothetical predictor variable. Ex: Sleep Duration

effectVariableNamestring

Deprecated: Name of the outcome variable of interest. Ex: Overall Mood

causeVariableIdinteger

Variable id of the hypothetical predictor variable. Ex: 1398

effectVariableIdinteger

Variable id of the outcome variable of interest. Ex: 1398

predictorVariableNamestring

Name of the hypothetical predictor variable. Ex: Sleep Duration

outcomeVariableNamestring

Name of the outcome variable of interest. Ex: Overall Mood

effectUnitNamestring

Name for the unit effect measurements to be returned in

userIdnumber

User's id

causeUnitNamestring

Name for the unit cause measurements to be returned in

onsetDelaystring

The amount of time in seconds that elapses after the predictor/stimulus event before the outcome as perceived by a self-tracker is known as the onset delay. For example, the onset delay between the time a person takes an aspirin (predictor/stimulus event) and the time a person perceives a change in their headache severity (outcome) is approximately 30 minutes.

durationOfActionstring

The amount of time over which a predictor/stimulus event can exert an observable influence on an outcome variable value. For instance, aspirin (stimulus/predictor) typically decreases headache severity for approximately four hours (duration of action) following the onset delay. Unit: Seconds

earliestMeasurementTimestring

Excluded records with measurement times earlier than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local.

latestMeasurementTimestring

Excluded records with measurement times later than this value. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local.

limitinteger

The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.

offsetinteger

OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned.

sortstring

Sort by one of the listed field names. If the field name is prefixed with -, it will sort in descending order.

Response

Successful operation

causeMeasurementnumber double required

Ex: 101341.66666667

causeMeasurementValuenumber double required

Ex: 101341.66666667

causeVariableUnitAbbreviatedNamestring required

Ex: mg

effectMeasurementnumber double required

Ex: 7.98

effectMeasurementValuenumber double required

Ex: 7.98

effectVariableUnitAbbreviatedNamestring required

Ex: %

eventAtstring

Ex: 2015-08-06 15:49:02 UTC ISO 8601 YYYY-MM-DDThh:mm:ss

eventAtUnixTimeinteger

Ex: 1438876142

startTimeStringstring

Ex: 2015-08-06 15:49:02 UTC ISO 8601 YYYY-MM-DDThh:mm:ss

timestampinteger required

Ex: 1464937200