Skip to content

Cancel a repo's upload in progress

POST
/v1/datasets/uploads/{repo_id}/cancel
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.

repo_id
required
string format: uuid
account_id

Act on this account (active)

string | null format: uuid

Act on this account (active)

Successful Response

Media type application/json
Example generated
example

Invalid or missing API key

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationError
object
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}