# getWorkflowStats

Performance summary for one workflow (by group id), lifetime, dry runs excluded: run counts by outcome (active/completed/paused/stopped/failed), messages sent, reply rate with its positive/negative split, bounce rate and last-run time. The headline "how is this automation doing" answer.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getWorkflowStats", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `workflowGroupId`: `ID!` (required)

## Response (data, an example)

```json
{
  "workflowAutomationsQuery": {
    "workflowGroup": {
      "id": "<ID>",
      "name": "…",
      "status": "DRAFT",
      "stats": {
        "totalRuns": 0,
        "lastRunAt": "2026-01-01T00:00:00.000Z",
        "activeRuns": 0,
        "completedRuns": 0,
        "pausedRuns": 0,
        "stoppedRuns": 0,
        "failedRuns": 0,
        "messagesSent": 0,
        "replyRate": 0,
        "bounceRate": 0,
        "positiveReplyRate": 0,
        "negativeReplyRate": 0,
        "runsThatSentMessageCount": 0,
        "runsWithResponseCount": 0
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getWorkflowStats",
    "variables": {
      "workflowGroupId": "<workflowGroupId>"
    }
  }'
```
