---
title: "Audit log | Docs | Private AI Workspace by R&D Copilot"
description: "Trace allowed and refused actions without storing secrets in logs."
canonical: "https://private-ai.rdcopilot.com/docs/administration/audit-log/"
language: en
updated: 2026-11-22
---

# Audit log

Trace allowed and refused actions without storing secrets in logs.

## Read a decision

Each audit line gives the time, the user, the action, the destination, the decision and the rule. The rule is a stable refusal code, or the permission that allowed the action. Questions, outbound requests, indexing requests and model changes are logged; the indexing worker’s own steps are not. A refused outbound request carries outbound\_denied. Use the user and the time to match the line to the client request and the operation outcome.

## Investigate refusal

Start with the refusal code rather than the answer text. forbidden calls for a permission review; model\_unavailable calls for a runtime check; no\_readable\_documents calls for checking the space and indexing state. Do not retry an unchanged forbidden request in a loop.

1.  Record the operation identifier and the affected resource.
2.  Read the current permissions and runtime state with an authorised administrator.
3.  After correcting the cause, submit a new intent with a new operationId.

## Protect the log

Limit audit access to the people who investigate operations. Avoid copying prompts, file content, tokens or credentials into external tickets. Apply the configured retention and backup policy to the audit store.

curl

```bash
curl "$RDC_BASE_URL/private-ai/v1/admin/audit?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/admin/audit?limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/admin/audit?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/admin/audit?limit=20');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/admin/audit?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "items": [
    {
      "id": "audit-6",
      "time": "2026-11-23T05:48:00Z",
      "user": "andrei-pop",
      "action": "ask",
      "destination": "model-secondary",
      "decision": "refused",
      "rule": "model_unavailable"
    },
    {
      "id": "audit-5",
      "time": "2026-11-22T16:20:00Z",
      "user": "vlad-munteanu",
      "action": "index-again",
      "destination": "doc-scan",
      "decision": "allowed",
      "rule": "admin_role"
    },
    {
      "id": "audit-4",
      "time": "2026-11-22T14:05:00Z",
      "user": "andrei-pop",
      "action": "ask",
      "destination": "model-primary",
      "decision": "refused",
      "rule": "forbidden"
    },
    {
      "id": "audit-3",
      "time": "2026-11-22T11:32:00Z",
      "user": "vlad-munteanu",
      "action": "load-model",
      "destination": "model-primary",
      "decision": "allowed",
      "rule": "admin_role"
    },
    {
      "id": "audit-2",
      "time": "2026-11-22T09:10:00Z",
      "user": "workspace-integration",
      "action": "outbound-request",
      "destination": "external-ai-services",
      "decision": "refused",
      "rule": "outbound_denied"
    },
    {
      "id": "audit-1",
      "time": "2026-11-22T08:14:00Z",
      "user": "mihai-stan",
      "action": "ask",
      "destination": "model-primary",
      "decision": "allowed",
      "rule": "space_permission"
    }
  ],
  "nextCursor": null
}
```
