The http client for swarmkit
swarmkit-client -s /tmp/manager1/swarm.sock
# ls all nodes
curl -X GET https://localhost:8888/nodes
# inspect node and display task
curl -X GET https://localhost:8888/nodes/{nodeid:.*}?all=1
# accept node
curl -X POST https://localhost:8888/nodes/{nodeid:.*}/accept
# remove node
curl -X DELETE https://localhost:8888/nodes/{nodeid:.*}
# activate node
curl -X POST /nodes/{nodeid:.*}/activate
# create service
curl -X POST -d '{"name":"redis", "image":"redis:3.0.5"}' https://localhost:8888/services/create
# ls all running services
curl -X GET https://localhost:8888/services
# inspect service
curl -X GET https://localhost:8888/services/{serviceid:.*}
# update service
curl -X POST -d '{...}' https://localhost:8888/services/{serviceid:.*}/update
# delete service
curl -X DELETE https://localhost:8888/services/7zyp89z8zefrq96jga06vho5f
# list tasks
# GET /tasks?all=1&quiet=1
all:0 only display running
1 display all
default 0
curl -X GET https://localhost:8888/tasks?all=1&quiet=1
# inspect task
curl -X GET https://localhost:8888/tasks/{taskid:.*}
# remove task
curl -X DELETE https://localhost:8888//tasts/{taskid:.*}
# list networks
curl -X GET https://localhost:8888/networks
# inspect networks
curl -X GET https://localhost:8888/networks/{networkid:.*}
# create networks
curl -X POST -d '{...}' https://localhost:8888/networks/creat
# remove networks
curl -X DELETE https://localhost:8888/networks/{networkid:.*}
# list clusters
curl -X GET https://localhost:8888/clusters
# inspect cluster
curl -X GET https://localhost:8888/clusters/{clusterid:.*}
# update cluster
curl -X POST -d '{...}' https://localhost:8888/clusters/{clusterid:.*}/update