# List nodes


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





`GET /nodes`



## Connection and access

[API connection and authentication guidance](/reference/api/engine/version/v1.57/#connection)


Server: `/v1.57`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
null
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --unix-socket "${DOCKER_SOCKET:-/var/run/docker.sock}" \
  --header 'Accept: application/json' \
  'http://localhost/v1.57/nodes'
```



## Parameters

### filters

Location: query. Required: no.

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`)`


```json
{
  "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",
  "pointer": "/paths/~1nodes/get/parameters/0",
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/json

no error


Schema:

```json
{
  "items": {
    "$ref": "#/components/schemas/Node"
  },
  "type": "array"
}
```










### Response 200 text/plain

no error


Schema:

```json
{
  "items": {
    "$ref": "#/components/schemas/Node"
  },
  "type": "array"
}
```










### Response 500 application/json

server error


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


### Response 503 application/json

node is not part of a swarm


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


## Complete operation contract

```json
{
  "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"
  ]
}
```

## Referenced schemas

- [#/components/schemas/ErrorResponse](/reference/api/engine/version/v1.57/schemas/ErrorResponse/)

- [#/components/schemas/Node](/reference/api/engine/version/v1.57/schemas/Node/)




