Update Resource
PUT {{apiPath}}/environments/{{envID}}/resources/{{resourceID}}
The PUT /environments/{{envID}}/resources/{{resourceID}}
operation updates the property values of the identified resource entity.
The request body specifies updated property values for the resource name
and audience
. Any property values not specified in the request body are cleared. The response returns a 200 OK
message, and it shows the updated property data for the modified resource entity.
In this example, the description
property value was cleared. The accessTokenValiditySeconds
property value was cleared and reset to the default value of 3600. The name
and audience
properties were modified to the values specified in the request body.
Prerequisites
- See Resources for important overview information.
Property | Type | Required? |
---|---|---|
accessTokenValiditySeconds | Integer | Required |
applicationPermissionsSettings.claimEnabled | Boolean | Optional |
audience | String | Required |
description | String | Optional |
name | String | Required |
See the Resources data model for full property descriptions.
Request Body
{"name"=>"CustomResource1709685712", "audience"=>"https://api.custom.eu", "applicationPermissionsSettings"=>{"claimEnabled"=>true}}
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/resources/9fd86709-4faf-4b59-b789-f46574ffb566"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"scopes":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/resources/9fd86709-4faf-4b59-b789-f46574ffb566/scopes"},"attributes":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/resources/9fd86709-4faf-4b59-b789-f46574ffb566/attributes"},"secret":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/resources/9fd86709-4faf-4b59-b789-f46574ffb566/secret"}},"id":"9fd86709-4faf-4b59-b789-f46574ffb566","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"CustomResource1709685712","type":"CUSTOM","audience":"https://api.custom.eu","createdAt":"2024-03-06T00:41:52.636Z","updatedAt":"2024-03-06T23:13:50.696Z","accessTokenValiditySeconds":3600,"introspectEndpointAuthMethod":"CLIENT_SECRET_BASIC","applicationPermissionsSettings":{"claimEnabled":true}}