Inspector
Query Database Rows
Read a page of rows from an actor database table or view.
The inspector API is subject to change without notice. Do not build production integrations on it.
GET https://rivet.example.com/gateway/{actor}/inspector/database/rows
Examples
curl "https://rivet.example.com/gateway/$ACTOR_ID/inspector/database/rows?table=users&limit=100&offset=0" \
-H "Authorization: Bearer $INSPECTOR_TOKEN"
const endpoint = "https://api.rivet.dev";
const query = new URLSearchParams({
table: "users",
limit: "100",
offset: "0",
});
const response = await fetch(
`${endpoint}/gateway/${process.env.ACTOR_ID}/inspector/database/rows?${query}`,
{ headers: { Authorization: `Bearer ${process.env.INSPECTOR_TOKEN}` } },
);
console.log(await response.json());
export {};
Authentication
Inspector endpoints do not accept namespace tokens. Send the actor’s inspector token as a bearer token in the Authorization header.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
actor | string | Yes | Actor ID, actor ID with an inline token ({actor_id}@{token}), or actor name combined with the rvt-* query parameters. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table or view to read. |
limit | integer | No | Maximum rows to return. |
offset | integer | No | Rows to skip. |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | No | Bearer token for inspector authentication. Required in production, optional in development. |
Responses
200
The selected rows.
| Field | Type | Description |
|---|---|---|
rows | object[] |
{
"rows": [
{}
]
}
401
The inspector token is missing or invalid.