Policies control various aspects of process execution.
The REST API provides support for working with policies:
Creates a new policy or updates an existing one. Requires administrator privileges.
/api/v2/policy
POST
Authorization
, Content-Type: application/json
{
"name": "myPolicy",
"parentId": "...",
"rules": {
...policy document...
}
}
name
- the policy’s name;parentId
- optional, ID of a parent policy;rules
- the policy’s rules, see the
Policies document.Success response
Content-Type: application/json
{
"result": "CREATED",
"ok": true,
"id": "..."
}
Returns an existing policy.
/api/v2/policy/${name}
GET
Authorization
Content-Type: application/json
{
"name": "myPolicy",
"parentId": "...",
"rules": {
...policy document...
}
}
Deletes an existing policy.
/api/v2/policy/${name}
DELETE
Authorization
Success response
Content-Type: application/json
{
"result": "DELETED",
"ok": true
}
Links an existing policy to an organization, project or a specific user.
/api/v2/policy/${name}/link
PUT
Authorization
, Content-Type: application/json
{
"orgName": "myOrg",
"projectName": "myProject",
"userName": "someUser"
}
All parameters are optional. If all parameters are omitted (or null
) then
the policy becomes a system-wide policy.
Success response
Content-Type: application/json
{
"result": "UPDATED",
"ok": true
}
Unlinks an existing policy from an organization, project or a specific user.
/api/v2/policy/${name}/link?orgName=${orgName}&projectName=${projectName}&userName=${userName}
DELETE
Authorization
, Content-Type: application/json
Success response
Content-Type: application/json
{
"result": "DELETED",
"ok": true
}