# pub.chive.admin.getAuditLog

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getAuditLog)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getAuditLog/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.getAuditLog/examples)

## Definitions

### `pub.chive.admin.getAuditLog`

**Type**: `query`

Get admin audit log entries

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum number of entries |
| `cursor` | `string` | No | Pagination cursor |
| `actorDid` | `string` (did) | No | Filter by actor DID |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `total` | `integer` | Yes | Total entries matching the query |
| `entries` | `array` | Yes | Audit log entries |

#### Errors

- **AuthenticationRequired**
- **AdminRequired**

### `pub.chive.admin.getAuditLog#auditEntry`

**Type**: `object`

Audit log entry

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Entry ID |
| `action` | `string` | Yes | Action performed |
| `details` | `string` | No | Additional details |
| `actorDid` | `string` (did) | Yes | DID of the actor |
| `targetUri` | `string` | No | Target resource URI |
| `timestamp` | `string` (datetime) | Yes | When the action occurred |
| `collection` | `string` | No | NSID collection |
| `actorHandle` | `string` | No | Handle of the actor |

## Raw Schema

```json
{
  "id": "pub.chive.admin.getAuditLog",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "AdminRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "entries",
            "total"
          ],
          "properties": {
            "total": {
              "type": "integer",
              "description": "Total entries matching the query"
            },
            "entries": {
              "type": "array",
              "items": {
                "ref": "#auditEntry",
                "type": "ref"
              },
              "description": "Audit log entries"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of entries"
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor"
          },
          "actorDid": {
            "type": "string",
            "format": "did",
            "description": "Filter by actor DID"
          }
        }
      },
      "description": "Get admin audit log entries"
    },
    "auditEntry": {
      "type": "object",
      "required": [
        "id",
        "action",
        "actorDid",
        "timestamp"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Entry ID"
        },
        "action": {
          "type": "string",
          "description": "Action performed"
        },
        "details": {
          "type": "string",
          "description": "Additional details"
        },
        "actorDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the actor"
        },
        "targetUri": {
          "type": "string",
          "description": "Target resource URI"
        },
        "timestamp": {
          "type": "string",
          "format": "datetime",
          "description": "When the action occurred"
        },
        "collection": {
          "type": "string",
          "description": "NSID collection"
        },
        "actorHandle": {
          "type": "string",
          "description": "Handle of the actor"
        }
      },
      "description": "Audit log entry"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
