Endpoints
cancel_upload
Discard only uncommitted staging chunks. Completed saved versions are preserved.
Request
Authentication is required by the published contract.
curl -X POST 'https://api.ursy.cloud/v1/uploads/{upload_id}/cancel' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_SERVICE_TOKEN'- Scopes
- Not specified by this operation
- Execution
- At the owning service
- Risk classification
- not declared
Parameters
upload_id path · string requiredSee the accepted schema for constraints.
Idempotency-Key header · string requiredSee the accepted schema for constraints.
This operation is documented here. Use the owning service with the appropriate credentials and permissions to execute it.
Response schemas and request body
{
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false
}
}
}
},
"responses": {
"200": {
"description": "Typed operation result; request_id correlates the request.",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"properties": {
"upload": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^upl_[a-f0-9]{32}$"
},
"state": {
"type": "string",
"enum": [
"pending",
"completed",
"cancelled"
]
},
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"size": {
"type": "integer",
"minimum": 0
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"chunk_bytes": {
"const": 1048576
},
"chunk_count": {
"type": "integer",
"minimum": 0
},
"received_bytes": {
"type": "integer",
"minimum": 0
},
"next_chunk_index": {
"type": "integer",
"minimum": 0
},
"expires_at": {
"type": "string"
},
"file_id": {
"oneOf": [
{
"type": "string",
"pattern": "^file_[1-9][0-9]{0,14}$"
},
{
"type": "null"
}
]
},
"version_id": {
"oneOf": [
{
"type": "string",
"pattern": "^ver_[1-9][0-9]*$"
},
{
"type": "null"
}
]
},
"chunk_url_template": {
"type": "string"
},
"chunk_method": {
"type": "string",
"enum": [
"PUT"
]
},
"authorization": {
"type": "string"
}
},
"required": [
"id",
"state",
"name",
"mime",
"size",
"sha256",
"chunk_bytes",
"chunk_count",
"received_bytes",
"next_chunk_index",
"expires_at",
"file_id",
"version_id",
"chunk_url_template",
"chunk_method",
"authorization"
]
},
"request_id": {
"type": "string"
},
"replayed": {
"type": "boolean"
}
},
"required": [
"upload"
]
}
}
}
},
"default": {
"description": "Stable error envelope. 401 invalid/expired/revoked grant; 403 missing scope; 404 unavailable resource; 409 plan/idempotency conflict; 412 stale ETag; 413 size/quota; 429 rate limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}