Descriptions API
For data values which contain a key and a value descriptor, the Descriptions API provides a convenient way to resolve those two values. This API is highly cacheable.
Getting Descriptions
This method acquires the metadata from FitnessSyncer. This is highly cacheable.
All types require a valid OAuth2 access token. The distinctActivities type additionally requires the source_data_activity_read scope.
GEThttps://api.fitnesssyncer.com/api/descriptions/type
Response 200Description Results
Where type is one of activities, comparisons, dataFields, distinctActivities, fieldGroups, goalDefaultDataFields, goalGranularities, granularities, labelers, reducers, scoringField, or timezones.
| Key Parameter Name | Description |
|---|---|
| activities | List of Activity Types that FitnessSyncer Supports. |
| comparisons | List of Comparisons Types that FitnessSyncer Supports for Filters, Leaderboards, ShoeRenew, and other operations. |
| dataFields | List of Data Fields that FitnessSyncer Supports for Reports |
| distinctActivities | List of the Activity Types actually present in the user’s own account. Unlike the other types this is specific to one account, so it must not be cached across users or sessions. This is the only type that requires a scope. |
| fieldGroups | List of the field families a Data Field can belong to, with the name of each in the language of the request. Pairs with the group property on dataFields, so a field picker can be organized into sections without hard-coding one heading per group. |
| goalDefaultDataFields | List of the Data Fields available for Goals on a non-Pro account. |
| goalGranularities | List of Granularities that FitnessSyncer Supports for Goals |
| granularities | List of Granularities that FitnessSyncer Supports for Reports |
| labelers | List of Labelers that FitnessSyncer Supports for Reports |
| reducers | List of Reducers that FitnessSyncer Supports for Filters, ShoeRenew, and other operations |
| scoringField | List of Scoring Fields that FitnessSyncer Leaderboards support |
| timezones | List of Time Zones that FitnessSyncer Supports |
Request Parameters
None
Response
The body of the JSON array of Descriptions Result.
Types
Description Results
| JSON Item | Data Type | Description |
|---|---|---|
| results | Array of Description | The array of results. |
Description
| JSON Item | Data Type | Description |
|---|---|---|
| key | String | This is the key id which is to be referenced within this API. |
| description | String | Description of the item. |
| taskType | String | If applicable, the TaskType for which this item is appropriate for. Must be one of Activity, Allergy, Weight, BloodPressure, BloodPanel, Cholesterol, Condition, CycleTracking, ECG, Glucose, Medication, Nutrition, Oxygen, Sleep, Temperature |
| defaultReducer | String | Name of the reducer that is defaulted for this data type. |
| isMeasuredType | Boolean | True if this is a measured type where metric or imperial would make a difference. |
| metric | Boolean | True if this value should be used on metric values. False if this is imperial. Null if this is not applicable. |
| onlyReportSettings | Boolean | True if this granularity is only allowed for Report Settings and not for Report Inquiries. |
| postProcessed | Boolean | True if this field requires some post processing, so may not be available within some contexts. |
| isCumulative | Boolean | For a data field, true when the field accumulates over time, so that adding two periods together is meaningful and a target has to name a period to mean anything, as with steps or distance or calories. False for a standing measurement such as a weight, a heart rate or a bed time, where a target stands on its own and a period is meaningless. A goal on a field that is not cumulative always has a granularity of NONE, so a goal editor should not offer the period picker for one. Read-only, and absent for description types other than dataFields. |
| dataFields | Array of String | For Scoring Fields, this is the set of DataFields that comprise this element. |
| measurementType | String | What type of display preference takes precedence when displaying this unit. One of: DISTANCE, WEIGHT, GLUCOSE, TEMPERATURE, NUTRITION, WATER |
| group | String | For a data field, what family of thing it is about, which is orthogonal to its taskType: the task type says which kind of record the field came from, and this says what the field is. Intended for grouping a field picker into browsable sections. Must be one of: IDENTITY, DISTANCE_AND_DURATION, ENERGY, HEART, HEART_RATE_ZONES, POWER, POWER_ZONES, STRESS, STRENGTH, BODY_WEIGHT, BODY_COMPOSITION, TAPE_MEASUREMENTS, CALIPER_MEASUREMENTS, SLEEP_TIMES, SLEEP_TOTALS, SLEEP_STAGES, SLEEP_VITALS, NUTRIENTS, HYDRATION, LOCATION, ENVIRONMENT, CLINICAL. New groups may be added, so treat an unrecognized value as ungrouped rather than as an error. |
| groupDescription | String | The group’s name in the language of the request, for rendering a section heading without hard-coding one per group. |
| requiresColumnMapping | Boolean | For a fileFormats entry, true when choosing this format also requires a CSV column mapping to be supplied in providerConfig.csv. |