# Audit Log API

The Audit Log API allows for the querying of the audit logs in a Celonis Platform team and then extract this data to provide detailed insights into event activity in your team. Once the data is extracted, you can feed the information back into the Celonis Platform to create a data model using your  data. This allows you create your own views in Studio using the data pulled from the API.

To connect to the APIs and create an extractor, follow [these procedures](/celonis-apis/connecting-to-celonis-platform).

## Base URLs

The base URLs for the Audit Log APIs are:

* **Version 2:** https://**your-team**.celonis.cloud/api/external/v2/audit
* **Version 1:** https://**your-team**.celonis.cloud/api/external/audit


Replace **your-team** with the name of your Celonis instance to access the Audit Log APIs.

## Prerequisites (v2.0)

Note
Version 1.0 of this API will coninue to be supported, but will be deprecated in the future. It is recommended that users utilize v2.0 for all new implementations.

In order to use [Version 2.0](/celonis-apis/audit-log-api/openapi/openapi-external-v2) of the Audit Log API, you must first:

* Call the new endpoint path: `GET /log/api/external/v2/audit`.
* Implement a cursor loop for data retrieval.
* The first request should omit the `pageToken` parameter.
* Subsequent requests must use the returned `nextPageToken` as the new `pageToken`.
* Fetching should stop when `nextPageToken` is absent or empty.


## Use Cases

The Audit Log API can be used to:

* Connect external monitoring tools, such as SIEM tools, to capture and monitor platform admin and change events.
* Export Audit Log events back into a Celonis Studio view or other tool for analysis or risk assessment needs.


## Authentication

This API supports multiple methods of authentication:

* (preferred method) Via OAuth 2.0 token with scope `audit.log`, passed in an HTTP header like this: `Authorization: Bearer TOKEN`.
* Via Application keys, passed in an HTTP header like this: `Authorization: AppKey APPLICATION_KEY`.
* Via API keys, passed in an HTTP header like this: `Authorization: Bearer API_KEY`.


See [this help page](https://docs.celonis.com/en/using-oauth-2-0.html) for more information about OAuth 2.0.