Getting a specific user profile icon
Request
To get a specific user profile icon image (for example, to display for a particular user profile), send a GET request to:
https://<host>:<port>/images/v1/image/imageid/{imageId}
Headers
Content-Type: image/jpeg
Mandatory arguments
imageId
– the ID of the image to be retrieved
Optional arguments
All the following arguments are in the query string:
Image dimensions (Note that if you specify dimensions, you must specify two of the following. If you specify all three,
height
will be ignored.):width
– the width of the image in pixelsheight
– the height of the image in pixelsaspect
– the aspect ratio of the image (e.g.,16x9
)
imageFormat
– the image format. If this is specified, it must have a value ofwebp
. If it is omitted, a JPEG image is returned.dominantDimension
– the dimension (width
orheight
) that takes precedence when calculating dimensions or aspect ratio.
Note: If a value is specified foraspect
, this is ignored –width
will always take precedence.
Response
A successful request returns an HTTP 200 status.
A bad request returns an HTTP 400 status.
If the specified imageId
does not exist, it returns an HTTP 404 status.
Example
A successful request returns a payload that looks like this:
{
"count": 1,
"results": [
{
"uri": "image-service/discrete/OpfProfile/smileyface/default-locale/OpfProfile_1x1_master"
}
]
}