This feature is only available in the Enterprise version

Data lake

List query runs

Return recent executions of lake SQL for an instance.

GET/data/lake/query-runs

A query run is one execution of lake SQL. Cloud creates a run when you create a new query with sql or saved_query_id, or when a scheduled saved query fires.

Each run stores a snapshot of the SQL and date range that actually ran, the status of that execution, and a preview of the result rows. The preview is bounded: at most 1000 rows, or less if the preview exceeds 2 MB. It is not the full result set. Editing a saved query later does not change past runs.

This endpoint returns recent runs for one instance, newest first. Use the query parameters to narrow by saved query, status, or how the run started.

Enterprise authentication

Send these requests to https://api.cloud.blnkfinance.com on Blnk Cloud. On a self-hosted Enterprise deployment, send them to ENTERPRISE_PUBLIC_URL.

Pass an Enterprise API key, or an OAuth access token, in the X-blnk-key header. Create the key in Enterprise API keys, or issue a token with Enterprise OAuth.

This credential comes from the Cloud or Enterprise workspace. A Core API key belongs to the Core instance.

X-blnk-keystringrequiredheader

Enterprise API key, or an OAuth access token.

Query parameters

instance_idstringrequiredquery

Unique id of the instance (instance_...). Get it from get instance details. Do not pass deployment_id.

query_idstringquery

Return only runs that came from this saved query (lake_query_...). Omit it to include every run on the instance, including ad-hoc SQL that was not saved.

statusstringquery

Return only runs in this state: running (still executing), succeeded (finished with rows or an empty result), or failed (the SQL did not complete).

triggerstringquery

Return only runs started this way: manual (you called Create new query) or scheduled (a saved-query schedule fired).

cursorstringquery

ID of the last run from the previous response (next_cursor). Cloud returns the next page after that run. Omit it on the first request.

limitintegerquery

Maximum number of runs to return. Defaults to 50. Maximum 100. Values outside that range are treated as 50.

Response

dataarray

Query runs for this instance, newest first.

next_cursorstring

ID of the last run on this page. Pass it as cursor on the next request to continue. Empty when there are no more runs.