Docker Swarm API

Engines can be clustered together in a swarm. Refer to the [swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 7

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /swarm Inspect the swarm · Inspect swarm #
Ask an LLM
“Is my swarm initialized and what are its settings?”
“What is the current swarm configuration?”
Tell an agent
Inspect the swarm.
Show the swarm configuration.
POST /swarm/init Initialize a new swarm · Initialize a new swarm #
Ask an LLM
“How do I turn a single Docker engine into a swarm cluster?”
“Can I force a new swarm even if one already exists?”
Tell an agent
Initialize a new swarm with spec {spec}.
Create a swarm on listen address {listen_addr} with advertise address {advertise_addr}.
POST /swarm/join Join an existing swarm · Join an existing swarm #
Ask an LLM
“How do I add a worker node to an existing swarm?”
“What do I need to join a swarm, a token and manager addresses?”
Tell an agent
Join swarm {remote_addrs} with join token {join_token}.
Add this node to the swarm using token {join_token}.
POST /swarm/leave Leave the swarm · Leave a swarm #
Ask an LLM
“How do I remove a node from a swarm?”
“Can I force a swarm node to leave even if it's the last manager?”
Tell an agent destructive · confirm first
Leave the swarm.
Force this node to leave the swarm with force {force}.
POST /swarm/update Update the swarm configuration · Update a swarm #
Ask an LLM
“How do I change the swarm's orchestration or Raft settings?”
“Can I rotate the worker or manager join tokens?”
Tell an agent
Update the swarm with orchestration settings {orchestration}.
Rotate the worker join token and manager join token.
GET /swarm/unlockkey Get the swarm unlock key · Get the unlock key #
Ask an LLM
“What is the unlock key for a locked swarm manager?”
“Can I retrieve the swarm unlock key to unlock a manager?”
Tell an agent
Get the swarm unlock key.
Show the swarm's unlock key.
POST /swarm/unlock Unlock a locked swarm manager · Unlock a locked manager #
Ask an LLM
“How do I unlock a swarm manager that is locked?”
“Can I unlock a swarm with the unlock key?”
Tell an agent
Unlock the swarm with unlock key {unlock_key}.
Unlock this locked swarm manager.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/docker:docker-swarm-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

docker-swarm-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Docker Engine Swarm API
  version: '1.54'
  x-logo:
    url: https://docs.docker.com/assets/images/logo-docker-main.png
  description: The Engine API is an HTTP API served by Docker Engine.
servers:
- url: /v1.54
tags:


# --- truncated at 32 KB (34 KB total) ---
# Full source: https://artifacts.apis.io/docker/openapi/docker-swarm-api-openapi.yml