---
type: api
title: Download the given instance's heap dump
description: Returns the given instance's heap dump for download.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-download-deployment-instance-heap-dump
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-download-deployment-instance-heap-dump
products:
  - Elastic Cloud Enterprise
---

# Download the given instance's heap dump

## Paths

- `GET` `/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_id}/heap_dump/_download`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `deployment_id` (string)
  Identifier for the Deployment.
- `resource_kind` (string)
  The kind of resource (one of elasticsearch, kibana or apm).
- `ref_id` (string)
  User-specified RefId for the Resource (or '_main' if there is only one).
- `instance_id` (string)
  The instance identifier

## Description

Returns the given instance's heap dump for download.

## Responses

#### `200`

The given instance's heap dump

`application/json`

Type: `string`

#### `404`

* The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)
* The Resource specified by {ref_id} cannot be found. (code: `deployments.deployment_resource_not_found`)
* The specified instance cannot be found. (code: `deployments.instance_not_found_error`)
* The specified instance does not have a heap dump available to download. (code: `heap_dumps.heap_dump_not_found`)
* The specified instance's heap dump is not ready to download. (code: `heap_dumps.heap_dump_not_ready`)
* The specified instance's heap dump failed to capture. (code: `heap_dumps.heap_dump_failed`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
GET /deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_id}/heap_dump/_download
```

#### curl

```curl
curl -X GET "/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_id}/heap_dump/_download"
```

