PlaybookRuns

List all playbook runs

Retrieve a paged list of playbook runs, filtered by team, status, owner, name and/or members, and sorted by ID, name, status, creation date, end date, team or owner ID.

get/plugins/playbooks/api/v0/runs

Query parameters

team_idstring required

ID of the team to filter by.

pageinteger

Zero-based index of the page to request.

per_pageinteger

Number of playbook runs to return per page.

sort'id' | 'name' | 'is_active' | 'create_at' | 'end_at' | 'team_id' | 'owner_user_id'

Field to sort the returned playbook runs by.

direction'desc' | 'asc'

Direction (ascending or descending) followed by the sorting of the playbook runs.

statusesstring[]

The returned list will contain only the playbook runs with the specified statuses.

owner_user_idstring

The returned list will contain only the playbook runs commanded by this user. Specify "me" for current user.

participant_idstring

The returned list will contain only the playbook runs for which the given user is a participant. Specify "me" for current user.

search_termstring

The returned list will contain only the playbook runs whose name contains the search term.

channel_idstring

The returned list will contain only the playbook runs associated with this channel ID.

omit_endedboolean

When set to true, only active runs (with EndAt = 0) are returned. When false or omitted, both active and ended runs are returned.

sinceinteger

Return only PlaybookRuns created/modified since the given timestamp (in milliseconds).

Response

A paged list of playbook runs.

total_countinteger

The total number of playbook runs in the list, regardless of the paging.

page_countinteger

The total number of pages. This depends on the total number of playbook runs in the database and the per_page parameter sent with the request.

has_moreboolean

A boolean describing whether there are more pages after the currently returned.

Example response

{
  "total_count": 305,
  "page_count": 2,
  "has_more": true,
  "items": [
    {
      "id": "mx3xyzdojfgyfdx8sc8of1gdme",
      "name": "Server down in EU cluster",
      "summary": "There is one server in the EU cluster that is not responding since April 12.",
      "owner_user_id": "bqnbdf8uc0a8yz4i39qrpgkvtg",
      "team_id": "61ji2mpflefup3cnuif80r5rde",
      "channel_id": "hwrmiyzj3kadcilh3ukfcnsbt6",
      "create_at": 1606807976289,
      "active_stage": 1,
      "active_stage_title": "Triage issue",
      "post_id": "b2ntfcrl4ujivl456ab4b3aago",
      "playbook_id": "0y4a0ntte97cxvfont8y84wa7x",
      "checklists": [
        {
          "id": "6f6nsgxzoq84fqh1dnlyivgafd",
          "title": "Triage issue",
          "items": [
            {
              "id": "6f6nsgxzoq84fqh1dnlyivgafd",
              "title": "Gather information from customer.",
              "state": "closed",
              "state_modified": 1607774621321,
              "assignee_id": "pisdatkjtdlkdhht2v4inxuzx1",
              "assignee_modified": 1608897821125,
              "command": "/opsgenie on-call",
              "command_last_run": 1608552221019,
              "description": "Ask the customer for more information in [Zendesk](https://www.zendesk.com/).",
              "delete_at": 1607774621321,
              "due_date": 1607774621321,
              "requirements": [
                {
                  "id": "req1abcxyz",
                  "label": "Ticket URL",
                  "value": "https://jira.example.com/browse/ABC-123"
                }
              ],
              "update_at": 1607774621321,
              "condition_id": "6f6nsgxzoq84fqh1dnlyivgafd",
              "condition_action": "hidden",
              "condition_reason": "Severity is Critical AND Status is not Closed"
            }
          ]
        }
      ]
    }
  ]
}

Changes

Changed in 7 of the 47 revisions of this API.113

    • added the optional property items/items/checklists/items/items/items/requirements to the response with the 200 status

      response-optional-property-added

  • 7cc35d281cdf11See the full diff
    • removed the optional property items/items/description from the response with the 200 status

      response-optional-property-removed

    • added the optional property items/items/summary to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/condition_action to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/condition_id to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/condition_reason to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/delete_at to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/due_date to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/task_actions to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/checklists/items/items/items/update_at to the response with the 200 status

      response-optional-property-added

    • added the new optional query request parameter since

      new-optional-request-parameter

    • added the new optional query request parameter channel_id

      new-optional-request-parameter

    • added the new optional query request parameter omit_ended

      new-optional-request-parameter

    • endpoint added

      endpoint-added