# Tracking user access and permissions

Tonic Structural provides an API endpoint to track the following events related to user access and permissions:

* A user account is created.
* A user account is removed.
* A user logs in to Structural.
* A permission is added to or removed from a permission set.
* A permission set is assigned to or removed from a user. This might be a global permission set, or a workspace permission set in the context of a specific workspace.
* A generator preset is added, updated, or removed.

To request the access and permission events, use the following endpoint:

[<mark style="background-color:blue;">`GET`</mark>` ``/api/audit-events/search`](https://app.tonic.ai/apidocs/index.html#/AuditEvents/SearchAuditEvents)

The returned event details include:

* When the event occurred.
* The type of event.
* Whether the event succeeded or failed.
* The Structural user who was affected by the action.
* Other details about the event.


---

# 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.tonic.ai/app/admin/tonic-monitoring-logging/audit-event-api-endpoint.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.
