/templates/{id}
This resource is available only to principals with these entitlements: "ROLE_READ_POLICYTEMPLATE" "ROLE_BROKER_ADMIN"
Mount Point: /auth/api/v1/templates/{id}/
The following operations are supported on this resource:
GET
This operation is available only to principals with these entitlements: "ROLE_READ_POLICYTEMPLATE" "ROLE_BROKER_ADMIN"
Retrieve a specified policy template.
Parameters
name | description | type | default |
---|---|---|---|
id | Either a Xacml policy ID (URN) or the template's dataStore Id. | path |
Response Body
result: | persistedPolicyTemplate |
media types: | application/json |
The requested PolicyTemplate object.
Status Codes
code | description |
---|---|
200 | Success |
304 | Not modified |
404 | No such object |
POST
This operation is available only to principals with these entitlements: "ROLE_CREATE_POLICY" "ROLE_BROKER_ADMIN"
Create a new policy by instantiating a policy template.
Parameters
name | description | type | default |
---|---|---|---|
id | template to instantiate, identified by either the template's Xacml policy ID (URN) or the template's dataStore Id. | path | |
name | "friendly name" for new policy | query | |
description | optional policy description | query | |
enabled | whether to immediately enable the new policy | query | false |
Request Body
element: | (custom) |
media types: | application/json |
name-value pairs of template parameters
Response Body
result: | persistedPolicy |
media types: | application/json |
Response containing new PersistedPolicy object
Status Codes
code | description |
---|---|
201 | Success |
400 | Bad Request |
PUT
This operation is available only to principals with these entitlements: "ROLE_UPDATE_POLICYTEMPLATE" "ROLE_BROKER_ADMIN"
Update properties of the specified policy template.
Parameters
name | description | type | default |
---|---|---|---|
id | Either a Xacml policy template id (urn) or the policy template datastore id. | path |
Request Body
element: | persistedPolicyTemplate |
media types: | application/json |
contains new values for the policy template. Any null object members are ignored.
Response Body
result: | persistedPolicyTemplate |
media types: | application/json |
PersistedPolicyTemplate updated template.
Status Codes
code | description |
---|---|
200 | Success |
412 | Precondition failed |
409 | Reserved for cache object out of date |
DELETE
This operation is available only to principals with these entitlements: "ROLE_DELETE_POLICYTEMPLATE" "ROLE_BROKER_ADMIN"
Delete a policy template.
Parameters
name | description | type | default |
---|---|---|---|
id | Xacml policy ID (URN) or dataStore Id of the policy template to be deleted. | path |
Status Codes
code | description |
---|---|
204 | Success |
404 | No such object |