Skip to main content
POST
/
v1
/
database
/
query
/
async
curl --request POST \
  --url "https://api.roe-ai.com/v1/database/query/async/?organization_id=YOUR_ORG_ID" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "SELECT * FROM my_table LIMIT 10"
  }'
{
  "query": "SELECT * FROM users LIMIT 10",
  "worksheet_id": "123e4567-e89b-12d3-a456-426614174000",
  "use_admin": false
}
curl --request POST \
  --url "https://api.roe-ai.com/v1/database/query/async/?organization_id=YOUR_ORG_ID" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "query": "SELECT * FROM my_table LIMIT 10"
  }'

Query Parameters

worksheet_id
string

Worksheet ID. Required if organization_id is not provided.

Body

Serializer for creating worksheet queries.

query
string
required
Minimum string length: 1
worksheet_id
string<uuid> | null

Worksheet ID to associate with the query

use_admin
boolean
default:false

Whether to use admin privileges

Response

Query object

id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
finished_at
string<date-time> | null
required
query
string
required
query_task_id
string | null
required
query_task_status
string | null
required
error
string | null
required
ai_summary
string | null
required
worksheet
object
organization
object

Simple organization serializer for nested use.

creator
object