All URIs are relative to http://localhost/v1.41
Method | HTTP request | Description |
---|---|---|
swarmInit | POST /swarm/init | Initialize a new swarm |
swarmInspect | GET /swarm | Inspect swarm |
swarmJoin | POST /swarm/join | Join an existing swarm |
swarmLeave | POST /swarm/leave | Leave a swarm |
swarmUnlock | POST /swarm/unlock | Unlock a locked manager |
swarmUnlockkey | GET /swarm/unlockkey | Get the unlock key |
swarmUpdate | POST /swarm/update | Update a swarm |
'String' swarmInit(body)
Initialize a new swarm
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var body = new DockerEngineApi.Body1(); // Body1 |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.swarmInit(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Body1 |
'String'
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json, text/plain
Swarm swarmInspect()
Inspect swarm
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.swarmInspect(callback);
This endpoint does not need any parameter.
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json, text/plain
swarmJoin(body)
Join an existing swarm
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var body = new DockerEngineApi.Body2(); // Body2 |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.swarmJoin(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Body2 |
null (empty response body)
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json, text/plain
swarmLeave(opts)
Leave a swarm
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var opts = {
'force': false // Boolean | Force leave swarm, even if this is the last manager or that it will break the cluster.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.swarmLeave(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
force | Boolean | Force leave swarm, even if this is the last manager or that it will break the cluster. | [optional] [default to false] |
null (empty response body)
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json, text/plain
swarmUnlock(body)
Unlock a locked manager
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var body = new DockerEngineApi.Body3(); // Body3 |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.swarmUnlock(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Body3 |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
UnlockKeyResponse swarmUnlockkey()
Get the unlock key
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.swarmUnlockkey(callback);
This endpoint does not need any parameter.
No authorization required
- Content-Type: application/json
- Accept: application/json, text/plain
swarmUpdate(body, version, opts)
Update a swarm
var DockerEngineApi = require('docker_engine_api');
var apiInstance = new DockerEngineApi.SwarmApi();
var body = new DockerEngineApi.SwarmSpec(); // SwarmSpec |
var version = 789; // Number | The version number of the swarm object being updated. This is required to avoid conflicting writes.
var opts = {
'rotateWorkerToken': false, // Boolean | Rotate the worker join token.
'rotateManagerToken': false, // Boolean | Rotate the manager join token.
'rotateManagerUnlockKey': false // Boolean | Rotate the manager unlock key.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.swarmUpdate(body, version, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | SwarmSpec | ||
version | Number | The version number of the swarm object being updated. This is required to avoid conflicting writes. | |
rotateWorkerToken | Boolean | Rotate the worker join token. | [optional] [default to false] |
rotateManagerToken | Boolean | Rotate the manager join token. | [optional] [default to false] |
rotateManagerUnlockKey | Boolean | Rotate the manager unlock key. | [optional] [default to false] |
null (empty response body)
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json, text/plain