# Audit Log API

The Audit Log API provides endpoints for retrieving records of actions and changes within various modules of your workspace. Use this API to monitor activities for enhanced security and traceability.

### Base URL

All endpoints are prefixed with `/dev/v1/audit`

### Authentication

All endpoints require the following headers:

| Header           | Type   | Required | Description                                         |
| ---------------- | ------ | -------- | --------------------------------------------------- |
| `Nected-API-Key` | string | Yes      | Your Nected API key.                                |
| `Nected-Branch`  | string | Yes      | Branch name (e.g. default branch of the workspace). |

### Endpoints

#### 1. Get Audit Log search result

Retrieve a paginated list of audit logs for a specific module with optional filtering and sorting.

**Endpoint:** `GET /dev/v1/audit/{module}/search`

**URL Format:** Query parameters can be appended directly to the URL as a query string.

**Example:** `/dev/v1/audit/audit/search?pageNo=1&pageSize=5`

For detailed documentation, see Search.

#### 2. Get Audit Log Detail

Retrieve detailed information for a specific audit log entry by log ID, including parent and child relationships.

**Endpoint:** `GET /dev/v1/audit/{module}/{log-id}`

**URL Format:** Query parameters can be appended directly to the URL as a query string.

**Example:** `/dev/v1/audit/audit/{log-id}?pageNo=1&pageSize=5`

For detailed documentation, see Detail by id.

### Pagination

Both endpoints support pagination to help manage large datasets by retrieving results page-by-page.

**Pagination Parameters:**

* `pageNo` (integer): Specifies the page number to retrieve. Default is 1.
* `pageSize` (integer): Specifies the number of records per page. Default is 10, maximum is 10.

**Pagination Response Fields:**

* `pageNo`: Current page number
* `pageSize`: Number of items per page
* `totalCount`: Total number of items across all pages
* `totalPages`: Total number of pages available


---

# 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.nected.ai/nected-docs/management-api/audit-log-api.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.
