POST
/volumes/prune Connection and access
API connection and authentication guidance
/v1.57
No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.
Parameters
filters
query
Filters to process on the prune list, encoded as JSON (a map[string][]string).
Available filters:
label(label=<key>,label=<key>=<value>,label!=<key>, orlabel!=<key>=<value>) Prune volumes with (or without, in caselabel!=...is used) the specified labels.all(all=true) - Consider all (local) volumes for pruning and not just anonymous volumes.
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Response
200
No error
application/json
Type:
object
SpaceReclaimed
Type:
integer
Disk space reclaimed in bytes
All schema constraints and annotations
{
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
}VolumesDeleted
Type:
array
Volumes that were deleted
Array item
Type:
string
All schema constraints and annotations
{
"type": "string"
}All schema constraints and annotations
{
"description": "Volumes that were deleted",
"items": {
"type": "string"
},
"type": "array"
}All schema constraints and annotations
{
"properties": {
"SpaceReclaimed": {
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
},
"VolumesDeleted": {
"description": "Volumes that were deleted",
"items": {
"type": "string"
},
"type": "array"
}
},
"title": "VolumePruneResponse",
"type": "object"
}Response
500
Server error
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Referenced schemas
#/components/schemas/ErrorResponse
Complete operation contract
{
"operationId": "VolumePrune",
"parameters": [
{
"description": "Filters to process on the prune list, encoded as JSON (a `map[string][]string`).\n\nAvailable filters:\n- `label` (`label=\u003ckey\u003e`, `label=\u003ckey\u003e=\u003cvalue\u003e`, `label!=\u003ckey\u003e`, or `label!=\u003ckey\u003e=\u003cvalue\u003e`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.\n- `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes.\n",
"in": "query",
"name": "filters",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"SpaceReclaimed": {
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
},
"VolumesDeleted": {
"description": "Volumes that were deleted",
"items": {
"type": "string"
},
"type": "array"
}
},
"title": "VolumePruneResponse",
"type": "object"
}
}
},
"description": "No error"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Server error"
}
},
"summary": "Delete unused volumes",
"tags": [
"Volume"
]
}