# Events APIs

Get an Excel file with the user events logged in Spark. This is equivalent to the [Options](/navigation/options.md#event-viewer)  *Download Events*.

### 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}`.

## `POST` log job

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

{% code overflow="wrap" %}

```shellscript
POST /{tenant}/api/v4/events/download
```

{% endcode %}

### Path parameters

| Key         | Value                                                                                                                                                                                  |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tenant` \* | Tenant is part of your [Login and logout](/navigation/login-and-logout.md#log-in-to-spark) URL and also available in the  [Navigation menu](/navigation/navigation-menu.md#user-menu). |

### Request body

`Content-Type: application/json`&#x20;

| Key                                                                                                                | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `page_no`                                                                                                          | Page number of the list to get.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `pageSize`                                                                                                         | Number of records per page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `sort_column`                                                                                                      | <p>String defining the sort column.</p><p>Example: <code>-updated</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `sort_order`                                                                                                       | <p><code>asc</code> or <code>desc</code>  sets the sort order for the <code>sort\_column</code>.<br>Example: <code>desc</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `search`                                                                                                           | <p>Array of search filter objects. Search filter objects can include:<br><code>column</code> Name of the column to filter. Columns include <code>folderId</code>, <code>event\_types</code> (Array),  <code>service\_name</code>, <code>user\_name</code> , <code>event\_start\_date</code>, <code>event\_end\_date</code>, </p><p><code>value</code> Value of the <code>column</code> to filter.</p><p><code>operator</code> Applies to numeric properties.</p><p>Example 1:<br> <code>{"column": "folderId", "value": "8bc193d8-5f82-49d1-8da8-d689f6ab163f"}</code><br>Example 2:<br><code>{ |
| "column": "event\_types",                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| "value": \["PublishEngine", "DownloadEngine"]"                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| }</code></p><p>Example 3:<br> <code>{"column": "event\_end\_date", "value", "2026-03-02T15:08:00.000Z"}</code></p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

### Sample request

```sh
{
    "page_size": 10,
    "page_no": 1,
    "sort_column": "folder",
    "sort_order": "asc",
    "search": [
        {
            "column": "folder_id",
            "value": "8bc193d8-5f82-49d1-8da8-d689f6ab163f"
        },
        {
            "column": "service_name",
            "value": "AllInputTypes"
        },
        {
            "column": "event_start_date",
            "value": "2026-01-31T15:08:00.000Z"
        },
        {
            "column": "event_end_date",
            "value": "2026-03-02T15:08:00.000Z"
        },
        {
            "column": "user_name",
            "value": "myuser@mydomain.com"
        },
        {
            "column": "event_types",
            "value": "[\"PublishEngine\",\"DownloadEngine\"]"
        }
    ]
}
```

### Sample response <a href="#api-response" id="api-response"></a>

`HTTP 200 OK` `Content-Type: application/json`

```json
{
    "object": "events",
    "id": "19caf63c-76e7-3c8c-b624-9a8a6c8a7293",
    "status_url": "https://excel.myenvironment.coherent.global/mytenant/api/v4/events/download/19caf63c-76e7-3c8c-b624-9a8a6c8a7293/status"
}
```

## `GET` log job status

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

{% code overflow="wrap" %}

```shellscript
GET /{tenant}/api/v4/events/download/{jobId}/status
```

{% endcode %}

### Authorization

Follows from [#authorization](#authorization "mention") above.

### Path parameters

| Key           | Value                                                                                                                                                                                  |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{tenant}` \* | Tenant is part of your [Login and logout](/navigation/login-and-logout.md#log-in-to-spark) URL and also available in the  [Navigation menu](/navigation/navigation-menu.md#user-menu). |
| `{jobId}` \*  | `job_id` associated from [#post-log-job](#post-log-job "mention").                                                                                                                     |

### Sample response

`HTTP 200 OK` `Content-Type: application/json`

```json
{
    "object": "events",
    "id": "19caf63c-76e7-3c8c-b624-9a8a6c8a7293",
    "status_url": "https://myenvironment.coherent.global/mytenant/api/v4/events/download/19caf63c-76e7-3c8c-b624-9a8a6c8a7293/status",
    "response_timestamp": "2026-03-03T12:41:44.391Z",
    "status": "Success",
    "process_time": 8697,
    "outputs": {
        "files": [
            {
                "file": "https://environment.coherent.global/coherent_events_2026_03_03_T_12_40_40.xlsx",
                "file_hash": null
            }
        ]
    },
    "error": null,
    "source_system": "SPARK",
    "correlation_id": ""
}
```


---

# 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/events-apis.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.
