# Download service

Download the Excel file from a Spark service.

Returns: Excel file.

{% code overflow="wrap" %}

```shellscript
GET /api/v1/product/{folder}/engines/{service}/download/{versionId}
```

{% endcode %}

### Authorization

* `Bearer {token}` accessible from [Authorization - Bearer token](/spark-apis/authorization-bearer-token.md) or systematically via [Client Credentials](/identity-and-access-management/client-credentials.md).
  * The request headers should include a key for `Authorization` with the value `Bearer {token}`.
* API key created from [Authorization - API keys](/spark-apis/authorization-api-keys.md).\
  The [Authorization - API keys](/spark-apis/authorization-api-keys.md#api-key-groups) must contain [Manage users](/tenant-administration/manage-users.md#user-groups) that are also assigned to [Permissions - Features permissions](/spark-apis/authorization-api-keys/permissions-features-permissions.md) `Spark.DownloadServiceByVersionId.json` or `Spark.AllEncompassingProxy.json`.
  * The request headers should include the keys `x-synthetic-key` and `x-tenant-name` with the values of the API key and tenant name respectively.

### Path parameters

| Key            | Value                                      |
| -------------- | ------------------------------------------ |
| `folder` \*    | Folder associated with the request.        |
| `service` \*   | Service associated with the request.       |
| `versionId` \* | `version_id` of the Spark service version. |

### Query parameters

| Key        | Value                                                                                                                                                                                                                                                              |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `filename` | Name of the downloaded file. If not provided, Spark will use an appropriate name.                                                                                                                                                                                  |
| `type`     | `ca` returns the Coherent Assistant enhanced version of the workbook. If not provided, the original workbook will be downloaded. See [Version Overview](/navigation/version-overview.md#downloading-the-service-excel-file) for an explanation of the differences. |

### Response

`HTTP 200 OK` `Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`

Returns the Excel file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherent.global/spark-apis/service-apis/download-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
