# stopWorkflowRun

Permanently stop one run: PENDING, RUNNING or PAUSED (terminal: a stopped run cannot be resumed). A no-op on a run already STOPPED; an error on one that already COMPLETED, FAILED or was NOT_ENROLLED.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "stopWorkflowRun", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

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

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "stopWorkflowRun": {
      "id": "<ID>",
      "status": "PENDING"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "stopWorkflowRun",
    "variables": {
      "workflowAutomationRunId": "<workflowAutomationRunId>"
    }
  }'
```
