GET
/nodes 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
filters
query
Filters to process on the nodes list, encoded as JSON (a map[string][]string).
Available filters:
id=<node id>label=<engine label>membership=(accepted|pending)`name=<node name>node.label=<node label>role=(manager|worker)`
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Response
200
no error
application/json
Type:
array
Array item
Schema:
Node
All schema constraints and annotations
{
"items": {
"$ref": "#/components/schemas/Node"
},
"type": "array"
}Response
200
no error
text/plain
Type:
array
Array item
Schema:
Node
All schema constraints and annotations
{
"items": {
"$ref": "#/components/schemas/Node"
},
"type": "array"
}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": "NodeList",
"parameters": [
{
"description": "Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).\n\nAvailable filters:\n- `id=\u003cnode id\u003e`\n- `label=\u003cengine label\u003e`\n- `membership=`(`accepted`|`pending`)`\n- `name=\u003cnode name\u003e`\n- `node.label=\u003cnode label\u003e`\n- `role=`(`manager`|`worker`)`\n",
"in": "query",
"name": "filters",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/Node"
},
"type": "array"
}
},
"text/plain": {
"schema": {
"items": {
"$ref": "#/components/schemas/Node"
},
"type": "array"
}
}
},
"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": "List nodes",
"tags": [
"Node"
]
}