Request
To get all the user profile icons that have been uploaded, send a GET request to:
https://<host>:<port>/imagemetadata/v1/profile
This is the operator call. Client applications get the same list with a client token – see Getting all the available user profile icons.
Headers
-
Authorization– Keycloak access token for a user with theadminRolerole (see Accessing operator APIs using Keycloak)
Mandatory arguments
None.
Other arguments
None.
Example
This request gets all the user profile icons:
https://<host>:<port>/imagemetadata/v1/profile
Response
A successful request returns an HTTP 200 status. The response body contains a results array, with an entry for each icon, and a count of the entries. Each entry has the following fields:
-
resourceId– the resource ID that the icon was uploaded with -
aspect– the aspect ratio (1x1) -
uri– where the image is stored -
imageId– the image ID, which a client application uses to get the icon
For example:
{
"count": 2,
"results": [
{
"resourceId": "smileyface",
"aspect": "1x1",
"uri": "image-service/discrete/OpfProfile/smileyface/default-locale/OpfProfile_1x1_master",
"imageId": "2971a79e-41eb-44b2-ae9a-4a8cc74e30f6"
},
{
"resourceId": "angryface",
"aspect": "1x1",
"uri": "image-service/discrete/OpfProfile/angryface/default-locale/OpfProfile_1x1_master",
"imageId": "43fcbfd9-118b-4980-b518-2b73daa0bad3"
}
]
}
An unauthorised request returns an HTTP 401 status – for example, if the access token is invalid or has expired.
A forbidden request returns an HTTP 403 status – for example, if the access token is missing or the user does not have the adminRole role.
See also
For full details of this API, see the Image Metadata Service (IMDS) API documentation.