# Audit Logs API

Retrieves paginated audit logs for a given API key, excluding sensitive query content. Logs include metadata such as IP address, HTTP method, query type, and timestamp, enabling traceability and usage analysis for security and debugging purposes.

***

### 🔗 Endpoint

```
POST https://api.whiteintel.io/get_audit_logs.php
```

***

### 📥 Request Body (JSON)

| Field    | Type   | Required | Description               |
| -------- | ------ | -------- | ------------------------- |
| `apikey` | string | ✅ Yes    | Your API key              |
| `page`   | int    | ❌ No     | Pagination (default: `1`) |

***

### ✅ Example Request

```json
POST /get_audit_logs.php
Content-Type: application/json

{
  "apikey": "your api key",
  "page": 1

}
```

***

### 📤 Example Response

```json
{
  "success": true,
  "page": 1,
  "count": 11,
  "logs": [
    {
      "ip": "10.0.0.5",
      "call_date": "2025-07-30 18:15:58",
      "http_method": "POST",
      "query_type": "audit_logs"
    },
    {
      "ip": "10.0.0.5",
      "call_date": "2025-07-30 18:15:34",
      "http_method": "POST",
      "query_type": "audit_logs"
    },
    {
      "ip": "10.0.0.5",
      "call_date": "2025-07-30 18:15:19",
      "http_method": "POST",
      "query_type": "audit_logs"
    },
    {
      "ip": "10.0.0.5",
      "call_date": "2025-07-30 17:16:42",
      "http_method": "POST",
      "query_type": "leaksby_id"
    },
    {
      "ip": "10.0.0.5",
      "call_date": "2025-07-30 17:06:07",
      "http_method": "POST",
      "query_type": "corporate_leaks"
    },
    {
      "ip": "10.0.0.5",
      "call_date": "2025-07-30 17:03:31",
      "http_method": "POST",
      "query_type": "consumer_leaks"
    }
  ]
}

```

***

### ❌ Error Responses

#### Invalid Page

```json
{"success":false,"error":"Invalid page number. Must be a positive integer."}
```

***

### Curl Example

```bash
curl -X POST https://api.whiteintel.io/get_audit_logs.php \
  -H "Content-Type: application/json" \
  -d '{
    "apikey":"YOUR API KEY"
    "page": 1,
    
}'
```

***


---

# 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.whiteintel.io/whiteintel-api-doc/whiteintel-api-v2/audit-logs-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.
