Files api
Last updated
Last updated
The Files API allows you do upload/download files.
Name | Description | Required | Default value |
---|---|---|---|
All media types with the exception of application/x-www-form-urlencoded
and multipart/form-data
are allowed. See the JavaScript example for how to upload a file from a form file input.
Status code | Description |
---|---|
Name | Description |
---|---|
Filemeta as returned by the 'Retrieve file metadata' endpoint.
curl -H 'Content-Type: application/octet-stream' --data-binary @my.file /api/files
Example:
Status code | Description |
---|---|
Status code | Description |
---|---|
Status code | Description |
---|---|
Content-Type *
A standard MIME type describing the format of the file
No
application/octet-stream
Content-Length
File size in bytes
No
x-molgenis-filename
Filename
No
unknown
x-molgenis-token
Authentication token
No
session cookie if supplied
201 Created
File uploaded and file metadata created.
403 Forbidden
If the authenticated user does not have WRITE permissions on file metadata.
Location
Location of a newly created resource
200 OK
File downloaded
403 Forbidden
If the authenticated user does not have READ permissions on the file metadata
404 Not Found
If the file identifier is unknown
200 OK
File metadata
403 Forbidden
If the authenticated user does not have READ permissions on the file metadata
204 No Content
File and filemeta deleted.
403 Forbidden
If the authenticated user does not have WRITE permissions on the file metadata
404 Not Found
If the file identifier is unknown