---
title: "The runs, newest first"
method: GET
path: "/workspaces/{id}/runs"
tags: ["runs"]
---

# The runs, newest first

`GET /workspaces/{id}/runs`

## Request

- Base URL: `https://api.swingfactor.ai/v1`
- URL: `https://api.swingfactor.ai/v1/workspaces/{id}/runs`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Query parameters

- `kind` 'draft': Only this kind.
- `subject` string, uuid: Only those about this.

## Response `200`

The runs.

- ModelRunList
  - `items` ModelRun[], required
    - `id` string, uuid, required
    - `kind` 'draft', required
    - `subjectId` string, uuid, required: What the run is about.
    - `status` 'queued' | 'running' | 'done' | 'failed' | 'stopped', required: A run left unfinished for half an hour is `failed`, whatever stopped it saying so.
    - `step` string, nullable, required: The step it is on.
    - `steps` object[], required: Its steps, in order, and where each got to.
      - `name` string, required
      - `status` 'waiting' | 'running' | 'done' | 'skipped' | 'failed', required
      - `added` integer: What it wrote.
      - `refused` integer: What was proposed and not written, because it did not hold.
      - `note` string
    - `error` string, nullable, required: Why it failed, in words.
    - `input` object, required: What it was started with.
    - `outcome` object, nullable, required: What it came to, once it ended.
    - `startedBy` string, uuid, nullable, required
    - `startedByName` string, nullable, required: Who started it — or the product, where it followed from something else.
    - `createdAt` string, required
    - `finishedAt` string, nullable, required
    - `links` ModelRunLinks, required: Relative /v1 URLs to follow.
      - `self` string, required
      - `workspace` string, required
      - `stop` string
  - `total` integer, required
  - `offset` integer, required
  - `limit` integer, required

## Other responses

- `401`: No token, or not a valid one: `unauthorized`.

---

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