> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/spark-apis/api-call-history-apis/download-log-as-json.md).

# Download Log as JSON

{% hint style="info" %}
This API follows the same structure as [Download Log as CSV](/spark-apis/api-call-history-apis/download-log-as-csv.md).
{% endhint %}

Get a ZIP of JSON files from the API Call History of a Spark service. This is equivalent to the [API Call History](/navigation/api-call-history.md) functionality to *Download all API calls*, *Download as JSON*.

Returns: `status` response with  `job_id` of the requested job.

{% code overflow="wrap" %}

```shellscript
POST /{tenant}/api/v3/folders/{folder}/services/{service}/log/downloadjson
```

{% endcode %}

Returns: `status` response and `download_url` to download the ZIP file.

{% code overflow="wrap" %}

```shellscript
GET /{tenant}/api/v3/folders/{folder}/services/{service}/log/downloadjson/status/{jobId}
```

{% endcode %}

### Authorization

This API supports authorization via:

* `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.DownloadJSONLog.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.
