List pending actions

Description

Retrieve a list of actions in a story that currently have pending action runs, ordered by the number of pending runs (highest first). This endpoint is useful for monitoring which actions in a story have a backlog of work to process.

Request

HTTP Method: GET

Path Parameter Description
story_id The ID of the story.
Query Parameter Description
search Optional Search against action names.
story_mode Optional The mode (TEST or LIVE) of the story. Defaults to LIVE.
per_page Optional Set the number of results returned per page.
page Optional Specify the page of results to return if there are multiple pages. Defaults to page 1.
draft_id Optional Return actions for a specific draft. About drafts.
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/stories/<<story_id>>/pending_actions?story_mode=LIVE \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request will return a JSON Array describing the actions with pending runs for the specified story, ordered by pending run count (descending).

Field description

Parameter Description
id Action ID.
name Name of the action.
type Action type.
pending_action_runs_count Number of pending action runs for this action.

Sample response

{
  "pending_actions": [
    {
      "id": 12345,
      "name": "Process webhook",
      "type": "Agents::EventTransformationAgent",
      "pending_action_runs_count": 150
    },
    {
      "id": 12346,
      "name": "Send notification",
      "type": "Agents::HTTPRequestAgent",
      "pending_action_runs_count": 45
    },
    {
      "id": 12347,
      "name": "Parse data",
      "type": "Agents::EventTransformationAgent",
      "pending_action_runs_count": 12
    }
  ],
  "meta": {
    "current_page": "https://<<META.tenant.domain>>/api/v1/stories/<<story_id>>/pending_actions?per_page=20&page=1",
    "previous_page": null,
    "next_page": null,
    "next_page_number": null,
    "per_page": 20,
    "pages": 1,
    "count": 3
  }
}
Was this helpful?