Skip to main content
GET
/
documents
/
{data_source_id}
List documents for a data source
curl --request GET \
  --url https://{subdomain}.withrealm.com/api/external/alpha/documents/{data_source_id} \
  --header 'Authorization: Bearer <token>'
{
  "documents": [
    {
      "title": "<string>",
      "content": "<string>",
      "contentType": "markdown",
      "id": "<string>",
      "url": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "meta": {},
      "readAccess": [
        "<string>"
      ]
    }
  ],
  "nextCursor": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.withrealm.com/llms.txt

Use this file to discover all available pages before exploring further.

These endpoints require a custom API data source. See Custom API for setup instructions.

Pagination

The endpoint uses cursor-based pagination. By default, only document IDs are returned. Use the fields parameter to request additional fields like title, content, url, and meta.
  1. Make a request without a cursor to get the first page of results
  2. Use the nextCursor from the response to get the next page
  3. Continue until nextCursor is not present

Rate Limits

600 requests per minute.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

data_source_id
string
required

Query Parameters

fields
enum<string>[]

Comma-separated list of fields to return. If not provided, only document IDs are returned.

Available options:
id,
title,
content,
content_type,
url,
document_created_at,
document_updated_at,
meta
cursor
string

Cursor for pagination. Required for fetching results beyond the first 100 documents.

Pattern: ^\d+$
limit
number
default:20

Number of documents to return per page. Defaults to 20, maximum 100.

Required range: 1 <= x <= 100

Response

Success

documents
object[]
required
nextCursor
string