Download a file

Request

Downloads a file with a specified ID.

Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required

ID of the resource.

Query
imageSizestring^[1-9]{1}[0-9]{1,3}x[1-9]{1}[0-9]{1,3}$

Resize image to specified size. Supports any sizes from 10x10 to 2000x2000, in the following format: {width}x{height}. If the value is invalid, the image returns the original size. This parameter is ignored for non-image files.

Example:imageSize=700x700
curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/files/{id}/download?imageSize=700x700' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

File retrieved.

Headers
Content-Lengthinteger

Number of bytes in the file.

Example:48
Content-Typestring

MIME type of the file.

Example:"image/png"
Body
string, (binary)read-only
Response
"string"