Create Decision Endpoint
POST {{apiPath}}/environments/{{envID}}/decisionEndpoints
There are two create options. You can configure a policy decision endpoint to reference a specific policy version. Or, you can configure a policy decision endpoint that is always up-to-date.
In cases where a specific policy version is defined in the request, the policy decision service fetches the policy configuration at that version from the policy editor service and stores it locally. When no policy version is defined (always up-to-date), the decision endpoint is recorded in the local database with no policy configuration. Access to the policy editor service is not required in this case.
The following sample shows the POST /environments/{{envID}}/decisionEndpoints
operation to create a new policy decision endpoint resource associated with the environment specified in the request URL. The request body specifies the name
, description
, authorizationVersion
(the policy version), and recentDecisionsEnabled
attributes.
Note: When a policy decision endpoint does not specify a policy version, the policy decision service fetches the current policy configuration at runtime from the policy editor service.
Prerequisites
- See PingOne Authorize and PingOne Authorize Policy Decision Service for important overview information.
For property descriptions, see Policy decision service data model
Property | Type? | Required? |
---|---|---|
alternateId | UUID | Optional |
authorizationVersion.id | UUID | Optional |
description | String | Required |
id | UUID | Required |
name | String | Required |
owned | Boolean | Optional |
policyId | UUID | Optional |
recentDecisionsEnabled | Boolean | Optional |
recordRecentRequests | Boolean | Required |
Request Body
{"name"=>"Test Endpoint", "description"=>"Endpoint for use in tests", "authorizationVersion"=>{"id"=>"{{authorizationVersionID}}"}, "recentDecisionsEnabled"=>true}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/decisionEndpoints/bcb106be-96fa-4479-b3ee-dbd7666e4da2"},"authorizationVersion":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/authorizationVersions/d7437c70-3082-11ee-80bd-adfbbca2bf5b"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"bcb106be-96fa-4479-b3ee-dbd7666e4da2","name":"Test Endpoint","description":"Endpoint for use in tests","authorizationVersion":{"id":"d7437c70-3082-11ee-80bd-adfbbca2bf5b"},"recordRecentRequests":false,"owned":false}