---
title: "Get operation status"
method: GET
path: "/v1/default/banks/{bank_id}/operations/{operation_id}"
tags: ["Operations"]
---

# Get operation status

`GET /v1/default/banks/{bank_id}/operations/{operation_id}`

## Request

- Base URL: `https://hindsight.vectorize.io` (the document declares no server; this is the origin it was published from)
- URL: `https://hindsight.vectorize.io/v1/default/banks/{bank_id}/operations/{operation_id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/vectorize/apis/hindsight-http-api/docs/v1/default/banks/:bank_id/operations/:operation_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the status of a specific async operation. Returns 'pending', 'processing', 'completed', 'failed', or 'cancelled'. Completed operations remain queryable with their payload for the configured retention window and are pruned afterward.

## Path parameters

- `bank_id` string, required
- `operation_id` string, required

## Query parameters

- `include_payload` boolean: Include the raw task payload (submission params) in the response. May be large.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- OperationStatusResponse: Response model for getting a single operation status.
  - `operation_id` string, required
  - `status` 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | 'not_found', required
  - `operation_type` string, nullable
  - `id` string, nullable: Same as `operation_id`; the name the operations list uses.
  - `task_type` string, nullable: Same as `operation_type`; the name the operations list uses.
  - `mental_model_id` string, nullable: Mental model this operation acted on (refresh_mental_model); null for other task types.
  - `created_at` string, nullable
  - `updated_at` string, nullable
  - `completed_at` string, nullable
  - `error_message` string, nullable
  - `retry_count` integer, nullable: Number of times this operation has been retried after failure.
  - `next_retry_at` string, nullable: When the worker will next attempt this operation. For a pending operation, a value in the future indicates the task is parked — a refresh_mental_model held back by min_refresh_interval_seconds, or an extension raising DeferOperation — rather than awaiting immediate pickup.
  - `progress` OperationProgress: Last-known progress snapshot for a long-running async operation. Written at coarse phase/batch boundaries by the worker (consolidation, batch retain). Lets an operator polling the operation status API distinguish a healthy long-running job (``processed`` advancing across polls) from a frozen one (same numbers, no movement in ``at``). Absent (``null``) on operations that never reached a checkpoint — completed-instantly or pre-feature rows.
    - `stage` string, required: Coarse phase the operation last reported (e.g. 'processing_batch').
    - `at` string, required: ISO-8601 timestamp when this snapshot was written.
    - `processed` integer, nullable: Units of work finished so far (sub-batches, memories), when known.
    - `total` integer, nullable: Total units of work for the operation, when known.
    - `detail` object, nullable: Operation-specific counters (e.g. observations_created, round, items_in_sub_batch).
  - `result_metadata` object, nullable: Internal metadata for debugging. Structure may change without notice. Not for production use.
  - `details` RefreshMentalModelOperationDetails: What a refresh_mental_model operation did, on the operation record itself. Reported under an async operation's ``details``, which is keyed by ``operation_type``: each type that has a typed outcome to report contributes its own shape there, rather than every type's fields being flattened onto the operation. Today refresh is the only one. This exists because ``result_metadata`` — the only per-refresh record kept indefinitely — could not say what a refresh did (#3274), and is documented as debug-only and unstable, so it is not something a caller can build on.
    - `operation_type` 'refresh_mental_model': Discriminator: which operation type this detail describes.
    - `outcome` 'content_written' | 'content_unchanged' | 'content_preserved_no_new_facts' | 'refresh_failed_empty_candidate' | 'refresh_failed_delta_not_applied' | 'refresh_failed_structured_output' | 'refresh_failed_candidate_rejected' | 'refresh_failed_error', required: What the refresh did with the document: rewrote it (`content_written`), produced a document identical to the stored one (`content_unchanged`), had no new facts to read at all (`content_preserved_no_new_facts`), or refused to write (the `refresh_failed_*` values).
    - `failure_reason` 'empty_candidate' | 'structured_doc_unreadable' | 'delta_ops_failed' | 'delta_ops_all_skipped' | 'delta_not_applied' | 'structured_output_failed' | 'candidate_rejected' | 'retrieval_failed' | 'no_answer' | 'unexpected_error', nullable: Why the refresh refused to write, finer-grained than the outcome — it distinguishes an op call that failed from one whose operations were all rejected, and from a baseline document that could not be read. Null unless `outcome` is one of the `refresh_failed_*` values.
  - `child_operations` ChildOperationStatus[], nullable: Child operations for batch operations (if applicable)
    - `operation_id` string, required
    - `status` string, required
    - `sub_batch_index` integer, nullable
    - `items_count` integer, nullable
    - `error_message` string, nullable
  - `task_payload` object, nullable: Raw task payload (params the operation was submitted with). Only populated when include_payload=true.

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-07** `45e711cd0897`: 2 warning
  - added the new `candidate_rejected` enum value to the `details/anyOf[subschema #1: RefreshMentalModelOperationDetails]/failure_reason/anyOf[subschema #1]/` response property for the response status `200`
  - added the new `refresh_failed_candidate_rejected` enum value to the `details/anyOf[subschema #1: RefreshMentalModelOperationDetails]/outcome` response property for the response status `200`
- **2026-10-04** `4fda98b75f63`: 1 warning, 5 info
  - removed the optional property `detail/items/url` from the response with the `422` status
  - added the optional property `details` to the response with the `200` status
  - added the optional property `id` to the response with the `200` status
  - added the optional property `mental_model_id` to the response with the `200` status
  - …2 more
- **2026-05-15** `0d08f271b9db`: 2 warning, 7 info
  - added the new `cancelled` enum value to the `status` response property for the response status `200`
  - added the new `processing` enum value to the `status` response property for the response status `200`
  - added the new optional `query` request parameter `include_payload`
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - …5 more

[Operation history](https://skmtc.dev/vectorize/apis/hindsight-http-api/changes/v1/default/banks/:bank_id/operations/:operation_id/get.md)

---

[API](https://skmtc.dev/vectorize/apis/hindsight-http-api.md) - [All operations](https://skmtc.dev/vectorize/apis/hindsight-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vectorize/apis/hindsight-http-api/revisions/45e711cd0897?raw)
