- Information
- GET /api/lifecyclemanagement/policies/{id}
- GET /api/lifecyclemanagement/policies
- GET /api/lifecyclemanagement/policies/actions
- GET /api/lifecyclemanagement/policies/targettypes
- GET /api/lifecyclemanagement/policies/timings
- POST /api/lifecyclemanagement/policies
- PUT /api/lifecyclemanagement/policies/{id}
- DELETE /api/lifecyclemanagement/policies/{id}
Information
The LifeCycle Management API is available since API version 1.12.0.
GET /api/lifecyclemanagement/policies/{id}
Returns a lifecycle policy.
Response
200 (OK): A policy as JSON.
400 (BAD REQUEST): The request is invalid or inconsistent.
403 (FORBIDDEN): The user doesn't have the rights to make this request.
404 (NOT FOUND): The specified policy does not exist.
Example
{
"actionParameters": "{ workflowId: noop }",
"timing": "SPECIFIC_DATE",
"action": "START_WORKFLOW",
"targetType": "EVENT",
"id": "601",
"title": "My first policy",
"isActive": false,
"actionDate": "2023-11-30T16:16:47Z",
"targetFilters": "",
"accessControlEntries": [
{
"allow": true,
"role": "ROLE_USER_BOB",
"action": "read",
"id": 602
}
]
}
GET /api/lifecyclemanagement/policies
Get lifecycle policies. Policies that you do not have read access to will not show up.
Response
200 (OK): A JSON object containing an array.
400 (BAD REQUEST): The request is invalid or inconsistent.
| Field | Type | Description |
|---|---|---|
limit |
int |
The maximum number of results to return for a single request |
offset |
int |
The index of the first result to return |
sort |
string |
Sort the results based upon a sorting criteria. A criteria is specified as a pair such as: |
Example
{
"total": 1,
"offset": 0,
"limit": 100,
"results": [
{
"actionParameters": "{ workflowId: noop }",
"timing": "SPECIFIC_DATE",
"action": "START_WORKFLOW",
"targetType": "EVENT",
"id": "601",
"title": "My first policy",
"isActive": false,
"actionDate": "2023-11-30T16:16:47Z",
"targetFilters": "",
"accessControlEntries": [
{
"allow": true,
"role": "ROLE_USER_BOB",
"action": "read",
"id": 602
}
]
}
]
}
GET /api/lifecyclemanagement/policies/actions
Returns a lifecycle policy actions.
Response
200 (OK): A list of actions as JSON.
Example
[
"START_WORKFLOW"
]
GET /api/lifecyclemanagement/policies/targettypes
Returns a lifecycle policy target types.
Response
200 (OK): A list of targets types as JSON.
Example
[
"EVENT"
]
GET /api/lifecyclemanagement/policies/timings
Returns a lifecycle policy timings.
Response
200 (OK): A list of timings as JSON.
Example
[
"SPECIFIC_DATE",
"REPEATING",
"ALWAYS"
]
POST /api/lifecyclemanagement/policies
Creates a new policy.
Response
201 (CREATED): The policy was successfully created.
400 (BAD REQUEST): The request is invalid or inconsistent.
403 (FORBIDDEN): The user doesn't have the rights to make this request.
| Field | Type | Description |
|---|---|---|
title |
string |
Policy Title |
targetType |
[enumeration] |
Which entities the policy should affect. Possible values: EVENT |
action |
[enumeration] |
The action that should be performed. Possible values: START_WORKFLOW |
actionParameters |
JSON object |
JSON. Depends on the type of action |
actionDate |
string |
Required if timing is SPECIFIC_DATE. Should be an ISO string |
cronTrigger |
string |
Required if timing is REPEATING. https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.htm |
timing |
[enumeration] |
When the policy should be applied. Possible values: SPECIFIC_DATE, REPEATING, ALWAYS |
targetFilters |
JSON object |
The filter(s) used to select applicable entities. |
accessControlEntries |
string |
Policy ACL in JSON format. |
PUT /api/lifecyclemanagement/policies/{id}
Updates a policy.
Response
200 (OK): The policy was successfully updated.
400 (BAD REQUEST): The request is invalid or inconsistent.
403 (FORBIDDEN): The user doesn't have the rights to make this request.
| Field | Type | Description |
|---|---|---|
title |
string |
Policy Title |
targetType |
[enumeration] |
Which entities the policy should affect. Possible values: EVENT |
action |
[enumeration] |
The action that should be performed. Possible values: START_WORKFLOW |
actionParameters |
JSON object |
JSON. Depends on the type of action |
actionDate |
string |
Required if timing is SPECIFIC_DATE. Should be an ISO string |
cronTrigger |
string |
Required if timing is REPEATING. https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.htm |
timing |
[enumeration] |
When the policy should be applied. Possible values: SPECIFIC_DATE, REPEATING, ALWAYS |
targetFilters |
JSON object |
The filter(s) used to select applicable entities. |
accessControlEntries |
string |
JSON for ACL. |
DELETE /api/lifecyclemanagement/policies/{id}
Removes a policy.
Response
200 (OK): The policy was successfully deleted.
403 (FORBIDDEN): The user doesn't have the rights to make this request.
404 (NOT FOUND): The specified policy does not exist.