Cancel an operation
cancelOperation
POST /api/v1/operations/{id}/cancel
files.write files.move files.delete files.overwriteRate cost: 2Ask an operation to stop
One held for an approver is withdrawn at once, nothing changed (its approval then says withdrawn). A queued one is cancelled at once; a running one stops at its next item, and the copy it had made so far is removed (a move’s original is untouched). Answers 204 either way: poll the operation to see it end (409 operation-cancelled). An operation that has already finished cannot be cancelled (409 operation-finished); a copy whose last item is done as the cancel arrives succeeds, and so does a move already removing its originals (phase deleting): stopping it then would leave the item split between two places.
Any one of these scopes is enough; which applies depends on the kind of operation being read.
Request
Section titled “Request”curl -X POST "$FOLDR/api/v1/operations/$ID/cancel" \ -H "Authorization: Bearer $TOKEN"$FOLDR is your site’s address (for example https://files.example.com) and $TOKEN is an access token. See Getting access.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The operation’s id. |
Responses
Section titled “Responses”| Status | Meaning | Body |
|---|---|---|
| 204 | Cancelled, or asked to stop. | none |
Errors
Section titled “Errors”Every error is an application/problem+json document (ProblemDetails); branch on its type or code. See Errors.
| Status | Problem types | When |
|---|---|---|
| 400 | invalid-request | Invalid request (invalid-request). |
| 401 | invalid-token | Invalid token (invalid-token). |
| 403 | insufficient-scope | Insufficient scope (insufficient-scope). |
| 404 | not-found | Not found (not-found). |
| 409 | operation-finished | Operation finished (operation-finished). |
| 429 | rate-limited | Too many requests (rate-limited). |
| 500 | internal-error | Internal error (internal-error). |