# Genie Generate Download Full Query Result

Launch stage: GA

`POST /api/2.0/genie/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_id}/downloads`

Initiates a new SQL execution and returns a `download_id` and `download_id_signature` that you can use to track the progress of the download.
 The query result is stored in an external link and can be retrieved using the Get Download Full Query Result API.
 Both `download_id` and `download_id_signature` must be provided when calling the Get endpoint. 

 ----

 ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**

 When you use the `EXTERNAL_LINKS` disposition, a
 short-lived,  URL is generated, which can be
 used to download the results directly
 from . As a
 short-lived  is
 embedded in this  URL, you should protect
 the URL.

 Because  URLs are already generated with
 embedded temporary s,
 you must not set an `Authorization` header in the download requests.

 See Execute Statement for more details.

 ----

API scopes: genie

**AWS**

Initiates a new SQL execution and returns a `download_id` and `download_id_signature` that you can use to track the progress of the download.
The query result is stored in an external link and can be retrieved using the Get Download Full Query Result API.
Both `download_id` and `download_id_signature` must be provided when calling the Get endpoint.

----

### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**

When you use the `EXTERNAL_LINKS` disposition, a
short-lived, presigned URL is generated, which can be
used to download the results directly
from Amazon S3. As a
short-lived access credential is
embedded in this presigned URL, you should protect
the URL.

Because presigned URLs are already generated with
embedded temporary access credentials,
you must not set an `Authorization` header in the download requests.

See Execute Statement for more details.

----

**Azure**

Initiates a new SQL execution and returns a `download_id` and `download_id_signature` that you can use to track the progress of the download.
The query result is stored in an external link and can be retrieved using the Get Download Full Query Result API.
Both `download_id` and `download_id_signature` must be provided when calling the Get endpoint.

----

### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**

When you use the `EXTERNAL_LINKS` disposition, a
short-lived, SAS URL is generated, which can be
used to download the results directly
from Azure storage. As a
short-lived SAS token is
embedded in this SAS URL, you should protect
the URL.

Because SAS URLs are already generated with
embedded temporary SAS tokens,
you must not set an `Authorization` header in the download requests.

See Execute Statement for more details.

----

**GCP**

Initiates a new SQL execution and returns a `download_id` and `download_id_signature` that you can use to track the progress of the download.
The query result is stored in an external link and can be retrieved using the Get Download Full Query Result API.
Both `download_id` and `download_id_signature` must be provided when calling the Get endpoint.

----

### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**

When you use the `EXTERNAL_LINKS` disposition, a
short-lived, signed URL is generated, which can be
used to download the results directly
from Google Cloud Storage. As a
short-lived access credential is
embedded in this signed URL, you should protect
the URL.

Because signed URLs are already generated with
embedded temporary access credentials,
you must not set an `Authorization` header in the download requests.

See Execute Statement for more details.

----

## Path parameters

- `space_id` (string, optional)
  Genie space ID
  Example: `e1ef34712a29169db030324fd0e1df5f`
- `conversation_id` (string, optional)
  Conversation ID
  Example: `e1ef34712a29169db030324fd0e1df5f`
- `message_id` (string, optional)
  Message ID
  Example: `e1ef34712a29169db030324fd0e1df5f`
- `attachment_id` (string, optional)
  Attachment ID
  Example: `e1ef34712a29169db030324fd0e1df5f`

## Returns

- `download_id` (string, optional)
  Download ID. Use this ID to track the download request in subsequent polling calls
  Example: `01eda0e7-e315-1846-84e2-79a963ffad44`
- `download_id_signature` (string, optional)
  JWT signature for the download_id to ensure secure access to query results

## Response

```json
{
  "download_id": "01eda0e7-e315-1846-84e2-79a963ffad44",
  "download_id_signature": "string"
}
```

