Images

GET Image

This endpoint returns an HTTP redirect to the source file for a published image.

http:///public/api/images/{imageId}/raw

e.g.

Parameter Parameter Type Data Type Mandatory Description
height Query Long No The expected image height where height >= 1
heightScale Query Float No Scaling factor to be applied to the height of the image where heightscale > 0
imageFormat Query Enum No Image format to be retrieves, following formats: PNG, JPG or BMP.
imageId Path Long Yes The ID of the image resource to retrieve
resizeMode Query Enum No
width Query Long No The expected image width where width >= 1
widthScale Query Float No Scaling factor to be applied to the width of the image where widthscale > 0

Table 2. Resize Model Supported

Mode Behaviour
SCALE Ignore specified target width and target height and scale source image width by specified scale x and source image height by specified scale y
FIXED_WIDTH Ignore target height, use target width and scale source image height to maintain source aspect ratio.
FIXED_HEIGHT Ignore target width, use target height and scale source image width to maintain source aspect ratio.
DISTORT Use specified target width and target height and distort image if required
CROP Use specified target width and target height and crop image if required to maintain source aspect ratio - crops equally from centre point.

Example of an API call:

http://10.13.1.39:18106/public/api/images/10103/raw

this will return an HTTP status code of 302 with a “Location” header of https://flex.s3-eu-west-1.amazonaws.com/publish/images/10103/unscaled.png

Server-side Encryption

This end point does not support server-side encryption as there is no way for Flex to return the appropriate HTTP header to be forwarded on to the redirected-to host.