v49

OpenAPI 3.1.1raw.githubusercontent.com2026-04-2200132.4 KB
stats_service

Get sql history queries

get/api/v1/services/stats/queries/history

Query parameters

project_idinteger required

Project ID

offsetinteger
Example:100

Offset

limitinteger
Example:50

Limit

typeStatsQueryType[]
is_repetitiveboolean
chain'mainnet' | 'testnet'

chain

Response

History of queries

countinteger required

Example response

{
  "count": 10,
  "items": [
    {
      "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
    }
  ]
}