Create Workflow
POST {{batmanURL}}/v3/workflows
Create a Workflow
Important Fields | Values |
---|---|
trigger | incident_triggered incident_acknowledged incident_resolved incident_reassigned incident_tag_updated incident_priority_updated incident_note_added |
actions.name | sq_attach_runbooks sq_add_communication_channel sq_add_incident_note sq_mark_incident_slo_affecting sq_make_http_call sq_trigger_manual_webhook sq_send_email slack_archive_channel slack_create_incident_channel slack_message_channel slack_message_user jira_create_ticket msteams_message_channel sq_update_incident_priority msteams_message_user sq_add_status_page_issue |
filters.condition | or and |
filters.value | service_is service_is_not service_contains service_contains_not alert_source_is alert_source_is_not alert_source_contains alert_source_contains_not priority_is priority_is_not tag_is tag_is_not |
Request Body
{"owner_id"=>"650141ae7891bb11fbbd1234", "title"=>"new workflow 22", "description"=>"new workflow 22", "enabled"=>false, "trigger"=>"incident_triggered", "filters"=>{"condition"=>"or", "filters"=>[{"type"=>"priority_is", "value"=>"P2"}, {"type"=>"priority_is", "value"=>"UNSET"}]}, "tags"=>[{"color"=>"#C668FF", "key"=>"hello", "value"=>"world"}], "actions"=>[{"data"=>{"note"=>"hello world"}, "name"=>"sq_add_incident_note"}], "entity_owner"=>{"id"=>"62ea03c97837239142e76558", "type"=>"user"}}
RESPONSES
status: Created
{"data":{"id":9048,"owner_id":"650141ae7891bb11fbbd1234","title":"new workflow 22","description":"new workflow 22","enabled":false,"trigger":"incident_triggered","filters":{"condition":"or","filters":[{"type":"priority_is","value":"P2"},{"type":"priority_is","value":"UNSET"}]},"tags":[{"color":"#C668FF","key":"hello","value":"world"}],"actions":[{"data":{"note":"hello world"},"id":19180,"name":"sq_add_incident_note"}],"created_at":"2024-04-19 11:02:23.606241 +0000 UTC","created_by":"62ea03c97837239142e76558","updated_at":"2024-04-19 11:02:23.606241 +0000 UTC","updated_by":"62ea03c97837239142e76558","entity_owner":{"id":"62ea03c97837239142e76558","type":"user"}}}