Download original file
GET
/api/v1/file-imports/{fileImportId}/file
const url = 'http://localhost:8080/api/v1/file-imports/fileImport-0198a2b1-8f3e-7c2d-9a4b-1f2e3d4c5b6a/file';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/v1/file-imports/fileImport-0198a2b1-8f3e-7c2d-9a4b-1f2e3d4c5b6a/file \ --header 'Authorization: Bearer <token>'Returns the file exactly as it was uploaded
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”fileImportId
required
string
The prefixed file import identifier, fileImport- included, as listed in /api/v1/file-imports.
Responses
Section titled “Responses”The original .fit, .tcx or .gpx file.
Media typeapplication/octet-stream
string format: binary
Headers
Section titled “Headers”Content-Disposition
string
The Authorization header was missing, malformed, or did not match the configured key.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
ExampleinvalidToken
{ "error": "invalid_token", "message": "A valid token is required. Send it in the Authorization header as a Bearer token."}Headers
Section titled “Headers”WWW-Authenticate
string
The file import does not exist, or it has no stored file.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
No such file import
{ "error": "not_found", "message": "File import \"fileImport-1\" is no longer available"}A skipped duplicate
{ "error": "file_not_available", "message": "File import \"fileImport-0198a2b1-8f3e-7c2d-9a4b-1f2e3d4c5b6a\" has no stored file."}