---
type: api
title: Get single agent configuration
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-getsingleagentconfiguration
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-getsingleagentconfiguration
products:
  - Kibana
---

# Get single agent configuration

Authentication: required

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/apm/settings/agent-configuration/view`
- `GET` `/s/{space_id}/api/apm/settings/agent-configuration/view`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Query string parameters

- `name` (string) — optional
  Service name
  Example: `node`
- `environment` (string) — optional
  Service environment
  Example: `prod`

## Header parameters

- `elastic-api-version` (enum · default: 2023-10-31) — required
  The version of the API to use
  Values: `2023-10-31`

## Responses

#### `200`

Successful response

`application/json`

- `id` (string)
- `@timestamp` (number)
  Timestamp
- `agent_name` (string)
  Agent name
- `applied_by_agent` (boolean)
  Applied by agent
- `etag` (string)
  Etag
- `service` (object)
  Service
  - `environment` (string)
    Environment
  - `name` (string)
    Name
- `settings` (map string to string)
  Agent configuration settings
#### `400`

Bad Request response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `401`

Unauthorized response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `404`

Not found response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
## Code examples

#### Console

```console
GET kbn:/api/apm/settings/agent-configuration/view
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/apm/settings/agent-configuration/view" \
  -H "elastic-api-version: 2023-10-31" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "id": "string",
  "@timestamp": 1730194190636,
  "agent_name": "string",
  "applied_by_agent": true,
  "etag": "0bc3b5ebf18fba8163fe4c96f491e3767a358f85",
  "service": {
    "environment": "prod",
    "name": "node"
  },
  "settings": {
    "key": "string"
  }
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "Not Found",
  "message": "Not Found",
  "statusCode": 400
}
```

#### 401

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "Unauthorized",
  "message": "string",
  "statusCode": 401
}
```

#### 404

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "Not Found",
  "message": "Not Found",
  "statusCode": 404
}
```

