> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/eksploatacja-aplikacji/obsluga-zdarzen/audyt-zdarzen.md).

# Event audit

{% hint style="info" %}
The availability of functionality depends on the license and may not be available in all deployments.
{% endhint %}

## Purpose

The purpose of the platform audit mechanism is to permanently store Eximee system events, allowing the state of business processes to be precisely reconstructed at any point during their processing.

## Stored documents

Using the platform event mechanism already provided in the system, the audit builds a dedicated file in object storage (e.g. Blob Storage) for each application instance:

* the file name contains the application instance identifier with the jsonl extension, for example: 300plus\_app-475d8af8-e2ba-437e-8ac1-6af182412415.jsonl
* the file is saved in JSONL format, where each line of the file contains a JSON document encoded in UTF-8,
* the lines represent individual Eximee system events, whose payload is additionally extended with the values of some headers (see the table below)

Due to the specifics of the implementation and the event-driven nature of the system, the document has the following characteristics:

* a single event may appear in it more than once and deduplication by eventUuid is required during reading,
* the file lines are not kept in order and sorting by eventTimestamp is required during reading.

## Published events

For audit purposes, a subset of all events published by Eximee is collected. Information from events published to the event broker (e.g. Event Hubs, Kafka) is first stored in a database (e.g. PostgreSQL), and then once a day it is written in batches to object storage (e.g. Blob Storage). The collected events are described in the table:

| Event type                            | Description (business)              |
| ------------------------------------- | ----------------------------------- |
| datamodel:application-instance:create | Creation of an application instance |
| datamodel:value:resolve               | Reading data from the data model    |
| datamodel:data-provider:save          | Saving data in the data model       |

## Saved headers

In event audit files, the values of the following headers of events published on Eximee Audit Trail are saved.

| Header name    | Description                        |
| -------------- | ---------------------------------- |
| eventTimestamp | Event timestamp in ISO 8601 format |
| eventUuid      | Unique event identifier            |
| eventType      | Event type                         |
| eventVersion   | Event version                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.eximee.com/documentation/documentation-en/eksploatacja-aplikacji/obsluga-zdarzen/audyt-zdarzen.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
