Configuration for the Cloud Storage providers. See Cloud Storage File Formats for which file formats support which TaskTypes.
JSON Item
Data Type
Description
fileFormat
String
The file format used for this provider. TCX, GPX, KML, KMZ, PWX, and CSV are only supported for Activity. FIT additionally supports Weight and BloodPressure. FitnessSyncerAPI (FitnessSyncer’s own JSON item format) is supported for every type. Must be one of: TCX, GPX, KML, KMZ, FIT, PWX, CSV, FitnessSyncerAPI
filenameFormat
String
Template for the generated filename.
path
String
Remote directory path within the provider to store/read files.
CSV Provider Config
Configuration for a source or destination whose file format is CSV, including the column mapping. This applies both to a plain CSV provider and to a Cloud Storage provider whose Maps Provider Config file format is CSV.
Ask GET /descriptions/fileFormats which formats need one: an entry with requiresColumnMapping true cannot be used without it. The columns valid for a given task type and direction come from GET /descriptions/csvColumns — there are several hundred and the set grows over time, so read them rather than hard-coding a list.
JSON Item
Data Type
Description
separator
String
Field separator. Defaults to a comma.
quote
String
Quote character wrapping a field that contains the separator.
comment
String
Rows beginning with this string are skipped.
startingRow
Integer
Number of leading rows to skip before the data begins, for a file with a header or preamble.
locale
String
IETF BCP 47 language tag deciding how numbers and dates in the file are parsed, for example fr-FR for a file writing one thousand and a half as 1 234,5.
overrideTimezone
String
Treat timestamps in the file as wall-clock time in this zone rather than in the account’s own. An IANA zone id, for example Europe/Paris.
sumStepsPerDay
Boolean
Total the step rows within each day rather than treating each row as its own record.
groupByDate
Boolean
Combine rows sharing a date into a single record.
groupByMeal
Boolean
For nutrition, combine rows sharing a meal into a single record.
sendSummaryData
Boolean
For a destination, write the summary totals rather than the per-sample detail.
appendToFile
Boolean
For a destination, append to the existing file rather than replacing it.
The column mapping. Absent on a write leaves the stored mapping untouched; present, it replaces the stored mapping in full, so a client removing a row must send the whole remaining set.
CSV Column Mapping
One mapped column. An index says which column of the file feeds this field; a defaultValue supplies a constant when the file has no column for it. A row may carry either or both.
Sending a columns array replaces the stored mapping in full rather than merging into it, so a client removing one row sends the whole remaining set. Omitting the array leaves the stored mapping untouched.
JSON Item
Data Type
Description
column
String
The FitnessSyncer field this row maps. Fetch the values valid for a given task type and direction from GET /descriptions/csvColumns; there are several hundred and the set is extended over time, so treat an unrecognized value as one this client does not know rather than as an error.
index
Integer
Which column of the file feeds this field, counting the first column as 1 -- the same numbering the web editor and every spreadsheet tool shows. Omit, or send 0, for a row that only supplies a defaultValue.
defaultValue
String
Constant to use for this field when the file carries no column for it.
Name of the source or destination task represented here. If there are tasks with duplicate names, there may be an identifier at the end of the name to help with ordering.
id
String
Id of the source or destination to be used with the re-use.
Present and true when the last run completed without an error; omitted otherwise.
id
String
The id of the source or destination.
type
String
Indication of the type ranging from SOURCE or DESTINATION. Other types should be ignored.
queueStatus
String
Where this task stands. Must be one of: QUEUED (waiting for a worker), RUNNING (it is in-progress), COMPLETED (the last run finished and reported no error), FAILED (the last run finished and reported an error), NOT_IN_PROGRESS (nothing queued, nothing running, and it has never run), ON_DEVICE (this source synchronizes on the phone and never on the server), DISABLED (the task is switched off), UNKNOWN (a value this client does not recognize). More values may be added, so treat anything unrecognized as UNKNOWN.
state
String
Which state is this task in; this is not available for all tasks. Must be one of: HISTORIC_SYNC, REFRESHING, COMPARING, SYNCING, UPLOADING, UNKNOWN. More values may be added, so treat anything unrecognized as UNKNOWN.
info
String
If available, the localized message summarizing the state
upTo
Long
Date about how far this has been processed up-to
update
String
Any recent error messages from this source or destination.
errorCode
String
Error code for the last error, present only when the last run failed.
The errorCode is stable across languages and releases, where update is the wording to show a person. More values may be added.
Errors
JSON Item
Data Type
Description
error
String
Error code
error_description
String
Description of the error for end-user consumption.
argument
String
If the error is regarding an argument, this will indicate the argument name.
item
String
If the error is regarding an item, this will indicate the item value.
id
String
If the error is regarding an id, this will indicate the id value.
request_id
String
This is the unique request id.
Here are some example errors:
{
"item": "sampleItemId",
"error_description": "Item was not found.",
"id": "sampleId",
"error": "NotFound",
"request_id": "sampleRequestId"
}
FitnessSyncer uses essential cookies to sign you in and remember your settings. With your permission, we also use analytics cookies to understand how people use this website. Learn More