Skip to content
  • There are no suggestions because the search field is empty.

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 URLhttps://api.alertops.com/api/v2
Authenticationapi-key request header
Endpoints17

Endpoints

MethodPathDescription
GET/api/v2/workflowsList workflows
POST/api/v2/workflowsCreate 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}/actionsList a workflow's actions
POST/api/v2/workflows/{id}/actionsAdd 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_availableList Workflow action's escalation policies available
GET/api/v2/workflows/{id}/actions/escalation_policies_response_plays_availableList Workflow action's escalation policies response plays available
GET/api/v2/workflows/{id}/conditionsList a workflow's conditions
POST/api/v2/workflows/{id}/conditionsAdd 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

NameTypeRequiredDescription
searchstringOptional 
workflowtypestringOptionalWorkflow Type name or Workflow Type ID.
enabledbooleanOptionalDefault is both Enabled & Disabled. Valid values are true, false and empty string.
limitintegerOptionalPage size. Default is 10. Max value for this parameter is 100.
offsetintegerOptionalDefault is 0. Offset to start pagination search results.
sortBystringOptionalDefault is WorkflowName. Eg. WorkflowName or WorkflowType or Scheduled.
sortDirstringOptionalDefault 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

NameTypeRequiredDescription
idstringRequiredWorkflow 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

NameTypeRequiredDescription
idstringRequiredWorkflow 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

NameTypeRequiredDescription
idstringRequiredWorkflow 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

NameTypeRequiredDescription
idstringRequiredWorkflow 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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name

Request body

JSON object (required).

FieldTypeRequired
namestringOptional
valueobjectOptional
webhook_urlstringOptional
send_to_original_recipientsbooleanRequired
send_to_senderbooleanRequired
send_to_ownerbooleanRequired
launch_new_threadbooleanRequired
subjectstringOptional
message_textstringOptional
usersarray of stringsOptional
groupsarray of stringsOptional
is_escalation_policybooleanOptional

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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name
action_idintegerRequiredThe 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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name
action_idintegerRequiredThe action ID.

Request body

JSON object (required).

FieldTypeRequired
namestringOptional
valueobjectOptional
webhook_urlstringOptional
send_to_original_recipientsbooleanRequired
send_to_senderbooleanRequired
send_to_ownerbooleanRequired
launch_new_threadbooleanRequired
subjectstringOptional
message_textstringOptional
usersarray of stringsOptional
groupsarray of stringsOptional
is_escalation_policybooleanOptional

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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name
action_idintegerRequiredThe 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

NameTypeRequiredDescription
idstringRequiredThe 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

NameTypeRequiredDescription
idstringRequiredThe 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

NameTypeRequiredDescription
idstringRequiredWorkflow 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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name

Request body

JSON object (required).

FieldTypeRequired
typestringOptional
matchstringOptional
namestringOptional
operatorstringOptional
valueobjectOptional
list_idstringOptional

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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name
condition_idintegerRequiredThe 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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name
condition_idintegerRequiredThe condition ID.

Request body

JSON object (required).

FieldTypeRequired
typestringOptional
matchstringOptional
namestringOptional
operatorstringOptional
valueobjectOptional
list_idstringOptional

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

NameTypeRequiredDescription
idstringRequiredWorkflow ID or Workflow Name
condition_idintegerRequiredThe 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"