SQL API (Serverless)
Run read-only SQL queries against organization tables over HTTPS with serverless compute.
Run read-only SQL queries against your organization's data over HTTPS. Queries execute on serverless compute managed by Concurrence, so you don't need to provision or operate any infrastructure.
Access and Permissions
The feature must be enabled for your organization by Concurrence (request via Slack).
Beta: the SQL API is in active development, so behavior and limits may change.
The endpoint requires elevated privileges; use an admin or service account token per your internal security policy.
Standard Concurrence authentication applies (
Authorization: Bearer <token>).
Endpoint Reference
The embedded contract defines the authenticated request body and response schema. The current implementation accepts read-only SELECT statements and supports only synchronous execution with async_query: false.
Execute a read-only SQL query on Amigo's databases for the specified organization.
Permissions
This endpoint requires the authenticated user to have greater privileges than the DefaultAdministratorRole.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]The SQL query to execute.
Whether the query is asynchronous. If true, a signed URL will be returned to download the results once the query is complete. If false, the results will be returned in the response, but at most 1000 rows will be returned, and the query is subject to a 30 second execution timeout.
Succeeded.
The time taken to execute the query in milliseconds.
Whether the result was truncated due to the row limit.
This endpoint is not supported in the current environment, or the SQL query is invalid.
Invalid authorization credentials.
Missing required permissions.
The specified organization does not exist.
The supplied query cannot be executed within the time limit.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 6 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/admin/sql_query HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 39
{
"sql_query": "text",
"async_query": true
}{
"execution_time_ms": 1,
"result": [
[]
],
"truncated": true,
"columns": [
{
"name": "text",
"type": "text"
}
]
}Query Execution Flow
Example Request
Replace <REGIONAL-BASE-URL> with your region's API host (see Getting Started → Regions & Endpoints) and <TABLE> with a table available to your organization.
Limits and Behavior
Read-only:
SELECTstatements only. DDL, DML, and admin commands are not allowed.Result size: up to 1000 rows per synchronous request.
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 Concurrence representative via Slack. Availability is limited and not guaranteed for all tenants.
You will receive driver and connection details (host or URL, authentication method, and any required parameters).
Configure your client or tool using the details provided, along with your admin or service account credentials.
Last updated
Was this helpful?

