Search or ask Docker

List volumes

GET /volumes — Docker Engine API 1.57.

View Markdown
GET/volumes

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

JSON encoded value of the filters (a map[string][]string) to process on the volumes list. Available filters:

  • dangling=<boolean> When set to true (or 1), returns all volumes that are not in use by a container. When set to false (or 0), 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> or label=<key>:<value> Matches volumes based on the presence of a label alone or a label and a value.
  • name=<volume-name> Matches all or part of a volume name.

Type: string

All schema constraints and annotations
{
  "format": "json",
  "type": "string"
}

Request and responses

Response 200

Summary volume data that matches the query

application/json

Schema: VolumeListResponse

Response 500

Server error

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Referenced schemas

#/components/schemas/ErrorResponse

#/components/schemas/VolumeListResponse

Complete operation contract
{
  "operationId": "VolumeList",
  "parameters": [
    {
      "description": "JSON encoded value of the filters (a `map[string][]string`) to\nprocess on the volumes list. Available filters:\n\n- `dangling=\u003cboolean\u003e` When set to `true` (or `1`), returns all\n   volumes that are not in use by a container. When set to `false`\n   (or `0`), only volumes that are in use by one or more\n   containers are returned.\n- `driver=\u003cvolume-driver-name\u003e` Matches volumes based on their driver.\n- `label=\u003ckey\u003e` or `label=\u003ckey\u003e:\u003cvalue\u003e` Matches volumes based on\n   the presence of a `label` alone or a `label` and a value.\n- `name=\u003cvolume-name\u003e` Matches all or part of a volume name.\n",
      "in": "query",
      "name": "filters",
      "schema": {
        "format": "json",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/VolumeListResponse"
          }
        }
      },
      "description": "Summary volume data that matches the query"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Server error"
    }
  },
  "summary": "List volumes",
  "tags": [
    "Volume"
  ]
}