Send query to stats service
Query parameters
chain
Request body
Example request
{
"project_id": 1647024163,
"name": "test query",
"query": "select id from test",
"gpt_message": "give me random id from accounts table",
"repeat_interval": 10
}Response
Query result
Example response
{
"id": "03cfc582-b1c3-410a-a9a7-1f3afe326b3b",
"name": "test query",
"query": {
"name": "test query",
"sql": "select id from accounts limit 1",
"gpt_message": "give me random id from accounts table",
"repeat_interval": 10
},
"url": "https://sql.io/123.csv",
"meta_url": "https://sql.io/123_meta.csv",
"spent_time": 100,
"last_repeat_date": 1690889913000,
"total_repetitions": 5,
"total_usd_cost": 1000000000,
"usd_cost": 1000000000,
"error": "invalid something",
"date_create": 1690889913000
}Changes
Changed in 13 of the 50 revisions of this API.3329
- ○
added the non-success response with the status
402response-non-success-status-added
- ○
- ▲
removed the required property
estimate/approximate_costfrom the response with the201statusresponse-required-property-removed
- ●
removed the optional property
costfrom the response with the201statusresponse-optional-property-removed
- ●
removed the optional property
total_costfrom the response with the201statusresponse-optional-property-removed
- ○
added the optional property
total_usd_costto the response with the201statusresponse-optional-property-added
- ○
added the optional property
usd_costto the response with the201statusresponse-optional-property-added
- ○
added the required property
estimate/approximate_usd_costto the response with the201statusresponse-required-property-added
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
added the non-success response with the status
409response-non-success-status-added
- ○
- ○
added the new optional request property
namenew-optional-request-property
- ○
added the optional property
nameto the response with the201statusresponse-optional-property-added
- ○
added the optional property
query/nameto the response with the201statusresponse-optional-property-added
- ○
- ○
added the new optional
queryrequest parameterchainnew-optional-request-parameter
- ○
added the required property
testnetto the response with the201statusresponse-required-property-added
- ○
- ●
added the new
chat_gpt_queryenum value to thetyperesponse property for the response status201response-property-enum-value-added
- ●
- ○
added the optional property
last_repeat_dateto the response with the201statusresponse-optional-property-added
- ○
added the optional property
total_costto the response with the201statusresponse-optional-property-added
- ○
added the optional property
total_repetitionsto the response with the201statusresponse-optional-property-added
- ○
- ○
added the optional property
estimate/explainto the response with the201statusresponse-optional-property-added
- ○
- ○
added the new optional request property
gpt_messagenew-optional-request-property
- ○
the request property
querybecame optionalrequest-property-became-optional
- ○
added the optional property
is_gptto the response with the201statusresponse-optional-property-added
- ○
added the optional property
query/gpt_messageto the response with the201statusresponse-optional-property-added
- ○
- ○
added the optional property
query/repeat_intervalto the response with the201statusresponse-optional-property-added
- ○