Workflows V2

Manage workflows.

Workflows allow you to automate certain actions and behaviors based on specific triggers.

ListWorkflows Workflows V2

List all workflows

Responses
200

OK response.

get/v2/workflows
Request samples
Response samples
application/json
{
  • "workflows": [
    ]
}

CreateWorkflow Workflows V2

Create a new workflow

Request
Request Body schema: application/json
required
object

Annotations that track metadata about this resource

required
Array of objects (ConditionGroupPayloadV2)

Conditions that apply to the workflow trigger

continue_on_step_error
required
boolean

Whether to continue executing the workflow if a step fails

object (WorkflowDelayV2)
required
Array of objects (ExpressionPayloadV2)

The expressions to use in the workflow

folder
string

Folder to display the workflow in

include_private_incidents
required
boolean

Whether to include private incidents

name
required
string

Name provided by the user when creating the workflow

once_for
required
Array of strings

This workflow will run 'once for' a list of references

runs_on_incident_modes
required
Array of strings

Which incident modes should this workflow run on? By default, workflows only run on standard incidents, but can also be configured to run on test and retrospective incidents.

Items Enum: "standard" "test" "retrospective"
runs_on_incidents
required
string

Which incidents should the workflow be applied to?

Enum: "newly_created" "newly_created_and_active"
shortform
string

The shortform used to trigger this workflow (only applicable for manual triggers)

state
string

What state this workflow is in

Enum: "active" "disabled" "draft" "error"
required
Array of objects (StepConfigPayloadV2)

Steps that are executed as part of the workflow

trigger
required
string

Trigger to set on the workflow

Responses
201

Created response.

post/v2/workflows
Request samples
application/json
{
  • "annotations": {
    },
  • "condition_groups": [
    ],
  • "continue_on_step_error": true,
  • "delay": {
    },
  • "expressions": [
    ],
  • "folder": "My folder 01",
  • "include_private_incidents": true,
  • "name": "My little workflow",
  • "once_for": [
    ],
  • "runs_on_incident_modes": [
    ],
  • "runs_on_incidents": "newly_created",
  • "shortform": "page-the-ceo",
  • "state": "active",
  • "steps": [
    ],
  • "trigger": "incident.updated"
}
Response samples
application/json
{
  • "management_meta": {},
  • "workflow": {
    }
}

DestroyWorkflow Workflows V2

Archives a workflow

Request
path Parameters
id
required
string

Unique identifier for the workflow

Example: 01FCNDV6P870EA6S7TK1DSYDG0
Responses
204

No Content response.

delete/v2/workflows/{id}
Request samples

ShowWorkflow Workflows V2

Show a workflow by ID

Request
path Parameters
id
required
string

Unique identifier for the workflow

Example: 01FCNDV6P870EA6S7TK1DSYDG0
Responses
200

OK response.

get/v2/workflows/{id}
Request samples
Response samples
application/json
{
  • "management_meta": {},
  • "workflow": {
    }
}

UpdateWorkflow Workflows V2

Updates a workflow

Request
path Parameters
id
required
string

ID of the workflow to update

Examples:
01FCNDV6P870EA6S7TK1DSYDG0
Request Body schema: application/json
required
object

Annotations that track metadata about this resource

required
Array of objects (ConditionGroupPayloadV2)

Conditions that apply to the workflow trigger

continue_on_step_error
required
boolean

Whether to continue executing the workflow if a step fails

object (WorkflowDelayV2)
required
Array of objects (ExpressionPayloadV2)

The expressions to use in the workflow

folder
string

Folder to display the workflow in

include_private_incidents
required
boolean

Whether to include private incidents

name
required
string

Name provided by the user when creating the workflow

once_for
required
Array of strings

This workflow will run 'once for' a list of references

runs_on_incident_modes
required
Array of strings

Which incident modes should this workflow run on? By default, workflows only run on standard incidents, but can also be configured to run on test and retrospective incidents.

Items Enum: "standard" "test" "retrospective"
runs_on_incidents
required
string

Which incidents should the workflow be applied to?

Enum: "newly_created" "newly_created_and_active"
shortform
string

The shortform used to trigger this workflow (only applicable for manual triggers)

state
string

What state this workflow is in

Enum: "active" "disabled" "draft" "error"
required
Array of objects (StepConfigPayloadV2)

Steps that are executed as part of the workflow

Responses
200

OK response.

put/v2/workflows/{id}
Request samples
application/json
{
  • "annotations": {
    },
  • "condition_groups": [
    ],
  • "continue_on_step_error": true,
  • "delay": {
    },
  • "expressions": [
    ],
  • "folder": "My folder 01",
  • "include_private_incidents": true,
  • "name": "My little workflow",
  • "once_for": [
    ],
  • "runs_on_incident_modes": [
    ],
  • "runs_on_incidents": "newly_created",
  • "shortform": "page-the-ceo",
  • "state": "active",
  • "steps": [
    ]
}
Response samples
application/json
{
  • "management_meta": {},
  • "workflow": {
    }
}