---
title: "Workflow runs, newest first"
method: GET
path: "/api/v1/workflows/runs"
tags: ["Dardaris"]
---

# Workflow runs, newest first

`GET /api/v1/workflows/runs`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/workflows/runs`
- Auth: API key in cookie `better-auth.session_token`

One record per execution, sorted on `startedAt`. `steps` carries each action with its own status, what it produced and, where it was skipped, the reason it was skipped. A run waiting on the owner sits at `awaiting_approval` and names its approval request.

## Query parameters

- `limit` integer

## Response `200`

Workflow runs.

- object
  - `ok` unknown, required
  - `data` object, required
    - `runs` object[], required
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `workflowId` string, required: Stable record id, e.g. `lse_012`.
      - `startedAt` string, required: ISO 8601 timestamp.
      - `finishedAt` string: ISO 8601 timestamp.
      - `status` 'running' | 'awaiting_approval' | 'completed' | 'failed' | 'skipped' | 'cancelled', required
      - `subject` object, required: The record the run was about, which is what triggered it.
        - `kind` string, required: Which kind of record this points at, for example `lease`, `unit` or `invoice`.
        - `id` string, required: Stable record id, e.g. `lse_012`.
        - `label` string, required: How the record reads to a person, so a trail can be followed without a second lookup.
      - `triggerSummary` string, required
      - `steps` object[], required
        - `actionId` string, required: Stable record id, e.g. `lse_012`.
        - `kind` string, required
        - `label` string, required
        - `status` 'pending' | 'awaiting_approval' | 'done' | 'skipped' | 'failed', required
        - `at` string: ISO 8601 timestamp.
        - `produced` object[]: What this step created, so the trail stays navigable.
          - `kind` string, required: Which kind of record this points at, for example `lease`, `unit` or `invoice`.
          - `id` string, required: Stable record id, e.g. `lse_012`.
          - `label` string, required: How the record reads to a person, so a trail can be followed without a second lookup.
        - `detail` string
        - `skipReason` string: Why a step was skipped. Saying what stopped and why is the whole trust proposition.
      - `approvalRequestId` string: Stable record id, e.g. `lse_012`.
      - `error` string
      - `summary` string, required: One owner-readable line for the activity feed.
    - `total` number, required: Every run on file, not just the ones returned.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The limit was not a whole number between 1 and 500.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
