Request
To enable a client application to get and display the available profile icon images to the user, you must first upload these images.
To upload a profile image, send a PUT request to:
https://<host>:<port>/imagemetadata/v1/profile/{resourceId}
Headers
-
Authorization– Keycloak access token for a user with theadminRolerole (see Accessing operator APIs using Keycloak) -
Content-Type: multipart/form-data
Mandatory arguments
-
resourceId– the resource ID for the uploaded image (in the URL) -
image– the image file to be uploaded (multipart/form-data)
The name field shown in the API documentation is the filename of the image file being uploaded. You do not need to pass it a value explicitly.
Other arguments
None.
Response
A successful request returns an HTTP 200 status.
A bad request returns an HTTP 400 status.
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.
Example
A successful request returns a payload that looks like this:
{
"imageId": "2971a79e-41eb-44b2-ae9a-4a8cc74e30f6"
}
See also
For full details of this API, see the Image Metadata Service (IMDS) API documentation.