List volumes Run in API Explorer
Query parameters
-
JSON encoded value of the filters (a
map[string][]string
) to process on the volumes list. Available filters:dangling=<boolean>
When set totrue
(or1
), returns all volumes that are not in use by a container. When set tofalse
(or0
), only volumes that are in use by one or more containers are returned.driver=<volume-driver-name>
Matches volumes based on their driver.label=<key>
orlabel=<key>:<value>
Matches volumes based on the presence of alabel
alone or alabel
and a value.name=<volume-name>
Matches all or part of a volume name.
GET
/volumes
curl \
--request GET 'http://api.example.com/v1.49/volumes'
Response examples (200)
{
"Volumes": [
{
"Name": "tardis",
"Driver": "custom",
"Mountpoint": "/var/lib/docker/volumes/tardis",
"CreatedAt": "2016-06-07T20:31:11.853781916Z",
"Status": {
"hello": "world"
},
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Scope": "local",
"ClusterVolume": {
"ID": "string",
"Version": {
"Index": 373531
},
"CreatedAt": "string",
"UpdatedAt": "string",
"Spec": {
"Group": "string",
"AccessMode": {
"Scope": "single",
"Sharing": "none",
"MountVolume": {},
"Secrets": [
{
"Key": "string",
"Secret": "string"
}
],
"AccessibilityRequirements": {
"Requisite": [
{
"additionalProperty1": "string",
"additionalProperty2": "string"
}
],
"Preferred": [
{
"additionalProperty1": "string",
"additionalProperty2": "string"
}
]
},
"CapacityRange": {
"RequiredBytes": 42,
"LimitBytes": 42
},
"Availability": "active"
}
},
"Info": {
"CapacityBytes": 42,
"VolumeContext": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"VolumeID": "string",
"AccessibleTopology": [
{
"additionalProperty1": "string",
"additionalProperty2": "string"
}
]
},
"PublishStatus": [
{
"NodeID": "string",
"State": "pending-publish",
"PublishContext": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
}
]
},
"Options": {
"o": "size=100m,uid=1000",
"type": "tmpfs",
"device": "tmpfs"
},
"UsageData": {
"Size": -1,
"RefCount": -1
}
}
],
"Warnings": [
"string"
]
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}