FileDownload
Use this resource to download a file that is attached to a process, an instance, or a comment.
Method summary
HTTP Method | Path | Description |
---|---|---|
GET | /scr/api/FileDownload | Downloads a file that is attached to a process, an instance, or a comment. |
GET/scr/api/FileDownload
- Description
- Use this method to download a file that is attached to a process, an instance, or a comment.
- Resource information
-
Requirements Description Response format Raw data for the file in the same format it was uploaded in. Requires authentication Yes. The user must have at least access to the process, instance, or post to which the file is attached. If a file is attached to a post that is not posted yet or to an instance that is not started yet, the file can be downloaded only by the user who uploaded it. Supports OAuth 2 client credentials Yes using a User Service ID containing Artifact Reporting Category Rate limited Not yet
- Parameters
- The user must provide one of the following parameters to specify an object that the file is
attached to:
- processId
- instanceId
- postId
- Response
- The data from the file.
- Example input
-
- Using User Service ID OAuth 2 client
credentials:
curl -i -H "Authorization: Bearer access_token" "https://your_server_url/scr/api/FileDownload?fileItemId=9042b"
- Using Service ID OAuth 2 client
credentials:
curl -i -H "Authorization: Bearer access_token" "https://your_server_url/scr/api/FileDownload?fileItemId=9042b"
- Using Service ID OAuth 2 client credentials with user
context:
curl -i -H "Authorization: Bearer access_token" -H "X-On-Behalf-Of:user_name@domain.com" "https://your_server_url/scr/api/FileDownload?fileItemId=9042b"
- Using User Service ID OAuth 2 client
credentials:
- Example output
- File data
- Response properties
- None
- Response messages
-
HTTP code Reason 400 Bad request. See the response body for more information. 401 The user isn't authorized to make the request.
403 The user does not have access to the process, instance, or post that the file is attached to.