# Get Operation Details

`GET https://api.suger.cloud/org/{orgId}/v2/operation/{operationId}`

Get the details of a Temporal workflow operation by operation ID. Optionally include child workflow data.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |
| `operationId` | path | string | yes | Temporal Workflow ID |
| `runId` | query | string | no | Temporal run ID of the workflow |
| `hasChildren` | query | boolean | no | Include data aggregated from all child workflows (1 level), default false |

## Responses

### 200 — OK

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

**`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.fours.com/settings/oauth-app/)._

### Request

```bash
curl -X GET 'https://api.suger.cloud/org/{orgId}/v2/operation/{operationId}' \
  -H "Authorization: Bearer $SUGER_TOKEN"
```

### Response — 200

```json
{
  "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"
```

---

API reference: https://doc.fours.com/api/
