Description
Downloads a file stored in a collection.
URL parameters
URL parameter ordering
The URL parameters below are listed in the order they should be entered in the API URL.
| Name | Required | Type | Description |
|---|---|---|---|
CollectionID |
True | numeric | Unique identifier of the collection. |
ItemID |
True | numeric | Unique identifier of the item. |
Field |
True | string | The field storing the file. |
Responses
Returns the raw bytes of the target file.
Sample request
curl -GET 'https://api.mozenda.com/rest?WebServiceKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&Service=Mozenda10&Operation=Collection.GetFile&CollectionID=1001&ItemID=1002&Field=Picture'
Sample response
Collection.GetFile does not return a standard response when successful. It will instead return the raw bytes of the target file.
Success Headers Example
Status: HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=1002-Picture.png
Date: Tue, 27 Jun 2017 19:52:40 GMT
Connection: close
Content-Length: 3330