List runs

Description

Retrieve a list of story runs. About drafts.

Request

HTTP Method: GET

Path Parameter Description
story_id The ID of the story.
Query Parameter Description
story_mode Optional The mode of the story.
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 runs for a specific draft.
since Optional Only retrieve story runs that started after this time (ISO 8601 timestamp).
until Optional Only retrieve story runs that started until this time (ISO 8601 timestamp).
curl -X GET \
 https://<<META.tenant.domain>>/api/v1/stories/<<story_id>>/runs \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request will return the JSON Array describing the story runs for a story.

Field description

Parameter Description
guid Guid of the story run.
duration Duration of the story run.
story_id ID of the story.
start_time The time the story run started.
end_time The time the story run ended.
action_count Number of actions in the run.
event_count Number of events in the run.
story_mode The mode of the story LIVE or TEST.
draft_id ID of the selected draft.
draft_name Name of the selected draft.

Sample response

{
  "story_runs": [
    {
      "guid": "5466f325-0bc6-47fb-943f-41d1a2a8d6ae",
      "duration": 0,
      "story_id": 155,
      "start_time": "2023-12-13T16:19:50Z",
      "end_time": "2023-12-13T16:19:50Z",
      "action_count": 5,
      "event_count": 5,
      "story_mode": "LIVE",
      "draft_id": "1234",
      "draft_name": "Initial Draft"
    },
    {
      "guid": "c0ea6684-1cfb-4ac5-858b-79c631daa79f",
      "duration": 0,
      "story_id": 155,
      "start_time": "2023-12-13T16:16:49Z",
      "end_time": "2023-12-13T16:16:49Z",
      "action_count": 1,
      "event_count": 1,
      "story_mode": "LIVE",
      "draft_id": "1234",
      "draft_name": "Initial Draft"
    }
  ],
  "meta": {
    "current_page": "https://<<META.tenant.domain>>/api/v1/stories/<<story_id>>/runs?per_page=20&page=1",
    "previous_page": null,
    "next_page": null,
    "next_page_number": null,
    "per_page": 20,
    "pages": 1,
    "count": 2
  }
}
Was this helpful?