# 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). |
| `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`

## Example

_Generated from this operation's schema. Values are placeholders — substitute your own ids, and set `SUGER_TOKEN` to a bearer token from the [OAuth client-credentials exchange](https://doc.suger.io/get-started/oauth-app/)._

### Request

```bash
curl -X POST 'https://api.suger.cloud/org/{orgId}/v2/operation/list' \
  -H 'Authorization: Bearer $SUGER_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "filter": {
    "args": [
      "<OperationFilter>"
    ],
    "field": "SugerOrgId",
    "operator": "string",
    "values": []
  },
  "limit": 1,
  "offsetToken": "string"
}'
```

### Response — 200

```json
{
  "offsetToken": "string",
  "operations": [
    {
      "childCompleted": 1,
      "childFailed": 1,
      "childOffsetToken": "string",
      "childTotal": 1,
      "childWorkflowOperations": [
        "<Operation>"
      ],
      "endTime": "2026-01-31T12:00:00Z",
      "id": "01H0000000000000000000",
      "memo": {},
      "message": "string",
      "name": "Acme Corp",
      "runId": "01H0000000000000000000",
      "startTime": "2026-01-31T12:00:00Z"
    }
  ]
}
```

### Error — 400

```json
"string"
```

---

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