stats_service
Send query to stats service
post/api/v1/services/stats/query
Query parameters
chain'mainnet' | 'testnet'
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
}