# Operation

Object

Represents an asynchronous operation with its current status and progress.

## Fields

| Name | Type | Description |
| --- | --- | --- |
| `completedAt` | [`DateTimeWithZone`](/api/v2/docs/types/date-time-with-zone) | Timestamp when the operation finished processing. Null if still in progress. |
| `createdAt` | [`DateTimeWithZone!`](/api/v2/docs/types/date-time-with-zone) | Timestamp when the operation was created. |
| `failedCount` | `Int!` | Number of items that failed during processing. Exact — unlike the deprecated id lists, counts never grow with operation size. |
| `failedItemIds` | `[ID!]!` | IDs of items that failed during processing. Complete but unbounded — prefer operationRecords(operationId:, filter: { status: FAILED }), which returns the same population paginated. **Deprecated** — Unbounded payload — returns one id per operation record, and a UI select-all operation can hold a workspace's entire item corpus. Use succeededCount / failedCount / pendingCount for sizes and operationRecords(operationId:, filter: { status: }) for the ids, paginated. Scheduled for removal in the next API version. |
| `id` | `ID!` | Unique identifier for the operation. |
| `operationType` | `String!` | The type of operation being performed (e.g., refetch_engagement). |
| `pendingCount` | `Int!` | Number of items that have not finished processing (not started, in progress, or retrying). Exact — unlike the deprecated id lists, counts never grow with operation size. |
| `pendingItemIds` | `[ID!]!` | IDs of items that have not yet been processed. Complete but unbounded — prefer operationRecords(operationId:, filter: { status: PENDING }), which returns the same population paginated. **Deprecated** — Unbounded payload — returns one id per operation record, and a UI select-all operation can hold a workspace's entire item corpus. Use succeededCount / failedCount / pendingCount for sizes and operationRecords(operationId:, filter: { status: }) for the ids, paginated. Scheduled for removal in the next API version. |
| `processed` | `Int!` | Number of items that have been processed so far. |
| `status` | [`OperationStatus!`](/api/v2/docs/types/operation-status) | Current processing status of the operation. |
| `succeededCount` | `Int!` | Number of items that completed successfully. Exact — unlike the deprecated id lists, counts never grow with operation size. |
| `succeededItemIds` | `[ID!]!` | IDs of items that completed successfully. Complete but unbounded — prefer operationRecords(operationId:, filter: { status: SUCCEEDED }), which returns the same population paginated. **Deprecated** — Unbounded payload — returns one id per operation record, and a UI select-all operation can hold a workspace's entire item corpus. Use succeededCount / failedCount / pendingCount for sizes and operationRecords(operationId:, filter: { status: }) for the ids, paginated. Scheduled for removal in the next API version. |
| `total` | `Int!` | Total number of items to process in this operation. |
