Authenticate and scope a request
SendAuthorization: Bearer <token>. Use an OAuth access token with rooms:connect for the target room, a project API key, or a room participant token. OAuth and API key requests use the principal’s effective room permissions. Participant token requests use the token’s room and API grants. In each case, the caller needs the dataset or SQLite permissions for the requested operation.
The paths below are relative to /projects/{project_id}/rooms/{room_name}. URL-encode each path segment. To select a namespace, send one namespace query parameter per segment, in order. For example, ?namespace=team&namespace=reports selects ["team", "reports"]. Omit the parameter for the root namespace. For dataset operations that accept them, use branch and version to select a catalog branch and table version. Send these selectors in the URL.
Query over HTTP
Dataset SQL runs against the dataset catalog, with an optionaltables array of table references and params_arrow containing base64-encoded Arrow IPC SQL parameters. SQLite SQL targets a single database and accepts an optional params array for positional parameters or object for named parameters.
app in the selected namespace. Direct queries and table searches return application/vnd.apache.arrow.stream. Read Arrow IPC record batches as they arrive. The response can stream without a Content-Length header. Table inspection uses the same media type and returns an Arrow schema.
In Python, the SDK uses the API client’s bearer credential by default. Pass participant_token to either for_room() factory to use a room participant token for that client.
api.datasets.forRoom(...) and api.sqlite.forRoom(...). .NET uses api.Datasets.ForRoom(...) and api.Sqlite.ForRoom(...). In Rust, import meshagent::RoomDataClients and use api.datasets(authorization)?.for_room(...) or api.sqlite(authorization)?.for_room(...). Pass the full authorization header value in Rust.
Dataset routes
Each dataset is a table. The collection root also handles catalog queries and branches.
Use a JSON object for operation arguments such as
{"columns":["obsolete"]}. See Datasets for the SDK operations, including Lance storage connections, versioning, and search.
SQLite routes
The collection contains databases. Table routes sit under the database’stables path.
See SQLite for SQL batch behavior and replication settings, and SQLite recovery for backup and restore.
Query handles
A row-returningopen-query or execute response includes MeshAgent-Query-Id and an Arrow IPC schema in the body. A SQLite batch returns JSON; each query entry has a query_id and schema_base64, and each statement entry has rows_affected. Use the same credential that opened a handle to read or close it.
Use the direct query route to stream rows in one request. Close handles in a
finally block when using the handle-based routes.
Stream writes, watches, and transfers
Table creation and insert routes accept an Arrow IPC request withContent-Type: application/vnd.apache.arrow.stream. The multipart alternative uses multipart/form-data with a JSON options part first, such as {"format":"arrow","mode":"create"} for a create request. A create request can supply an Arrow IPC schema part, followed by Arrow IPC batch parts. Dataset creation also accepts "format":"rows" with JSON rows parts. Use an SDK client to build multipart uploads and stream batches through the request body.
Dataset watches return multipart/mixed. Arrow parts carry metadata in the MeshAgent-Frame header. JSON parts report readiness or an error. Close the response when you finish watching.
SQLite backups return multipart/mixed with SQLite file chunks and a final JSON frame containing the byte count and SHA-256 checksum. A restore uploads multipart/form-data with data chunks of at most 256 KiB and a final JSON digest containing kind: "complete", size, and sha256. The SDK verifies the checksum and restore acknowledgement. Consume the full backup stream before using the backup.
Room data errors generally include a JSON error object with code and message. Authentication and routing errors can come directly from the router. Once a stream has started, an interrupted response can surface as a read error or, for multipart responses, as a terminal JSON error part.