---
type: api
title: Get a package file
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-get-fleet-epm-packages-pkgname-pkgversion-filepath
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-get-fleet-epm-packages-pkgname-pkgversion-filepath
products:
  - Kibana
---

# Get a package file

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

## Paths

- `GET` `/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}`
- `GET` `/s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}`

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

#### Path Parameters

- `pkgName` (string)
  Package name
- `pkgVersion` (string)
  Package version
- `filePath` (string)
  File path within the package

## Description

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

Get the contents of a specific file from a package.<br/><br/>[Required authorization] Route required privileges: integrations-read OR fleet-setup OR fleet-all.

## Responses

#### `200`

Successful response — returns the file content

`application/json`

Type: `object`

#### `400`

Bad Request

`application/json`

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

#### Console

```console
GET /api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/{filePath}"
```

## Response Examples

#### Get package file

The content of the requested package file

```json
<file content>
```

#### Generic error response

Example of a generic error response

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

