Cancel a repo's upload in progress
const url = 'https://example.com/v1/datasets/uploads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel';const options = {method: 'POST', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/datasets/uploads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \ --header 'X-API-Key: <X-API-Key>'Cancel, not delete (QUA-3009). The platform cannot stop the uploading
process on someone’s machine, so QDS ends the server’s side of the upload:
the SDK’s next transfer heartbeat is answered cancelled and it stops, a
fresh publication under that transfer is refused (from an SDK too old to
hear the answer too: it is stopped at its publication, QUA-3025), and the
upload attempt
is ended as user_cancelled with no retry, so its server-side worker (a
Hugging Face import, or verification and preparation of any upload) stops
on its next heartbeat and nothing can publish it. A publication still
landing is stopped at its registry row; one that already landed is
refused with 409 (“already published”), as is a repo with nothing left to
cancel. Staged bytes
are reclaimed by the usual retention; the entry stays in the feed as a
cancelled upload until dismissed.
A sub-resource of the feed, like dismiss, and a POST: nothing is deleted.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Query Parameters
Section titled “Query Parameters ”Act on this account (active)
Act on this account (active)
Responses
Section titled “ Responses ”Successful Response
Example generated
exampleInvalid or missing API key
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}