All URIs are relative to http://localhost/v1.41
Method | HTTP request | Description |
---|---|---|
volumeCreate | POST /volumes/create | Create a volume |
volumeDelete | DELETE /volumes/{name} | Remove a volume |
volumeInspect | GET /volumes/{name} | Inspect a volume |
volumeList | GET /volumes | List volumes |
volumePrune | POST /volumes/prune | Delete unused volumes |
Volume volumeCreate(volumeConfig)
Create a volume
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.VolumeApi();
var volumeConfig = new DockerEngineApi.VolumeConfig(); // VolumeConfig | Volume configuration
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.volumeCreate(volumeConfig, callback);
Name | Type | Description | Notes |
---|---|---|---|
volumeConfig | VolumeConfig | Volume configuration |
No authorization required
- Content-Type: application/json
- Accept: application/json
volumeDelete(name, opts)
Remove a volume
Instruct the driver to remove the volume.
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.VolumeApi();
var name = "name_example"; // String | Volume name or ID
var opts = {
'force': false // Boolean | Force the removal of the volume
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.volumeDelete(name, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
name | String | Volume name or ID | |
force | Boolean | Force the removal of the volume | [optional] [default to false] |
null (empty response body)
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json, text/plain
Volume volumeInspect(name)
Inspect a volume
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.VolumeApi();
var name = "name_example"; // String | Volume name or ID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.volumeInspect(name, callback);
Name | Type | Description | Notes |
---|---|---|---|
name | String | Volume name or ID |
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json
VolumeListResponse volumeList(opts)
List volumes
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.VolumeApi();
var opts = {
'filters': "filters_example" // String | 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.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.volumeList(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
filters | String | 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. |
[optional] |
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json
VolumePruneResponse volumePrune(opts)
Delete unused volumes
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.VolumeApi();
var opts = {
'filters': "filters_example" // String | Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.volumePrune(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
filters | String | Filters to process on the prune list, encoded as JSON (a map[string][]string ). Available filters: - label (label=<key> , label=<key>=<value> , label!=<key> , or label!=<key>=<value> ) Prune volumes with (or without, in case label!=... is used) the specified labels. |
[optional] |
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json