Case Management

Create an automation rule

Creates an automation rule for a project. The rule defines a trigger event (for example, case created, status transitioned) and an action to execute.

post/api/v2/cases/projects/{project_id}/rules

Request

  • Base URL
    https://api.datadoghq.com
  • URL
    https://api.datadoghq.com/api/v2/cases/projects/{project_id}/rules
  • Auth
    • API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
    • or OAuth 2
      Authorization code: /oauth2/v1/authorize
      Token URL: /oauth2/v1/token scopes: cases_write

Path parameters

project_idstring required

The UUID of the project that owns the automation rules.

Request body

Example request

{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "handle": "workflow-handle-123"
        },
        "type": "execute_workflow"
      },
      "name": "Auto-assign workflow",
      "state": "ENABLED",
      "trigger": {
        "type": "case_created"
      }
    },
    "type": "rule"
  }
}

Response

Created

Example response

{
  "data": {
    "attributes": {
      "action": {
        "data": {
          "handle": "workflow-handle-123"
        },
        "type": "execute_workflow"
      },
      "created_at": "2024-01-01T00:00:00.000Z",
      "name": "Auto-assign workflow",
      "state": "ENABLED",
      "trigger": {
        "type": "case_created"
      }
    },
    "id": "e6773723-fe58-49ff-9975-dff00f14e28d",
    "relationships": {
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      }
    },
    "type": "rule"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.