Download a request file

A verified researcher is able to download the attached files of his/hers request (and revisions). These can also be download by the applied reviewers and/or approvers.

{info} Only a researcher can upload/download files to his/hers active request revision but corresponding reviewers and approvers can also download them.


Method Uri Auth Role
GET /v1/requests/{UUID}/files/{UUID} Bearer JWT-Token researcher

Headers

The API requires a header Accept to be submitted with the request:

{
    "Accept": "application/json",
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..." 
}

Success Responses

Condition : User must be a researcher.

Code : 200 Okay

Content example : Response contains of file data

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Content-Length: 4732
Connection: close
Cache-Control: public
Date: Fri, 15 Jan 2021 13:52:26 GMT
Last-Modified: Fri, 15 Jan 2021 13:47:30 GMT
Content-Disposition: attachment; filename="Untitled-spreadsheet-(1).xlsx"
Accept-Ranges: bytes
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58

FILE CONTENT

Error Responses

Condition : If the current user does not have the role researcher attached and is not the owning request user. Condition : If the current user is not one of the corresponding reviewers. Condition : If the current user is not an approver.

Code : 403 Unauthorized

Content example :

{
    "message": "You\'re not allowed to download to this file"
}