---
title: "Update Run"
method: PATCH
path: "/api/v1/runs/{run_id}"
tags: ["runs"]
---

# Update Run

`PATCH /api/v1/runs/{run_id}`

Update run properties. Only owner or admin can update.

## Path parameters

- `run_id` string, uuid, required — Run UUID

## Request body

- RunUpdate
  - `visibility` 'public' | 'private' — Resource visibility options for access control

## Response `200`

Successful Response

- RunResponse — Full run detail returned by the API.
  - `id` string, uuid, required
  - `status` 'PENDING' | 'SETUP' | 'RUNNING' | 'UPLOADING' | 'COMPLETED' | 'FAILED' | 'ERROR' | 'CANCELLED', required — Run status, mirrors Snakedispatch's JobStatus.
  - `owner` UserPublicResponse, required — Minimal public user info for embedding in other responses
    - `id` string, uuid, required
    - `username` string, required
    - `avatar_url` string, nullable
  - `visibility` 'public' | 'private' — Resource visibility options for access control
  - `backend` BackendPublicResponse, required — Backend info visible to regular users (no internal URL).
    - `id` string, uuid, required
    - `name` string, required
    - `is_active` boolean, required
  - `created_at` string, date-time, required
  - `started_at` string, date-time, nullable
  - `completed_at` string, date-time, nullable
  - `workflow` string, required
  - `configfile` string, nullable
  - `git_ref` string, nullable
  - `git_sha` string, nullable
  - `total_job_count` integer, nullable
  - `jobs_finished` integer, nullable
  - `snakemake_args` string[], nullable
  - `extra_files` object, nullable
  - `cache` RunCache — Cache configuration for a run.
    - `key` string, required — Cache identifier. Runs sharing a key reuse each other's cached directories.
    - `dirs` string[], required — Directories to cache (e.g. `./data`).
  - `import_networks` string[], nullable
  - `callback_url` string, nullable
  - `networks` RunNetworkSummary[]
    - `id` string, uuid, required
    - `name` string, nullable
    - `filename` string, required
    - `source_path` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/pypsa/apis/pypsa-app.md) · [All operations](https://skmtc.dev/pypsa/apis/pypsa-app/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pypsa/pypsa-app/revisions/a9fc864817c3/schema)
