Workflows API
The Workflows API enables creation and management of alert automation workflows, including conditions, actions, and escalation policy assignments.
The Workflows API enables creation and management of alert automation workflows, including conditions, actions, and escalation policy assignments.
| Base URL | https://api.alertops.com/api/v2 |
| Authentication | api-key request header |
| Endpoints | 17 |
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v2/workflows | List workflows |
| POST | /api/v2/workflows | Create a workflow |
| GET | /api/v2/workflows/{id} | Get a workflow |
| PUT | /api/v2/workflows/{id} | Update a workflow |
| DELETE | /api/v2/workflows/{id} | Delete a workflow |
| GET | /api/v2/workflows/{id}/actions | List a workflow's actions |
| POST | /api/v2/workflows/{id}/actions | Add a workflow action |
| GET | /api/v2/workflows/{id}/actions/{action_id} | Get a workflow action |
| PUT | /api/v2/workflows/{id}/actions/{action_id} | Update a workflow action |
| DELETE | /api/v2/workflows/{id}/actions/{action_id} | Delete a workflow action |
| GET | /api/v2/workflows/{id}/actions/escalation_policies_available | List Workflow action's escalation policies available |
| GET | /api/v2/workflows/{id}/actions/escalation_policies_response_plays_available | List Workflow action's escalation policies response plays available |
| GET | /api/v2/workflows/{id}/conditions | List a workflow's conditions |
| POST | /api/v2/workflows/{id}/conditions | Add a workflow condition |
| GET | /api/v2/workflows/{id}/conditions/{condition_id} | Get a workflow condition |
| PUT | /api/v2/workflows/{id}/conditions/{condition_id} | Update a workflow condition |
| DELETE | /api/v2/workflows/{id}/conditions/{condition_id} | Delete a workflow condition |
List workflows
GET /api/v2/workflows
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
search | string | Optional | |
workflowtype | string | Optional | Workflow Type name or Workflow Type ID. |
enabled | boolean | Optional | Default is both Enabled & Disabled. Valid values are true, false and empty string. |
limit | integer | Optional | Page size. Default is 10. Max value for this parameter is 100. |
offset | integer | Optional | Default is 0. Offset to start pagination search results. |
sortBy | string | Optional | Default is WorkflowName. Eg. WorkflowName or WorkflowType or Scheduled. |
sortDir | string | Optional | Default is asc. Eg. asc or desc |
Responses
200 OK
{
"total": 246,
"limit": 20,
"offset": 0,
"workflows": [
{
"workflow_id": 16,
"workflow_name": "Stop Delivery on Assignment or Closed",
"workflow_type": "MessageThread",
"enabled": false,
"scheduled": false,
"is_used": false,
"is_bidirection": false
}
]
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Create a workflow
POST /api/v2/workflows
Request body
JSON object.
Example body
{
"workflow_name": "string",
"workflow_type": "string",
"enabled": true,
"alert_type": "string",
"scheduled": true,
"recurrence_interval": 0,
"conditions": [
{
"type": "string",
"match": "string",
"name": "string",
"operator": "string",
"value": "string",
"list_id": "string"
}
],
"actions": [
{
"name": "string",
"value": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
]
}
]
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/workflows" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"workflow_name": "string",
"workflow_type": "string",
"enabled": true,
"alert_type": "string",
"scheduled": true,
"recurrence_interval": 0,
"conditions": [
{
"type": "string",
"match": "string",
"name": "string",
"operator": "string",
"value": "string",
"list_id": "string"
}
],
"actions": [
{
"name": "string",
"value": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
]
}
]
}'Get a workflow
GET /api/v2/workflows/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Responses
200 OK
{
"workflow_id": 4597,
"is_used": false,
"is_bidirection": true,
"workflow_name": "Workflow Attribute Test",
"workflow_type_id": 2,
"workflow_type_name": "Alert",
"enabled": true,
"alert_type": "Standard Alert",
"scheduled": false,
"recurrence_interval": 0,
"conditions": [
{
"condition_id": 11804,
"type": "start",
"match": "all",
"name": "Sender",
"operator": "is not",
"value": "Joe Doe"
}
],
"actions": [
{
"name": "SendMessage",
"value": "CEO MessageRule",
"webhook_url": null,
"send_to_original_recipients": true,
"send_to_sender": false,
"send_to_owner": false,
"launch_new_thread": false,
"message_text": "Test",
"users": [
"testuser"
],
"groups": [
"AlertOps"
]
}
]
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a workflow
PUT /api/v2/workflows/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Request body
JSON object.
Example body
{
"workflow_name": "string",
"workflow_type": "string",
"enabled": true,
"alert_type": "string",
"scheduled": true,
"recurrence_interval": 0,
"conditions": [
{
"type": "string",
"match": "string",
"name": "string",
"operator": "string",
"value": "string",
"list_id": "string"
}
],
"actions": [
{
"name": "string",
"value": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
]
}
]
}Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/workflows/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"workflow_name": "string",
"workflow_type": "string",
"enabled": true,
"alert_type": "string",
"scheduled": true,
"recurrence_interval": 0,
"conditions": [
{
"type": "string",
"match": "string",
"name": "string",
"operator": "string",
"value": "string",
"list_id": "string"
}
],
"actions": [
{
"name": "string",
"value": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
]
}
]
}'Delete a workflow
DELETE /api/v2/workflows/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X DELETE "https://api.alertops.com/api/v2/workflows/{id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List a workflow's actions
GET /api/v2/workflows/{id}/actions
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Responses
200 OK
[
{
"action_id": 4632,
"name": "SendMessage",
"value": "CEO MessageRule",
"webhook_url": null,
"send_to_original_recipients": false,
"send_to_sender": true,
"send_to_owner": false,
"launch_new_thread": false,
"message_text": "Test",
"users": [
"testuser"
],
"groups": [
"AlertOps"
]
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}/actions" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Add a workflow action
POST /api/v2/workflows/{id}/actions
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
name | string | Optional |
value | object | Optional |
webhook_url | string | Optional |
send_to_original_recipients | boolean | Required |
send_to_sender | boolean | Required |
send_to_owner | boolean | Required |
launch_new_thread | boolean | Required |
subject | string | Optional |
message_text | string | Optional |
users | array of strings | Optional |
groups | array of strings | Optional |
is_escalation_policy | boolean | Optional |
Example body
{
"name": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"subject": "string",
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
],
"is_escalation_policy": true,
"value": "string"
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/workflows/{id}/actions" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"subject": "string",
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
],
"is_escalation_policy": true,
"value": "string"
}'Get a workflow action
GET /api/v2/workflows/{id}/actions/{action_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
action_id | integer | Required | The action ID. |
Responses
200 OK
{
"action_id": 4632,
"name": "SendMessage",
"value": "CEO MessageRule",
"webhook_url": null,
"send_to_original_recipients": false,
"send_to_sender": true,
"send_to_owner": false,
"launch_new_thread": false,
"message_text": "Test",
"users": [
"testuser"
],
"groups": [
"testgroup"
]
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}/actions/{action_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a workflow action
PUT /api/v2/workflows/{id}/actions/{action_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
action_id | integer | Required | The action ID. |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
name | string | Optional |
value | object | Optional |
webhook_url | string | Optional |
send_to_original_recipients | boolean | Required |
send_to_sender | boolean | Required |
send_to_owner | boolean | Required |
launch_new_thread | boolean | Required |
subject | string | Optional |
message_text | string | Optional |
users | array of strings | Optional |
groups | array of strings | Optional |
is_escalation_policy | boolean | Optional |
Example body
{
"name": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"subject": "string",
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
],
"is_escalation_policy": true,
"value": "string"
}Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/workflows/{id}/actions/{action_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"webhook_url": "string",
"send_to_original_recipients": true,
"send_to_sender": true,
"send_to_owner": true,
"launch_new_thread": true,
"subject": "string",
"message_text": "string",
"users": [
"string"
],
"groups": [
"string"
],
"is_escalation_policy": true,
"value": "string"
}'Delete a workflow action
DELETE /api/v2/workflows/{id}/actions/{action_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
action_id | integer | Required | The action ID. |
Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X DELETE "https://api.alertops.com/api/v2/workflows/{id}/actions/{action_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List Workflow action's escalation policies available
GET /api/v2/workflows/{id}/actions/escalation_policies_available
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The workflow ID. |
Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}/actions/escalation_policies_available" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List Workflow action's escalation policies response plays available
GET /api/v2/workflows/{id}/actions/escalation_policies_response_plays_available
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The workflow ID. |
Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}/actions/escalation_policies_response_plays_available" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"List a workflow's conditions
GET /api/v2/workflows/{id}/conditions
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Responses
200 OK
[
{
"condition_id": 12074,
"type": "start",
"match": "all",
"name": "Sender",
"operator": "is not",
"value": "Joe Doe"
}
]401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}/conditions" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Add a workflow condition
POST /api/v2/workflows/{id}/conditions
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
type | string | Optional |
match | string | Optional |
name | string | Optional |
operator | string | Optional |
value | object | Optional |
list_id | string | Optional |
Example body
{
"type": "string",
"match": "string",
"name": "string",
"operator": "string",
"list_id": "string",
"value": "string"
}Responses
200 OK
401 Unauthorized · missing or invalid api-key
Example request
curl -X POST "https://api.alertops.com/api/v2/workflows/{id}/conditions" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"type":"string","match":"string","name":"string","operator":"string","list_id":"string","value":"string"}'Get a workflow condition
GET /api/v2/workflows/{id}/conditions/{condition_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
condition_id | integer | Required | The condition ID. |
Responses
200 OK
{
"condition_id": 1180,
"type": "start",
"match": "all",
"name": "Sender",
"operator": "is not",
"value": "Joe Doe"
}401 Unauthorized · missing or invalid api-key
Example request
curl -X GET "https://api.alertops.com/api/v2/workflows/{id}/conditions/{condition_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"Update a workflow condition
PUT /api/v2/workflows/{id}/conditions/{condition_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
condition_id | integer | Required | The condition ID. |
Request body
JSON object (required).
| Field | Type | Required |
|---|---|---|
type | string | Optional |
match | string | Optional |
name | string | Optional |
operator | string | Optional |
value | object | Optional |
list_id | string | Optional |
Example body
{
"type": "string",
"match": "string",
"name": "string",
"operator": "string",
"list_id": "string",
"value": "string"
}Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X PUT "https://api.alertops.com/api/v2/workflows/{id}/conditions/{condition_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"type":"string","match":"string","name":"string","operator":"string","list_id":"string","value":"string"}'Delete a workflow condition
DELETE /api/v2/workflows/{id}/conditions/{condition_id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Workflow ID or Workflow Name |
condition_id | integer | Required | The condition ID. |
Responses
204 No Content · The request was processed successfully. No response body is returned.
401 Unauthorized · missing or invalid api-key
Example request
curl -X DELETE "https://api.alertops.com/api/v2/workflows/{id}/conditions/{condition_id}" \
-H "api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json"