---
type: api
title: Get an agent binary download source
description: Get an agent binary download source by ID.<br/><br/>[Required authorization] Route required privileges: fleet-agent-policies-read OR fleet-settings-read.
url: https://www.elastic.co/elastic/docs-builder/docs/4843/api/doc/kibana/v9/operation/operation-get-fleet-agent-download-sources-sourceid
resource: https://www.elastic.co/elastic/docs-builder/docs/4843/api/doc/kibana/v9/operation/operation-get-fleet-agent-download-sources-sourceid
products:
  - Kibana
---

# Get an agent binary download source

Authentication: required

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

## Paths

- `GET` `/api/fleet/agent_download_sources/{sourceId}`
- `GET` `/s/{space_id}/api/fleet/agent_download_sources/{sourceId}`

#### 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.
- `sourceId` (string) — required
  The ID of the download source

## Description

Get an agent binary download source by ID.

## Required privileges

- Privileges: `fleet-agent-policies-read` or `fleet-settings-read`

## Responses

#### `200`

Successful response

`application/json`

- `item` (object)
  - `auth` (object) — nullable
    - `api_key` (string)
    - `headers` (object[] · max items: 100)
      - `key` (string)
      - `value` (string)
    - `password` (string)
    - `username` (string)
  - `host` (string · format: uri)
  - `id` (string)
  - `is_default` (boolean · default: false)
  - `is_preconfigured` (boolean)
  - `name` (string)
  - `proxy_id` (string) — nullable
    The ID of the proxy to use for this download source. See the proxies API for more information.
  - `reserve_diskspace` (boolean)
    If `true`, Elastic Agent reserves disk space equal to the size of the new agent package before an upgrade, so the upgrade fails early if there is not enough space. If not set, defaults to `true` on the agent side.
  - `secrets` (object)
    - `auth` (object)
      - `api_key` (union anyOf)
        - **{ id }**
          - `id` (string)
        - **string**
      - `password` (union anyOf)
        - **{ id }**
          - `id` (string)
        - **string**
    - `ssl` (object)
      - `key` (union anyOf)
        - **{ id }**
          - `id` (string)
        - **string**
  - `ssl` (object)
    - `certificate` (string)
    - `certificate_authorities` (string[] · max items: 10)
    - `key` (string)
#### `400`

Bad Request

`application/json`

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

Not Found

`application/json`

## Code examples

#### Console

```console
GET kbn:/api/fleet/agent_download_sources/SOURCE_ID
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/fleet/agent_download_sources/${SOURCE_ID}" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Get download source

`application/json`

An agent binary download source

```json
{
  "item": {
    "host": "https://artifacts.elastic.co/downloads/",
    "id": "download-source-id-1",
    "is_default": true,
    "name": "Elastic Artifacts"
  }
}
```

#### Generic error response

`application/json`

Example of a generic error response

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

#### Not found

`application/json`

No download source was found with the given ID

```json
{
  "error": "Not Found",
  "message": "Agent binary source download-source-id-1 not found",
  "statusCode": 404
}
```

