Search or ask Docker

Get the unlock key

GET /swarm/unlockkey — Docker Engine API 1.57.

View Markdown
GET/swarm/unlockkey

Connection and access

API connection and authentication guidance

/v1.57

No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.

Parameters

No parameters are declared.

Request and responses

Response 200

no error

application/json

Type: object

UnlockKey

Type: string

The swarm's unlock key.
All schema constraints and annotations
{
  "description": "The swarm's unlock key.",
  "type": "string"
}
All schema constraints and annotations
{
  "example": {
    "UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  },
  "properties": {
    "UnlockKey": {
      "description": "The swarm's unlock key.",
      "type": "string"
    }
  },
  "title": "UnlockKeyResponse",
  "type": "object"
}

Schema example

{
  "UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
}

Response 200

no error

text/plain

Type: object

UnlockKey

Type: string

The swarm's unlock key.
All schema constraints and annotations
{
  "description": "The swarm's unlock key.",
  "type": "string"
}
All schema constraints and annotations
{
  "example": {
    "UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  },
  "properties": {
    "UnlockKey": {
      "description": "The swarm's unlock key.",
      "type": "string"
    }
  },
  "title": "UnlockKeyResponse",
  "type": "object"
}

Schema example

{
  "UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
}

Response 500

server error

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Response 503

node is not part of a swarm

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Referenced schemas

#/components/schemas/ErrorResponse

Complete operation contract
{
  "operationId": "SwarmUnlockkey",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "example": {
              "UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
            },
            "properties": {
              "UnlockKey": {
                "description": "The swarm's unlock key.",
                "type": "string"
              }
            },
            "title": "UnlockKeyResponse",
            "type": "object"
          }
        },
        "text/plain": {
          "schema": {
            "example": {
              "UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
            },
            "properties": {
              "UnlockKey": {
                "description": "The swarm's unlock key.",
                "type": "string"
              }
            },
            "title": "UnlockKeyResponse",
            "type": "object"
          }
        }
      },
      "description": "no error"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "server error"
    },
    "503": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "node is not part of a swarm"
    }
  },
  "summary": "Get the unlock key",
  "tags": [
    "Swarm"
  ],
  "x-consumes": [
    "application/json"
  ]
}