curl --request POST \
--url https://api.dynamosql.com/v1/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sql": "SELECT * FROM myschema.orders LIMIT 10",
"mode": "execute",
"options": {
"maxRows": 10
}
}
'
{
"success": true,
"data": {
"data": [
[
1,
"Alice",
"alice@example.com"
],
[
2,
"Bob",
"bob@example.com"
]
],
"columns": [
"id",
"name",
"email"
],
"firstRowIdx": 0,
"resumeIdx": 10,
"planTime": 3,
"execTime": 47
},
"error": "<string>",
"detailedError": "<string>"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}API Reference
Query
Run or plan SQL queries against DynamoDB.
POST
/
v1
/
query
curl --request POST \
--url https://api.dynamosql.com/v1/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sql": "SELECT * FROM myschema.orders LIMIT 10",
"mode": "execute",
"options": {
"maxRows": 10
}
}
'
{
"success": true,
"data": {
"data": [
[
1,
"Alice",
"alice@example.com"
],
[
2,
"Bob",
"bob@example.com"
]
],
"columns": [
"id",
"name",
"email"
],
"firstRowIdx": 0,
"resumeIdx": 10,
"planTime": 3,
"execTime": 47
},
"error": "<string>",
"detailedError": "<string>"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}{
"success": false,
"error": "Parse error near 'SELEKT'",
"detailedError": "Parse error at line 1, column 1: unexpected token 'SELEKT', expected SELECT"
}Required scope:
queryBefore You Start
- See Query Modes for when to use
executevsplanand what each response field means. - See Pagination for how to page through large result sets using
maxRowsandresumeIdx. - See Response Formats to choose between row arrays and key-value objects.
- See the SQL Reference for the full list of supported SQL features and current limitations.
Authentication
All requests require a bearer token obtained fromPOST /v1/auth/token. Pass it in the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKEN
query scope.Authorizations
Body
application/json
Response
Query succeeded or returned a structured query error envelope.
- Option 1
- Option 2