Cancel blob upload
/v2/{name}/blobs/uploads/{uuid} Cancel an in-progress blob upload session.
This operation discards any data that has been uploaded and invalidates the upload session.
Use this when:
- An upload fails or is aborted mid-process
- The client wants to clean up unused upload sessions
After cancellation, the UUID is no longer valid and a new POST must be issued to restart the upload.
Connection and access
API connection and authentication guidance
https://registry-1.docker.io
—
Docker Hub registry API
Use one of these alternatives. Requirements within an alternative apply together.
registryToken
Parameters
name
path
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}uuid
path
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Response
204
No response content is declared.
Headers
Content-LengthAlways zero
{
"description": "Always zero",
"example": 0,
"schema": {
"type": "integer"
}
}Response
401
No response content is declared.
Response
403
No response content is declared.
Response
404
No response content is declared.
Response
429
No response content is declared.
Referenced schemas
Complete operation contract
{
"description": "Cancel an in-progress blob upload session.\n\nThis operation discards any data that has been uploaded and invalidates the upload session.\n\nUse this when:\n- An upload fails or is aborted mid-process\n- The client wants to clean up unused upload sessions\n\nAfter cancellation, the UUID is no longer valid and a new `POST` must be issued to restart the upload.\n",
"operationId": "CancelBlobUpload",
"parameters": [
{
"description": "Name of the repository",
"example": "library/ubuntu",
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Upload session UUID",
"example": "abc123",
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Upload session cancelled successfully. No body is returned.",
"headers": {
"Content-Length": {
"description": "Always zero",
"example": 0,
"schema": {
"type": "integer"
}
}
}
},
"401": {
"description": "Authentication required"
},
"403": {
"description": "Access denied"
},
"404": {
"description": "Upload session not found"
},
"429": {
"description": "Too many requests"
}
},
"summary": "Cancel blob upload",
"tags": [
"Blobs"
],
"x-codeSamples": [
{
"label": "cURL",
"lang": "Bash",
"source": "# DELETE – cancel an upload session\ncurl -X DELETE \\\n -H \"Authorization: Bearer $TOKEN\" \\\n https://registry-1.docker.io/v2/library/ubuntu/blobs/uploads/abc123`\n"
}
]
}