Files

Attributes
id Integer 1 Unique numeric identifier
name String File Name Human readable name identifying this file
Actions
List GET /projects/{project_id}/folders/{folder_id}/files -
Show GET /projects/{project_id}/folders/{folder_id}/files/{id} Header MUST contain: "Accept: application/json"
Download GET /projects/{project_id}/folders/{folder_id}/files/{id}.file -
Create POST /projects/{project_id}/folders/{folder_id}/files necessary data: {"name":"file name"}
Update PUT /projects/{project_id}/folders/{folder_id}/files/{id} necessary data: {"name":"updated file name"}
Destroy DELETE /projects/{project_id}/folders/{folder_id}/files/{id} -

The action "Show" with extension .file on the id, downloads the file with a 302 redirect. If you are using tools like curl, you need to specifically enable them for redirects. With curl, e.g., it would be the switch "-L".

Downloading works also with adding "Accept:application/file-mixed" to the header of the HTTP request.

Example:

Downloading a file with .file extension on the resource id:

GET /api/projects/9/folders/255/files/61345.file HTTP/1.1
Authorization: Bearer example-token

response:

HTTP/1.1 302 "Redirecting to Sourcefile"

Example:

Downloading a file with setting an "Accept"-header:

GET /api/projects/9/folders/255/files/61345 HTTP/1.1
Authorization: Bearer example-token
Accept: application/file-mixed

response:

HTTP/1.1 302 "Redirecting to Sourcefile"