curl --request POST \
    --url https://api.brewit.ai/v2/resources/3fa85f64-5717-4562-b3fc-2c963f66afa6/queries \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer access-token' \
    --data '{
        "query": "user query",
        "sql": "SELECT * FROM table WHERE column = 'value'",
        "explanation": "explanation of the query"
    }'
{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "query": "user query",
    "sql": "SELECT * FROM table WHERE column = 'value'",
    "explanation": "explanation of the query",
    "created_at": "2024-01-02T03:04:05.000000",
    "updated_at": "2024-01-02T03:04:05.000000"
}

Brewit API is coming soon. Check our roadmap for more.

resource_id
string
required

The identifier of the resource to which the query belongs. Make sure the actual query can be executed on the resource.

Body Parameters

query
string
required

The name/title of the query that briefly describes its purpose.

sql
string
required

The SQL query to be executed on the resource.

explanation
string

An explanation of the query, explaining its purpose and how it should be used.