# List services


[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 /services`



## 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/services'
```



## Parameters

### filters

Location: query. Required: no.

A JSON encoded value of the filters (a `map[string][]string`) to
process on the services list.

Available filters:

- `id=<service id>`
- `label=<service label>`
- `mode=["replicated"|"global"]`
- `name=<service name>`


```json
{
  "description": "A JSON encoded value of the filters (a `map[string][]string`) to\nprocess on the services list.\n\nAvailable filters:\n\n- `id=\u003cservice id\u003e`\n- `label=\u003cservice label\u003e`\n- `mode=[\"replicated\"|\"global\"]`\n- `name=\u003cservice name\u003e`\n",
  "in": "query",
  "name": "filters",
  "pointer": "/paths/~1services/get/parameters/0",
  "schema": {
    "type": "string"
  }
}
```

### status

Location: query. Required: no.

Include service status, with count of running and desired tasks.


```json
{
  "description": "Include service status, with count of running and desired tasks.\n",
  "in": "query",
  "name": "status",
  "pointer": "/paths/~1services/get/parameters/1",
  "schema": {
    "type": "boolean"
  }
}
```

## Request and responses

### Response 200 application/json

no error


Schema:

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










### Response 200 text/plain

no error


Schema:

```json
{
  "items": {
    "$ref": "#/components/schemas/Service"
  },
  "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": "ServiceList",
  "parameters": [
    {
      "description": "A JSON encoded value of the filters (a `map[string][]string`) to\nprocess on the services list.\n\nAvailable filters:\n\n- `id=\u003cservice id\u003e`\n- `label=\u003cservice label\u003e`\n- `mode=[\"replicated\"|\"global\"]`\n- `name=\u003cservice name\u003e`\n",
      "in": "query",
      "name": "filters",
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Include service status, with count of running and desired tasks.\n",
      "in": "query",
      "name": "status",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/Service"
            },
            "type": "array"
          }
        },
        "text/plain": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/Service"
            },
            "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 services",
  "tags": [
    "Service"
  ]
}
```

## Referenced schemas

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

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




