remagicaDocs home
API referenceWorkflows

Cancel a result

POST
/workflows/{workflowId}/results/{resultId}/cancel

Needs a key withworkflows:cancel

Stops one result still being made (pending or processing). Its provider is asked where it is now: one not yet rendering is cancelled there and ends as an error saying it was cancelled, and its credits come back (nothing it may still deliver is kept). One already rendering where the provider can't stop it is kept instead (stop: kept): it finishes, is charged, and says so. POST …/results/stop-preview says which first.

Requires scope workflows:cancel.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Path Parameters

workflowId*string
Length1 <= length <= 128
resultId*string
Length1 <= length <= 128

Response Body

Whether it was still open (and is now cancelled).

application/json
  1. response
cancelled*boolean
Example Request
curl -X POST 'https://api.remagica.com/api/v1/workflows/cb35dcdb-5b3d-4f60-8e2a-1d9c6b4f7e05/results/750ab75b-5b3d-4f60-8e2a-1d9c6b4f7e05/cancel'
Example Response
{  "cancelled": true}