---
title: "Read Task Run State"
method: GET
path: "/api/task_run_states/{id}"
tags: ["Task Run States"]
---

# Read Task Run State

`GET /api/task_run_states/{id}`

Get a task run state by id.

## Path parameters

- `id` string, uuid, required — The task run state id

## Headers

- `x-prefect-api-version` string

## Response `200`

Successful Response

- State — Represents the state of a run.
  - `id` string, uuid
  - `type` 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING', required — Enumeration of state types.
  - `name` string
  - `timestamp` string, date-time
  - `message` string
  - `data` unknown
  - `state_details` StateDetails — A base pydantic.BaseModel for all Prefect schemas and pydantic models. As the basis for most Prefect schemas, this base model usually ignores extra fields that are passed to it at instantiation. Because adding new fields to API payloads is not considered a breaking change, this ensures that any Prefect client loading data from a server running a possibly-newer version of Prefect will be able to process those new fields gracefully. However, when PREFECT_TEST_MODE is on, extra fields are forbidden in order to catch subtle unintentional testing errors.
    - `flow_run_id` string, uuid
    - `task_run_id` string, uuid
    - `child_flow_run_id` string, uuid
    - `scheduled_time` string, date-time
    - `cache_key` string
    - `cache_expiration` string, date-time
    - `untrackable_result` boolean
    - `pause_timeout` string, date-time
    - `pause_reschedule` boolean
    - `pause_key` string
    - `run_input_keyset` object
    - `refresh_cache` boolean
    - `retriable` boolean
    - `transition_id` string, uuid
    - `task_parameters_id` string, uuid

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/prefecthq/apis/untitled-api-2.md) · [All operations](https://skmtc.net/prefecthq/apis/untitled-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prefecthq/untitled-api-2/revisions/29ba6c4f8837/schema)
