Collection.GetFile
  • 25 May 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Collection.GetFile

  • Dark
    Light
  • PDF

Article summary

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.

NameRequiredTypeDescription
CollectionIDTruenumericUnique identifier of the collection.
ItemIDTruenumericUnique identifier of the item.
FieldTruestringThe 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

Was this article helpful?