Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Connectors

    Connect files while preserving the source access policy.

    On this page

    Configure the source

    Use a connector identity limited to the selected source. Associate it with a knowledge space and its permission source. Configure the source destination in the network policy before enabling synchronisation; connector access does not permit external model calls.

    1. Select the folders or collections to include and exclude unrelated content.
    2. Map the source permissions before enabling retrieval.
    3. Run an initial sync and inspect queued, ready and failed records.

    Handle unreadable files

    A failed file with unreadable_file is excluded from retrieval. Repair the original file at its source, allow the connector to refresh it, then index it again. Repeated indexing of the same unreadable content does not make it readable.

    Remove access

    When removing a source, stop synchronisation and revoke its connector credential. Confirm that its documents no longer appear for identities without access. Review Permissions sync before reconnecting.

    curl

    curl "$RDC_BASE_URL/private-ai/v1/documents?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

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

    Python

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

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/documents?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#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/documents?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

    {
      "items": [
        {
          "id": "doc-procedure",
          "spaceId": "warehouse",
          "title": "Receiving procedure",
          "status": "ready",
          "revision": 1,
          "readable": true,
          "attempt": 1,
          "error": null
        },
        {
          "id": "doc-scan",
          "spaceId": "warehouse",
          "title": "Receiving checklist",
          "status": "failed",
          "revision": 1,
          "readable": false,
          "attempt": 1,
          "error": "unreadable_file"
        },
        {
          "id": "doc-delivery",
          "spaceId": "warehouse",
          "title": "Delivery instructions",
          "status": "ready",
          "revision": 1,
          "readable": true,
          "attempt": 1,
          "error": null
        },
        {
          "id": "doc-finance",
          "spaceId": "finance",
          "title": "Payment review",
          "status": "ready",
          "revision": 1,
          "readable": true,
          "attempt": 1,
          "error": null
        }
      ],
      "nextCursor": null
    }

    curl

    curl -X POST "$RDC_BASE_URL/private-ai/v1/documents/doc-procedure/index" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/private-ai/v1/documents/doc-procedure/index`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "8a000001-0000-4000-8000-000000000001",
        "expectedRevision": 1
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/private-ai/v1/documents/doc-procedure/index',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '8a000001-0000-4000-8000-000000000001',
            'expectedRevision': 1,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/private-ai/v1/documents/doc-procedure/index');
    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#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/private-ai/v1/documents/doc-procedure/index");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "expectedRevision": 1
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "8a000001-0000-4000-8000-000000000001",
      "status": "accepted",
      "aggregateId": "doc-procedure",
      "aggregateRevision": 2
    }