Submit Asynchronous Blockchain SQL Job
Accepts a read-only SQL query for durable background execution. Returns a stable job and ClickHouse query ID immediately. Reusing the same Idempotency-Key, or submitting SQL equivalent after whitespace and operator-spacing normalization with the same max_rows while its retained job exists, returns the existing job without starting another execution. Accepted jobs remain queued while the owner's cluster-wide ClickHouse execution budget is occupied by synchronous or asynchronous work.
Headers
Stable client-generated key. Reusing it returns the existing job without starting another query.
Stable client-generated key. Reusing it returns the existing job without starting another query.
Request body
Example request
{
"$schema": "https://example.com/schemas/HumaOnchainSQLJobCreateInputBody.json",
"max_rows": 1000,
"sql": "SELECT block_date, project, symbol, apy FROM agent.ethereum_yields_daily WHERE block_date >= today() - 30 ORDER BY apy DESC"
}Response
Accepted
Example response
{
"$schema": "https://example.com/schemas/DataObjectResponseAsyncSQLJobResponse.json"
}Changes
No recorded changes to this endpoint across all 2 revisions of this API.