---
title: "Get a package policy"
method: GET
path: "/api/fleet/package_policies/{packagePolicyId}"
tags: ["Fleet package policies"]
---

# Get a package policy

`GET /api/fleet/package_policies/{packagePolicyId}`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/package_policies/{packagePolicyId}</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get a package policy by ID.

## Path parameters

- `packagePolicyId` string, required

## Query parameters

- `format` 'simplified' | 'legacy'

## Response `200`

Successful response

- object
  - `item` KibanaHTTPAPIsPackagePolicyResponse, required
    - `additional_datastreams_permissions` string[], nullable — Additional data stream permissions that will be added to the agent policy.
    - `agents` number
    - `cloud_connector_id` string, nullable — ID of the cloud connector associated with this package policy.
    - `cloud_connector_name` string, nullable — Transient field for cloud connector name during creation.
    - `condition` string, nullable — Agent condition expression to evaluate whether to apply this integration to its inputs.
    - `created_at` string, required
    - `created_by` string, required
    - `description` string — Package policy description
    - `elasticsearch` object
      - `privileges` object
        - `cluster` string[]
    - `enabled` boolean, required
    - `global_data_tags` object[], nullable
      - `name` string, required — The name of the custom field. Cannot contain spaces.
      - `value` union, required — The value of the custom field.
        - string
        - number
    - `id` string, required — Package policy unique identifier.
    - `inputs` union, required — Package policy inputs.
      - object[]
        - `compiled_input` unknown, required
        - `condition` string, nullable — Agent condition expression to evaluate whether to apply this input.
        - `config` object — Package variable (see integration documentation for more information)
        - `deprecated` KibanaHTTPAPIsPackagePolicyInputDeprecationInfo
          - `description` string, required
          - `replaced_by` object
          - `since` string
        - `enabled` boolean, required
        - `id` string
        - `keep_enabled` boolean
        - `migrate_from` string
        - `name` string
        - `policy_template` string
        - `streams` object[], required
          - `compiled_stream` unknown, required
          - `condition` string, nullable — Agent condition expression to evaluate whether to apply this stream.
          - `config` object — Package variable (see integration documentation for more information)
          - `data_stream` object, required
            - `dataset` string, required
            - `elasticsearch` object
              - …
            - `type` string
          - `deprecated` KibanaHTTPAPIsPackagePolicyStreamDeprecationInfo
            - `description` string, required
            - `replaced_by` object
            - `since` string
          - `enabled` boolean, required
          - `id` string
          - `keep_enabled` boolean
          - `migrate_from` string
          - `release` 'ga' | 'beta' | 'experimental'
          - `var_group_selections` object — Variable group selections. Maps var_group name to the selected option name within that group.
          - `vars` object — Package variable (see integration documentation for more information)
        - `type` string, required
        - `var_group_selections` object — Variable group selections. Maps var_group name to the selected option name within that group.
        - `vars` object — Package variable (see integration documentation for more information)
      - object — Package policy inputs. Refer to the integration documentation to know which inputs are available.
    - `is_managed` boolean
    - `name` string, required — Unique name for the package policy.
    - `namespace` string — The package policy namespace. Leave blank to inherit the agent policy's namespace.
    - `output_id` string, nullable
    - `overrides` object, nullable — Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.
      - `inputs` object
    - `package` KibanaHTTPAPIsPackagePolicyPackage
      - `experimental_data_stream_features` object[]
        - `data_stream` string, required
        - `features` object, required
          - `doc_value_only_numeric` boolean
          - `doc_value_only_other` boolean
          - `synthetic_source` boolean
          - `tsdb` boolean
      - `fips_compatible` boolean
      - `name` string, required — Package name
      - `requires_root` boolean
      - `title` string
      - `version` string, required — Package version
    - `package_agent_version_condition` string
    - `policy_id` string, nullable — ID of the agent policy which the package policy will be added to.
    - `policy_ids` string[]
    - `revision` number, required — Package policy revision.
    - `secret_references` object[]
      - `id` string, required
    - `spaceIds` string[]
    - `supports_agentless` boolean, nullable — Indicates whether the package policy belongs to an agentless agent policy.
    - `supports_cloud_connector` boolean, nullable — Indicates whether the package policy supports cloud connectors.
    - `updated_at` string, required
    - `updated_by` string, required
    - `var_group_selections` object — Variable group selections. Maps var_group name to the selected option name within that group.
    - `vars` union — Package level variable.
      - object — Package variable (see integration documentation for more information)
      - object — Input/stream level variable. Refer to the integration documentation for more information.
    - `version` string — Package policy ES version.

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
