v46

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-174421106.5 KB
Conditions

Create a playbook condition

Create a new condition for a playbook.

post/plugins/playbooks/api/v0/playbooks/{id}/conditions

Path parameters

idstring required
Example:iz0g457ikesz55dhxcfa0fk9yy

ID of the playbook to create a condition for.

Request body

idstring

A unique, 26 characters long, alphanumeric identifier for the condition.

versioninteger required

Version number of the condition expression format. Currently only version 1 is supported.

playbook_idstring

The identifier of the playbook this condition belongs to.

run_idstring

If this is a run condition (read-only snapshot), the identifier of the run. Empty for playbook conditions.

create_atinteger

The condition creation timestamp, formatted as the number of milliseconds since the Unix epoch.

update_atinteger

The condition update timestamp, formatted as the number of milliseconds since the Unix epoch.

Example request

{
  "id": "abc123def456ghi789",
  "condition_expr": {
    "and": [
      {
        "is": {
          "field_id": "status",
          "value": "\"active\""
        }
      },
      {
        "or": [
          {
            "is": {
              "field_id": "priority",
              "value": "\"high\""
            }
          },
          {
            "is": {
              "field_id": "priority",
              "value": "\"critical\""
            }
          }
        ]
      }
    ]
  },
  "version": 1,
  "playbook_id": "iz0g457ikesz55dhxcfa0fk9yy",
  "run_id": "mx3xyzdojfgyfdx8sc8of1gdme",
  "create_at": 1606807976289,
  "update_at": 1606807976289
}

Response

Created condition.

idstring

A unique, 26 characters long, alphanumeric identifier for the condition.

versioninteger required

Version number of the condition expression format. Currently only version 1 is supported.

playbook_idstring

The identifier of the playbook this condition belongs to.

run_idstring

If this is a run condition (read-only snapshot), the identifier of the run. Empty for playbook conditions.

create_atinteger

The condition creation timestamp, formatted as the number of milliseconds since the Unix epoch.

update_atinteger

The condition update timestamp, formatted as the number of milliseconds since the Unix epoch.

Example response

{
  "id": "abc123def456ghi789",
  "condition_expr": {
    "and": [
      {
        "is": {
          "field_id": "status",
          "value": "\"active\""
        }
      },
      {
        "or": [
          {
            "is": {
              "field_id": "priority",
              "value": "\"high\""
            }
          },
          {
            "is": {
              "field_id": "priority",
              "value": "\"critical\""
            }
          }
        ]
      }
    ]
  },
  "version": 1,
  "playbook_id": "iz0g457ikesz55dhxcfa0fk9yy",
  "run_id": "mx3xyzdojfgyfdx8sc8of1gdme",
  "create_at": 1606807976289,
  "update_at": 1606807976289
}