Images
The images endpoints provide the ability to associate a custom image with the specified environment for use with the branding service. It implements operations to create, read, and delete uploaded images associated with the specified environment.
Images API operations
The images endpoints support the following operations:
-
GET /environments/{environmentId}/images/{imageId}
Read an image -
DELETE /environments/{environmentId}/images/{imageId}
Delete images
For hands-on experience with the images API endpoints, click the Run in Postman button below to download a Postman collection that you can import and open in your local Postman application.
Images data model
Property | Description |
---|---|
createdAt |
The time the resource was created. |
environment.id |
A string that specifies the environment resource’s unique identifier. |
id |
A string that specifies the resource’s unique identifier. |
targets.height |
The height of the image (in pixels). |
targets.href | A string that specifies the URL or fully qualified path to the image source file. |
targets.id | A string that specifies the UUID of the target image. |
targets.type |
A string that specifies the type of format used for the image. Options are jpg , png , and gif . |
targets.width |
The width of the image (in pixels). |
Response codes
Code | Message |
---|---|
200 | Successful operation. |
201 | Successfully created. |
401 | You do not have access to this resource. |
403 | You do not have permissions or are not licensed to make this request. |
Endpoint examples
Get an image
The GET /environments/{environmentId}/images/{imageId}
endpoint returns the identified image file associated with the specified environment resource.
curl -X "GET" "https://api.pingone.com/v1/environments/{environmentId}/images/{imageId}" \
-H 'Authorization: Bearer jwtToken'
The response data looks like this:
{
"createdAt": "2018-10-11T17:10:31.135Z",
"environment": {
"id": "string"
},
"id": "1d39eadb-ee72-41a1-a460-f5a5fd2b0a27",
"targets": {
"smallLogo": {
"height": 200,
"href": "https://i.special.io/images/orgLogo/orgLogoSmall-Jfdwu930d.png",
"id": "e8ad78dd-d45c-49b4-974d-8d5e443d4531",
"type": "PNG",
"width": 200
}
}
}
Create images
The POST /environments/{environmentId}/images
endpoint associates the identified image file with the specified environment resource.
curl -X "POST" "https://api.pingone.com/v1/environments/{environmentId}/images" \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer jwtToken'
-d $'{
"targets": [
{
"id": "e8ad78dd-d45c-49b4-974d-8d5e443d4531",
"width": "200",
"height": "200",
"type": "png",
"href": "https://i.ping.io/orgLogo/orgLogoSmall-Jfdwu930d.png"
}
]
}'
Delete images
The DELETE /environments/{environmentId}/images/{imageId}
operation deletes the branding configuration for the specified environment resource.
curl -X "DELETE" "https://api.pingone.com/v1/environments/{environmentId}/images" \
-H 'Authorization: Bearer jwtToken'
For successful delete operations, a 204 NO CONTENT
message is returned by the request.