Overview#
Retrieve available policy templates that can be used as starting points for creating new policies.List Policy Templates#
Endpoint: GET /policy/list-policy-templatesResponse Structure#
| Field | Description |
|---|
template-identifier | Unique identifier for the template |
name | Template name |
description | Description of the policy's purpose and behavior |
events | Available events that can trigger this policy, with event identifiers and names |
configuration | Configuration parameters that can be customized during registration |
votingAttributes | Attributes used for voting when the policy triggers |
Example Template Structure:{
"template-identifier-example": {
"name": "template_name_example",
"description": "template_description_example",
"events": {
"event-identifier-example": {
"event-name-example": "Retrieve data"
}
},
"configuration": ["string"],
"votingAttributes": ["string"]
}
}
Use Case#
Use this endpoint to browse policy templates provided by Privicore. Templates define:Available Events: Which system operations can trigger the policy (login, data retrieval, account changes, etc.)
Configuration Parameters: Customizable settings that control policy behavior
Voting Attributes: Which attributes are evaluated when creating voting polls
When registering a policy from a template:1.
Use the template identifier as policyTemplateId
2.
Select event identifiers from the template's events to populate applyingEventIds
3.
Provide values for configuration parameters defined in the template
4.
The policy will use the voting attributes specified by the template
Templates are read-only and provided by Privicore
Event identifiers from templates are used when registering policies
Configuration arrays show which parameters can be customized
Voting attributes determine how authorization workflows are constructed
New templates may be added by Privicore over time