---
title: "Admin | Docs | Private AI Workspace by R&D Copilot"
description: "Read the admin resources and their request and response fields."
canonical: "https://private-ai.rdcopilot.com/docs/api-reference/admin/"
language: en
updated: 2026-11-22
---

# Admin

Read the admin resources and their request and response fields.

## List model runtimes

GET `/private-ai/v1/admin/models`

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `limit` | query | `integer` | Nooptional | Records per page. Default `100` Range `1` – `500` |
| `cursor` | query | `string` | Nooptional | Opaque cursor from the preceding page. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | Current record state. | `ModelPage` |
| `401` | unauthorized | `Error` |
| `403` | forbidden | `Error` |
| `404` | Record not found in this installation. | `Error` |
| `429` | rate\_limited | `Error` |
| `503` | unavailable | `Error` |

### Request

curl

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

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/admin/models?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/models?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/models?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/models?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

```json
{
  "items": [
    {
      "id": "model-primary",
      "name": "Primary model",
      "status": "loaded",
      "revision": 1,
      "version": "3.2.0",
      "availableVersion": "3.2.1",
      "memoryMiB": 6144,
      "contextTokens": 8192,
      "teams": [
        "warehouse"
      ],
      "serverId": "server-2"
    },
    {
      "id": "model-secondary",
      "name": "Secondary model",
      "status": "idle",
      "revision": 1,
      "version": "2.8.0",
      "availableVersion": "2.8.1",
      "memoryMiB": 8192,
      "contextTokens": 4096,
      "teams": [
        "finance"
      ],
      "serverId": "server-2"
    }
  ],
  "nextCursor": null
}
```

## Change model runtime state

PATCH `/private-ai/v1/admin/models/{modelId}`

Administrator access is required. Permitted transitions: idle to loaded; idle to updating, while availableVersion differs from version; loaded to idle. The installation moves updating to idle by itself when the update completes, and version then equals availableVersion. Other transitions return invalid\_transition. Loading checks the available host memory and refuses insufficient\_memory without changing the runtime.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `modelId` | path | `string` | Yesrequired | Record identifier. |

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | A new UUID for a new intent; reuse it after a timeout. |
| `expectedRevision` | `integer` | Yesrequired | The revision you last read. |
| `status` | `string` | Yesrequired | Requested runtime state. One of `loaded`, `idle`, `updating` |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | The operation was accepted. | `OperationResult` |
| `400` | invalid\_request | `Error` |
| `401` | unauthorized | `Error` |
| `403` | forbidden | `Error` |
| `404` | record\_not\_found | `Error` |
| `409` | revision\_conflict | `Error` |
| `422` | invalid\_transition | `Error` |
| `429` | rate\_limited | `Error` |
| `503` | unavailable | `Error` |

### Request

curl

```bash
curl -X PATCH "$RDC_BASE_URL/private-ai/v1/admin/models/model-primary" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "8a000001-0000-4000-8000-000000000001",
  "expectedRevision": 1,
  "status": "idle"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/admin/models/model-primary`, {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "8a000001-0000-4000-8000-000000000001",
    "expectedRevision": 1,
    "status": "idle"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'PATCH',
    f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/admin/models/model-primary',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '8a000001-0000-4000-8000-000000000001',
        'expectedRevision': 1,
        'status': 'idle',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "8a000001-0000-4000-8000-000000000001",
  "expectedRevision": 1,
  "status": "idle"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/admin/models/model-primary');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$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.Patch, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/admin/models/model-primary");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "8a000001-0000-4000-8000-000000000001",
  "expectedRevision": 1,
  "status": "idle"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "8a000001-0000-4000-8000-000000000001",
  "status": "accepted",
  "aggregateId": "model-primary",
  "aggregateRevision": 2
}
```

## Read workspace health

GET `/private-ai/v1/admin/health`

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | Current record state. | `Health` |
| `401` | unauthorized | `Error` |
| `403` | forbidden | `Error` |
| `404` | Record not found in this installation. | `Error` |
| `429` | rate\_limited | `Error` |
| `503` | unavailable | `Error` |

### Request

curl

```bash
curl "$RDC_BASE_URL/private-ai/v1/admin/health" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/admin/health`, {
  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/health',
    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/health');
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/health");
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

```json
{
  "files": 3,
  "readyDocuments": 2,
  "queue": 0,
  "failedDocuments": 1,
  "notReadableFiles": 1,
  "loadedModels": 1,
  "memoryMiB": 6144,
  "capacityMiB": 12288
}
```

## Check an outbound request

POST `/private-ai/v1/admin/outbound-checks`

Administrator access is required. The check sends a request for a destination outside the perimeter through the gateway rule. The answer is always rejected with outbound\_denied: nothing is sent, and the refusal is written to the audit log with the user, the destination and the rule.

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | A new UUID for a new intent; reuse it after a timeout. |
| `expectedRevision` | `integer` | Yesrequired | The revision you last read. |
| `destination` | `string` | Yesrequired | Where the request would go. The installation refuses every destination outside the perimeter. One of `external-ai-services` |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | The decision: the operation is rejected with outbound\_denied. | `OperationResult` |
| `400` | invalid\_request | `Error` |
| `401` | unauthorized | `Error` |
| `403` | forbidden | `Error` |
| `409` | revision\_conflict | `Error` |
| `429` | rate\_limited | `Error` |
| `503` | unavailable | `Error` |

### Request

curl

```bash
curl -X POST "$RDC_BASE_URL/private-ai/v1/admin/outbound-checks" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "8a000001-0000-4000-8000-000000000003",
  "expectedRevision": 0,
  "destination": "external-ai-services"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/admin/outbound-checks`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "8a000001-0000-4000-8000-000000000003",
    "expectedRevision": 0,
    "destination": "external-ai-services"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/admin/outbound-checks',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '8a000001-0000-4000-8000-000000000003',
        'expectedRevision': 0,
        'destination': 'external-ai-services',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "8a000001-0000-4000-8000-000000000003",
  "expectedRevision": 0,
  "destination": "external-ai-services"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/admin/outbound-checks');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/admin/outbound-checks");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "8a000001-0000-4000-8000-000000000003",
  "expectedRevision": 0,
  "destination": "external-ai-services"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "8a000001-0000-4000-8000-000000000003",
  "status": "rejected",
  "aggregateRevision": 1,
  "code": "outbound_denied"
}
```

## Read policy decisions

GET `/private-ai/v1/admin/audit`

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `limit` | query | `integer` | Nooptional | Records per page. Default `100` Range `1` – `500` |
| `cursor` | query | `string` | Nooptional | Opaque cursor from the preceding page. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | Current record state. | `AuditPage` |
| `401` | unauthorized | `Error` |
| `403` | forbidden | `Error` |
| `404` | Record not found in this installation. | `Error` |
| `429` | rate\_limited | `Error` |
| `503` | unavailable | `Error` |

### Request

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

```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
}
```
