---
title: "Fetch a task by id."
method: GET
path: "/v1/tasks/{id}"
tags: ["Tasks"]
---

# Fetch a task by id.

`GET /v1/tasks/{id}`

## Response `200`

Task.

- Task — Materialized task. `payload` is base64-encoded, matching the library's `[]byte` JSON encoding. Decode before use. When resubmitting the same payload to `POST /v1/tasks`, place the undecoded base64 string into `payload_base64`.
  - `id` string, required
  - `type` string, required
  - `queue` string
  - `dependencies` string[]
  - `dependency_results` object
  - `load_dependencies` boolean
  - `payload` string, byte, required — Base64-encoded payload bytes.
  - `deadline` string, date-time
  - `max_tries` integer
  - `result` TaskResult
    - `payload` unknown, required
    - `completed` string, date-time, required
  - `state` 'new' | 'active' | 'retry' | 'expired' | 'terminated' | 'complete' | 'queue_error' | 'blocked' | 'unreachable', required
  - `created` string, date-time, required
  - `tried` string, date-time
  - `tries` integer
  - `last_err` string
  - `signature` string — Hex-encoded ed25519 signature, when present.

## Other responses

- `404` — Resource does not exist.

---

[API](https://skmtc.net/choria-io/apis/asyncjobs-http-api.md) · [All operations](https://skmtc.net/choria-io/apis/asyncjobs-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/choria-io/asyncjobs-http-api/versions/48b17d96adbf/schema)
