---
type: api
title: Install a package from the registry
description: Install a specific version of a package from the Elastic Package Registry.<br/><br/>[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-post-fleet-epm-packages-pkgname-pkgversion
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-post-fleet-epm-packages-pkgname-pkgversion
products:
  - Kibana
---

# Install a package from the registry

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

## Paths

- `POST` `/api/fleet/epm/packages/{pkgName}/{pkgVersion}`
- `POST` `/api/fleet/epm/packages/{pkgName}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#basicauth)

#### Path Parameters

- `pkgName` (string)
  Package name
- `pkgVersion` (string) — optional, leave it out to use `/api/fleet/epm/packages/{pkgName}`
  Package version

## Description

Install a specific version of a package from the Elastic Package Registry.<br/><br/>[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.

## Query String Parameters

- `prerelease` (boolean)
  When true, allow installing prerelease versions
- `ignoreMappingUpdateErrors` (boolean · default: false)
  When true, ignore mapping update errors during installation
- `skipDataStreamRollover` (boolean · default: false)
  When true, skip data stream rollover after installation
- `skipDependencyCheck` (boolean · default: false)
  Skip dependency validation when installing a package with dependencies

## Request Body

`application/json`

- `allow_outdated_version` (boolean · default: false) — optional
  When true, allow installing a version older than the latest available. Bypasses only the out-of-date version check.
- `force` (boolean · default: false) — optional
- `ignore_constraints` (boolean · default: false) — optional

## Responses

#### `200`

Successful response

`application/json`

- `_meta` (object)
  - `install_source` (string)
  - `name` (string)
- `items` ([] union anyOf · max: 10000)
  - **Kibana_HTTP_APIs_kibana_asset_reference**
    - `deferred` (boolean)
    - `id` (string)
    - `originId` (string)
    - `type` (union enum | string)
      Values: `dashboard`, `lens`, `visualization`, `search`, `index-pattern`, `map`, `ml-module`, `security-rule`, `csp-rule-template`, `osquery-pack-asset`, `osquery-saved-query`, `tag`
  - **Kibana_HTTP_APIs_es_asset_reference**
    - `customDataStreamOriginDataset` (string)
    - `customDataStreamOriginType` (string)
    - `deferred` (boolean)
    - `id` (string)
    - `type` (enum)
      Values: `index`, `index_template`, `component_template`, `ingest_pipeline`, `ilm_policy`, `data_stream_ilm_policy`, `transform`, `ml_model`, `knowledge_base`, `esql_view`
    - `version` (string)
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
POST /api/fleet/epm/packages/{pkgName}/{pkgVersion}
{
  "ignore_constraints": false
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/fleet/epm/packages/{pkgName}/{pkgVersion}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "ignore_constraints": false
}'
```

## Response Examples

#### Post install package

Package successfully installed

```json
{
  "_meta": {
    "install_source": "registry"
  },
  "items": [
    {
      "id": "aws-logs-aws.cloudwatch_logs-default",
      "type": "index_template"
    }
  ]
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

