title = “Wrapper v1 Data Source”

Wrapper v1 Data Source

Wrapper v1 defines a minimal contract for partner data sources used with /rlm/execute.
Partners expose three HTTP endpoints and map their data into consistent JSON shapes.

Endpoints

All endpoints are POST under your base_url:

  • /search — query and paginate items
  • /get — fetch a single item’s metadata
  • /content — fetch or export item content

Request and Response Shapes

Request:

{"query":"Find contracts","filters":{"type":"document"},"page":{"limit":25}}

Response:

{"items":[{"id":"file_1","title":"Master Services Agreement"}],"next_cursor":"cursor_1"}

/get

Request:

{"id":"file_1"}

Response:

{"id":"file_1","title":"Master Services Agreement","mime_type":"application/pdf"}

/content

Request:

{"id":"file_1","format":"text","max_bytes":200000}

Response:

{"id":"file_1","format":"text","content":"...","truncated":true}

Error Shape

{"error":{"code":"not_found","message":"missing"}}

Notes

  • Use stable IDs and pagination.
  • Keep responses small and deterministic.
  • Enforce limits in your wrapper (max requests, bytes, timeouts).