v5

OpenAPI 3.1.02026-08-037720751.3 KB
SQL

Query SQL

Query records and lists with SQL. Your workspace must be on the Enterprise plan in order to access this endpoint.

This endpoint is in beta. We will aim to avoid breaking changes, but small updates may be made as we roll out to more users.

Required scopes: record_permission:read, object_configuration:read.

post/v2/sql

Request body

sqlstring required

The SQL query to be executed.

Example request

{
  "sql": "SELECT * FROM companies WHERE companies.name = 'Fundstack'"
}

Response

Success

Example response

{
  "data": {
    "rows": [
      {
        "record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b",
        "created_at": "2023-01-01T15:00:00.000000000Z",
        "name": "Fundstack",
        "created_by": {
          "type": "workspace-member",
          "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b"
        },
        "domains": [
          "fundstack.com"
        ]
      }
    ]
  }
}