Cancel a pending or running Dream.
POST /api/v1/cloud/dreams/{id}/cancel
Cancels the specified Dream. Only Dreams with status pending or running can be canceled. Calling cancel on an already-canceled Dream is idempotent. Returns the updated Dream object.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or SAT> |
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Dream ID (drm_ prefix) |
Example request
Example response
HTTP 200 OK
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Dream is in completed or failed (terminal state, cannot cancel). canceled is idempotent and returns 200 |
| 401 | authentication_error | Missing or invalid authentication token |
| 404 | not_found_error | Dream does not exist |