Context
User wants to download a file
URL
https://api.intelligencebank.com/webapp/1.0/resources
Method
GET
Parameters
p10: {client api key}
p20: {user uuid}
fileuuid: {file uuid}}
OPTIONAL: version: {version number}
OPTIONAL: ext: {type of extension to download the file as}
OPTIONAL: size: {percentage of original file (25, 50, 75, 100) }
OPTIONAL: cropwidth: {cropped output width}
OPTIONAL: cropheight: {cropped output height}
OPTIONAL: cropx: {x coordinate to start the crop}
OPTIONAL: cropy: {y coordinate to start the crop}
OPTIONAL: compression: {compression quality (1-100) }
OPTIONAL: compressiontype: {type of compression (see Note 4) }
Header:
_aid: <session id>
Response
200 : OK
401 : Access denied
404 : File not found
500 : Internal server error
Actions
Process the streamed file
Notes:
- If the version number is provided then that version's file will be downloaded. If the provided version number is not found then a 'not found' response will be provided
- If no version parameter is provided then the latest or current file version is downloaded.
- If cropping an image, the following 4 parameters must be specified: cropwidth, cropheight, cropx and cropy
- Types of compression:
- 1 = No compression
- 2 = BZIP2 (Lossless Compression)
-
8 = JPEG (Lossy Compression)'
-
10 = JPEG (Lossless Compression)
-
11 = LZW (Lemple-Zif-Welch) (Lossless Compression)
-
12 = Run-Length Encoding (Lossless Compression)
-
13 = ZIP (Lossless Compression)