# list operations with filters

`POST https://api.suger.cloud/org/{orgId}/v2/operation/list`

List or search workflow operations with filter expressions.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |

## Request Body

Required.

Content-Type: `application/json` · Schema: `ListOperationsV2Request`

**`ListOperationsV2Request`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filter` | OperationFilter | no |  |
| `limit` | integer | no | Limit the number of results returned (1-100), default 100 |
| `offsetToken` | string | no | OffsetToken for pagination, use nextOffsetToken from previous response |

**`OperationFilter`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `args` | array<OperationFilter> | no | Args for logical operators (and, or) |
| `field` | TemporalWorkflowAttr | no |  |
| `operator` | string | no | Operator: "=", "!=", "in", "not_in", "and", "or" |
| `value` | object | no | Value for single value operators (=, !=, etc) |
| `values` | array<object> | no | Values for array operators (in, not_in) |

## Responses

### 200 — OK

Content-Type: `application/json` · Schema: `ListOperationsResponse`

**`ListOperationsResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `offsetToken` | string | no |  |
| `operations` | array<Operation> | no |  |

**`Operation`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `childCompleted` | integer | no |  |
| `childFailed` | integer | no | ChildFailed sums Failed + Terminated + TimedOut + Canceled. |
| `childOffsetToken` | string | no | Pagination token for the next page of ChildWorkflowOperations. Empty string means no more pages. Pass back as `childOffsetToken` query param. |
| `childTotal` | integer | no | Aggregate child counts from the visibility index. Populated alongside ChildWorkflowOperations when the parent is a batch workflow. Use these for total/success/failure stats rather than len(ChildWorkflowOperations). `omitempty` is intentionally omitted: callers distinguish "BE populated these" from "fall back" by field presence, so zero must round-trip. |
| `childWorkflowOperations` | array<Operation> | no | Only populated if it has child workflows. Otherwise it is nil. May be a truncated page; ChildTotal/ChildCompleted/ChildFailed reflect the full aggregate from Temporal's visibility index. |
| `endTime` | string | no |  |
| `id` | string | no | Operation ID. |
| `memo` | object | no |  |
| `message` | string | no |  |
| `name` | string | no |  |
| `runId` | string | no | Run ID. |
| `startTime` | string | no |  |
| `status` | string | no |  |
| `type` | OperationType | no |  |

### 400 — Bad request error

Content-Type: `application/json`

### 500 — Internal server error

Content-Type: `application/json`

---

Interactive API reference: https://doc.suger.io/api/
