In this article
Download a Media File
This endpoint is used for Downloading a media file.
URL
https://{{HOST}}/files/{file_entity_filename}
Method
get
Required IMS Scopes
- apollo_read
URL Path Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| fileName required |
File name which user wants to download | abc.png | string |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authorization required |
Bearer {access_token} | Description |
| Content-Type required |
application/json | Description |
| ercollectionid required |
application/json | Description |
| If-Match optional |
file version | Specifies the file version to retrieve. If the file metadata contains a “max-age”, the response will contain a Cache-Control header |
Example
Request
curl -X get
'https://{{HOST}}/files/example.png'
-H 'Authorization: Bearer {access_token}'
-H 'Content-Type: application/json' ,
-H 'ercollectionid: {{ercollectionid}}'
Response
Media Stream OR No Content
Errors
| Error | Description |
|---|---|
| 400 Bad Request | ER Collection ID not provided |
| 400 Bad Request | Invalid filename |
| 403 Forbidden | The request is understood, but it has been refused or access is not allowed |
| 404 Not Found | File not found |
| 500 Internal Server Error | Error while processing the request |