---
type: api
title: Get full agent policy by ID
description: Get full agent policy by ID
url: https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-agent-policy-full
resource: https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-agent-policy-full
products:
  - Kibana
---

# Get full agent policy by ID

Authentication: required

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

## Paths

- `GET` `/api/fleet/agent_policies/{agentPolicyId}/full`
- `GET` `/s/{space_id}/api/fleet/agent_policies/{agentPolicyId}/full`

#### 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.
- `agentPolicyId` (string) — required

## Query string parameters

- `download` (string) — optional
- `standalone` (string) — optional
- `kubernetes` (string) — optional

## Responses

#### `200`

OK

`application/json`

- `item` (union oneOf)
  - **string**
  - **Agent policy full response**
    One of:
    - **object**
      - `item` (string)
    - **object**
      - `item` (object)
        - `agent` (string) — nullable
        - `fleet` (union oneOf)
          - **{ hosts, proxy_headers, proxy_url, … }**
            - `hosts` (string[])
            - `proxy_headers` (object)
            - `proxy_url` (string)
            - `ssl` (object)
              - `certificate` (string)
              - `certificate_authorities` (string[])
              - `key` (string)
              - `renegotiation` (string)
              - `verification_mode` (string)
          - **{ kibana }**
            - `kibana` (object)
              - `hosts` (string[])
              - `path` (string)
              - `protocol` (string)
        - `id` (string)
        - `inputs` (string)
        - `monitoring` (object)
          - `diagnostics` (object)
            - `limit` (object)
              - `burst` (number)
              - `interval` (string)
            - `uploader` (object)
              - `init_dur` (string)
              - `max_dur` (string)
              - `max_retries` (number)
          - `enabled` (boolean)
          - `http` (object)
            - `enabled` (boolean)
            - `host` (string)
            - `port` (number)
          - `logs` (boolean)
          - `metrics` (boolean)
          - `namespace` (string)
          - `pprof` (object)
            - `enabled` (boolean)
          - `traces` (boolean)
          - `use_output` (string)
        - `output_permissions` (map string to object)
          Map values (object)
          - `data` (map string to object)
            Map values (object)
            - `data` (object)
              - `cluster` (string[])
              - `indices` (object[])
                - `names` (string[])
                - `privileges` (string[])
            - `packagePolicyName` (string)
          - `output` (integer)
        - `outputs` (map string to object)
          Map values (object)
          - `additionalProperties` (object)
            - `text` (object)
          - `ca_sha256` (string) — nullable
          - `hosts` (string[])
          - `proxy_headers` (object)
          - `proxy_url` (string)
          - `type` (object)
        - `revision` (number)
        - `secret_references` (object[])
          - `id` (string)
#### `400`

Generic Error

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
GET kbn:/api/fleet/agent_policies/AGENT_POLICY_ID/full
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/fleet/agent_policies/${AGENT_POLICY_ID}/full" \
  -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
{
  "item": "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": "string",
  "message": "string",
  "statusCode": 0
}
```

