Workflow alert rule APIs
Alert rules are used to monitor and notify users about specific events or issues during workflow processing. You can create and manage alert rules by using these APIs.
POST - Create workflow alert rules
Creates a workflow alert rule.
- URL
../apis/v2/rest/configurations/alert-rules?type=WorkflowAlertRule- Parameters
- None
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
-
{ "name": "<alert_rule_name>", "description": "<alert_rule_description>", "enabled": <alert_rule_state>, "type": "WorkflowAlertRule|FlowAlertRule", "users": [ "array_of_user_mailIDs" ], "events": { "failed": <false|true>, "timeout": <false|true, "success": <false|true }, "integrations": [ { "name": "<workflow_name>", "uid": "<workflow_uid>", "project": "<project>" } ] } - Response
-
If successful, the response code is as follows:
{ "name": "<alert_rule_name>", "description": "<alert_rule_description>", "enabled": <alert_rule_state>, "type": "WorkflowAlertRule|FlowAlertRule", "users": [ "array_of_user_mailIDs" ], "events": { "failed": <false|true>, "timeout": <false|true, "success": <false|true }, "integrations": [ { "name": "<workflow_name>", "uid": "<workflow_uid>", "project": "<project>" } ] }
PUT - Update workflow alert rules
Updates a workflow alert rule.
- URL
../apis/v2/rest/configurations/alert-rules/{alertRuleName}?type=WorkflowAlertRule- Parameters
-
{alertRuleName}- Name of the alert rule.
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
-
{ "name": "<alert_rule_name>", "description": "<alert_rule_description>", "enabled": <alert_rule_state>, "type": "WorkflowAlertRule|FlowAlertRule", "users": [ "array_of_user_mailIDs" ], "events": { "failed": <false|true>, "timeout": <false|true, "success": <false|true }, "integrations": [ { "name": "<workflow_name>", "uid": "<workflow_uid>", "project": "<project>" } ] } - Response
-
If successful, the response code is as follows:
{ "name": "<alert_rule_name>", "description": "<alert_rule_description>", "enabled": <alert_rule_state>, "type": "WorkflowAlertRule|FlowAlertRule", "users": [ "array_of_user_mailIDs" ], "events": { "failed": <false|true>, "timeout": <false|true, "success": <false|true }, "integrations": [ { "name": "<workflow_name>", "uid": "<workflow_uid>", "project": "<project>" } ] }
DELETE - Delete workflow alert rules
Deletes a workflow alert rule.
- URL
../apis/v2/rest/configurations/alert-rules/{alertRuleName}?type=WorkflowAlertRule- Parameters
-
{alertRuleName}- Name of the alert rule.
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
- None
- Response
- None
GET - List workflow alert rules
Retrieves the list of all workflow alert rules.
- URL
../apis/v2/rest/configurations/alert-rules- Parameters
- None
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
- None
- Response
-
[ { "name": "<alert_rule_name>", "description": "<alert_rule_description>", "enabled": <alert_rule_state>, "type": "WorkflowAlertRule|FlowAlertRule" } ]
GET - Get workflow alert rules
Retrieves the details about a specific alert rule.
- URL
../apis/v2/rest/configurations/alert-rules/{alertRuleName}?type=WorkflowAlertRule- Parameters
-
{alertRuleName}- Name of the alert rule.
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
- None
- Response
-
[ { "name": "<alert_rule_name>", "description": "<alert_rule_description>", "enabled": <alert_rule_state>, "type": "WorkflowAlertRule|FlowAlertRule", "users": [ "array_of_user_mailIDs" ], "events": { "failed": <false|true>, "timeout": <false|true, "success": <false|true }, "integrations": [ { "name": "<workflow_name>", "uid": "<workflow_uid>", "project": "<project>" } ] } ]
POST - Enable workflow alert rules
Enables a specific alert rule.
- URL
../apis/v2/rest/configurations/alert-rules/{alertRuleName}/activate?type=WorkflowAlertRule- Parameters
-
{alertRuleName}- Name of the alert rule.
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
- None
- Response
-
{ "message": "<alert_rule_name>'s state is updated to activate" }
POST - Disable workflow alert rules
Disables a specific alert rule.
- URL
../apis/v2/rest/configurations/alert-rules/{alertRuleName}/deactivate?type=WorkflowAlertRule- Parameters
-
{alertRuleName}- Name of the alert rule.
- Request headers
-
Content-Type: application/json X-INSTANCE-API-KEY: <generated API key> - Request body
- None
- Response
-
{ "message": "<alert_rule_name>'s state is updated to deactivate" }