SQL API (Serverless)
Run read-only SQL queries against your organization’s data over HTTPS. Queries execute on serverless compute managed by Amigo; you do not need to provision or operate any infrastructure.
Access & Permissions
Feature must be enabled for your organization by Amigo (request via Slack).
Beta: The SQL API is in active development; behavior and limits may change.
Endpoint requires elevated privileges; use an admin or service account token per your internal security policy.
Standard Amigo authentication applies (Authorization: Bearer ).
Endpoint
Method:
POST
Path:
/v1/<YOUR-ORG-ID>/admin/sql_query
Auth:
Authorization: Bearer <AUTH-TOKEN-OF-USER>
Content-Type:
application/json
Request Body
sql_query
(string): A read-onlySELECT
statement over your data.async_query
(boolean): Currently onlyfalse
is supported for synchronous queries.
Only SELECT
is allowed. DDL/DML and administrative statements are rejected.
Query Execution Flow
Example Request
curl --request POST \
--url "https://<REGIONAL-BASE-URL>/v1/<YOUR-ORG-ID>/admin/sql_query" \
--header "Authorization: Bearer <AUTH-TOKEN-OF-USER>" \
--header "Content-Type: application/json" \
--data '{
"sql_query": "SELECT * FROM <TABLE> LIMIT 10",
"async_query": false
}'
Replace <REGIONAL-BASE-URL>
with your region’s API host (see Getting Started → Regions & Endpoints) and <TABLE>
with a table available to your organization.
Response
On success, the response contains execution metadata, columns, and rows. For synchronous queries, at most 1000 rows are returned per request.
{
"execution_time_ms": 1234,
"truncated": false,
"columns": [
{ "name": "id", "type": "STRING" },
{ "name": "created_at", "type": "TIMESTAMP" }
],
"result": [
["a1b2c3", "2025-01-20T12:34:56Z"],
["d4e5f6", "2025-01-21T08:15:42Z"]
]
}
Limits and Behavior
Read-only:
SELECT
statements only; DDL/DML and admin commands are not allowed.Result size: Up to 1000 rows returned for synchronous requests.
Timeout: 30 seconds per synchronous query.
Rate limiting: 6 requests per minute per user.
JDBC/ODBC Connectivity (Optional)
If you plan to connect BI tools or ETL platforms via standard database drivers:
Private preview: JDBC/ODBC connectivity is available only to select customers.
Request consideration by messaging your Amigo representative via Slack; availability is limited and not guaranteed for all tenants.
You will receive driver and connection details (host/URL, authentication method, and any required parameters).
Configure your client/tool using the provided details and your admin/service account credentials or token.
Last updated
Was this helpful?