Volumes HTTP API
The /volume
endpoints are used to query for and interact with volumes.
List Volumes
This endpoint lists all volumes.
Method | Path | Produces |
---|---|---|
GET | /v1/volumes | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES | namespace:csi-list-volume |
Parameters
type
(string: "")
- Specifies the type of volume to query. Currently only supportscsi
. This is specified as a query string parameter. Returns an empty list if omitted.node_id
(string: "")
- Specifies a string to filter volumes based on an Node ID prefix. Because the value is decoded to bytes, the prefix must have an even number of hexadecimal characters (0-9a-f). This is specified as a query string parameter.plugin_id
(string: "")
- Specifies a string to filter volumes based on a plugin ID prefix. Because the value is decoded to bytes, the prefix must have an even number of hexadecimal characters (0-9a-f). This is specified as a query string parameter.
Sample Request
Sample Response
Read Volume
This endpoint reads information about a specific volume.
Method | Path | Produces |
---|---|---|
GET | /v1/volume/csi/:volume_id | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES | namespace:csi-read-volume |
Parameters
:volume_id
(string: <required>)
- Specifies the ID of the volume. This must be the full ID. This is specified as part of the path.
Sample Request
Sample Response
Register Volume
This endpoint registers an external volume with Nomad. It is an error to register an existing volume.
Method | Path | Produces |
---|---|---|
PUT | /v1/volume/csi/:volume_id | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | namespace:csi-write-volume |
Parameters
:volume_id
(string: <required>)
- Specifies the ID of the volume. This must be the full ID. This is specified as part of the path.
Sample Payload
The payload must include a JSON document that described the volume's parameters.
Sample Request
Delete Volume
This endpoint deregisters an external volume with Nomad. It is an error to deregister a volume that is in use.
Method | Path | Produces |
---|---|---|
DELTE | /v1/volume/csi/:volume_id | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | namespace:csi-write-volume |
Parameters
:volume_id
(string: <required>)
- Specifies the ID of the volume. This must be the full ID. This is specified as part of the path.
Sample Request