API Reference

Pagination

Lists that can grow without bound are returned in pages. Each list endpoint documents the parameters it accepts, its default page size, and its maximum. Lists that are naturally bounded — the workspaces you can see, the connectors available for a data connection — are returned whole.

Two styles are in use, and an endpoint uses one or the other:

  • Page-based. page selects a 1-based page and limit sets its size. Responses include total and hasMore. List chat sessions is an example.
  • Offset-based. limit sets the page size and offset skips that many items. Responses include total. List generated documents is an example.

Some endpoints accept only limit, to cap how many of the most recent items they return.

Read every page
import os

import requests

url = f"{os.environ['VDF_BASE_URL']}/api/chat-sessions"
headers = {"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"}

page = 1
while True:
    response = requests.get(
        url,
        headers=headers,
        params={"page": page, "limit": 50},
        timeout=30,
    )
    response.raise_for_status()
    body = response.json()
    for session in body["sessions"]:
        print(session["id"], session["title"])
    if not body["hasMore"]:
        break
    page += 1

Ordering and consistency

Each list endpoint documents its order — typically newest first. Pages are positions, not bookmarks: if items are created or deleted while you read, an item can move between pages. For exports and reconciliation, read the pages promptly and de-duplicate by identifier.