import
/api/import/
List methods: post, get
Detail methods: get
Importing Foreign Data
HexoSkin supports the uploading of a certain range of data from other sources. Specifically TCX and FIT formats are supported.
To import data, make a POST to this endpoint with the data (the TCX or FIT file content) in the body and the appropriate Content Type header. The content types are:
TCX: 'application/vnd.garmin.tcx+xml'
FIT: 'application/vnd.ant.fit'
The server will reply with an import object which you may query (with a GET) for the progress of the import. It will look something like:
{
"created": "2015-09-16",
"id": 1,
"progress": 0,
"resource_uri": "/api/import/1/",
"results": null,
"user": "/api/user/1/"
}
The progress
attribute is a float between 0 and 1. When the import is
complete, the created objects will be in the results
attribute. If
there is an error importing the file, the error will be in the results
attribute.
The data will be imported as the current user. Importing on behalf of another user is not currently supported.
Fields
- created:
-
A date & time as a string. Ex: "2010-11-10T03:07:43"
This field may be blank
This field will default to: True
- id:
-
The primary key for this resource. Integer data. Ex: 2673
This field is readonly.
- progress:
-
Floating point numeric data. Ex: 26.73
This field is readonly.
- resource_uri:
-
The unique URI where the object resides.
This field is readonly.
- results:
-
This field may be null
- source:
-
Unicode string data. Ex: "Hello World"
This field is required.
- user:
-
A user. Maybe specified by URI, email, or ID. Using a URI is recommended.
This field may be null
Filtering Options
No filtering supported
Sorting Options
No sorting supported
© 2024 by CarrĂ© Technologies Inc.