# Fetch External Image
API call format
GET images/image-external/{poolGuid}/{proxy+}
Description
Fetch external image Note: You have to specify the ‘Accept’ header in the request to be equal to ‘image/*’ in order to receive the image itself. If you use the API thru Cloudfront it will handle this case and you won’t need to specify ‘Accept’ header on your own. Note: you have to replace {proxy+} with real s3 path to source image in the bucket. Example: ‘imgs/img.jpg’
Precondition:
- Mandatory elements:
- <pool_guid> - valid pool guid. Take a specific pool guid by using Pools list API call.
- <proxy+> - real path to the image
- Optional elements:
- w - Desired width of the image in pixels. Example format: 320
- h - Desired height of the image in pixels. Example format: 160
- e - Extract a region of the image format in px (left,top,width,height). Example format: 20,200,10,100; Extraction will be executed before resizing
- f - Format of the image. If non specified default image format will be returned. Allowed values: jpeg, jpg, png, tiff, webp
- d - Desired dimension of the image in pixels. Example format: 320x160
- q - Quality of the image (between 1 and 100)
Postcondition:
- On success response code should be 200.
- On success JSON formatted details for all pools are returned.
- On failure an error will be returned with the right error code and description.
Example:
[Request] GET https://<base_api_url>/images/images/image-external/{poolGuid}/{proxy+}
[Request Headers] {"Content-Type":"application/json","Accept":"application/json"}
[Response] 200
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["..."],"Connection":["keep-alive"],"Date":["..... GMT"],"x-amzn-RequestId":["....."],....]}
[Responce]
<Image URL>