Records

Run a read-only SQL query over the records of a space

POST
/spaces/{space_id}/records/sql

Run one read-only SQL SELECT over the record types of a Space and get columns plus rows. Tables are the type keys and relation names from records.schema, columns are the field keys; the database joins and aggregates across types, so sums, counts and comparisons need one call.

Authorization

bearerApiKey
AuthorizationBearer <token>

Create a scoped API key in the Adlass settings.

In: header

Path Parameters

space_id*string

Resource identifier: space_id.

Formatuuid

Header Parameters

X-Request-Id?string

Optional correlation identifier.

Lengthlength <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/spaces/123e4567-e89b-42d3-a456-426614174000/records/sql" \  -H "Content-Type: application/json" \  -d '{    "sql": "example"  }'
{}