Data lake
List saved queries
Return saved lake queries for an instance, including each query’s schedule when one is set.
GET
/
data
/
lake
/
queries
curl -X GET 'https://api.cloud.blnkfinance.com/data/lake/queries?instance_id=YOUR_INSTANCE_ID' \
-H 'X-blnk-key: CLOUD_API_KEY'
{
"data": [
{
"id": "lake_query_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"instance_id": "instance_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"owner_user_id": "user_01K4EX0BRXHNNGCRVT2TPNK07W",
"name": "Applied volume by currency",
"description": "APPLIED transaction counts by currency",
"sql": "SELECT currency, COUNT(*) AS txn_count FROM transactions GROUP BY currency LIMIT 1000",
"range_mode": "fixed",
"start_date": "2026-08-01T00:00:00Z",
"end_date": "2026-08-31T00:00:00Z",
"rolling_days": 0,
"schedule": {
"id": "lake_query_schedule_6e6feddd-930b-4e38-8ba1-1a3eee659bb3",
"query_id": "lake_query_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"cron_expression": "0 9 * * *",
"timezone": "America/New_York",
"enabled": true,
"next_run_at": "2026-08-16T13:00:00Z"
},
"created_at": "2026-08-12T09:28:16.864765Z",
"updated_at": "2026-08-12T09:28:16.864765Z"
}
]
}
This endpoint returns saved queries for one instance, newest first (
updated_at descending). Each item includes the saved SQL, how Cloud picks the date range, and the schedule when one is set.
Authorization
Blnk Cloud APIs support any one of the following authentication methods. All of them work with yourCLOUD_API_KEY or OAUTH_ACCESS_TOKEN.
Pass X-blnk-key: CLOUD_API_KEY or X-blnk-key: OAUTH_ACCESS_TOKEN.
Query parameters
curl -X GET 'https://api.cloud.blnkfinance.com/data/lake/queries?instance_id=YOUR_INSTANCE_ID' \
-H 'X-blnk-key: CLOUD_API_KEY'
string
required
Unique id of the instance (
instance_...). Get it from get instance details. Do not pass deployment_id.Response
{
"data": [
{
"id": "lake_query_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"instance_id": "instance_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"owner_user_id": "user_01K4EX0BRXHNNGCRVT2TPNK07W",
"name": "Applied volume by currency",
"description": "APPLIED transaction counts by currency",
"sql": "SELECT currency, COUNT(*) AS txn_count FROM transactions GROUP BY currency LIMIT 1000",
"range_mode": "fixed",
"start_date": "2026-08-01T00:00:00Z",
"end_date": "2026-08-31T00:00:00Z",
"rolling_days": 0,
"schedule": {
"id": "lake_query_schedule_6e6feddd-930b-4e38-8ba1-1a3eee659bb3",
"query_id": "lake_query_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"cron_expression": "0 9 * * *",
"timezone": "America/New_York",
"enabled": true,
"next_run_at": "2026-08-16T13:00:00Z"
},
"created_at": "2026-08-12T09:28:16.864765Z",
"updated_at": "2026-08-12T09:28:16.864765Z"
}
]
}
array
Saved queries on this instance, newest first.
Show Query properties
Show Query properties
string
Unique id of this saved query (
lake_query_...). Pass it as saved_query_id on Create new query, or as id on get, update, delete, and schedule.string
Unique id of the instance (
instance_...) this query is bound to.string
User who created the query. Anyone in the workspace can run it. Only this owner or an admin can update, delete, or schedule it.
string
Label shown in Insights and copied onto query runs that come from this query. Maximum 160 characters.
string
Optional note about what the query returns. Maximum 1000 characters. Empty string when you omit it.
string
Read-only DuckDB
SELECT or WITH Cloud runs each time you execute this query. Same table and statement rules as Create new query.string
How Cloud picks the lake date range when the query runs.
fixed uses the stored start_date and end_date. rolling uses the last rolling_days days, resolved at run time.timestamp
First day of lake history for a
fixed query. Omitted when range_mode is rolling.timestamp
Last day of lake history for a
fixed query. Must be after start_date. Omitted when range_mode is rolling.integer
Number of days of lake history to open when
range_mode is rolling (1 to 3650). 0 when the query is fixed.object
Cron schedule Cloud uses to run this query automatically. Present only after you set a schedule.
Show Schedule properties
Show Schedule properties
string
Unique id of the schedule (
lake_query_schedule_...).string
Saved query this schedule belongs to (
lake_query_...).string
Five-field cron that says when Cloud starts a query run. Example:
0 9 * * * is every day at 09:00 in timezone.string
IANA timezone Cloud uses to interpret the cron, such as
America/New_York. next_run_at is still returned in UTC.boolean
Whether Cloud will fire the schedule.
false keeps the schedule stored but skips runs.timestamp
Next time Cloud will start a query run for this schedule, in UTC.
timestamp
When Cloud last started a query run from this schedule. Omitted until the first fire.
timestamp
When the saved query was first created.
timestamp
When the saved SQL, name, description, or date range was last changed. List order uses this field.
Need help?
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.Was this page helpful?
⌘I
curl -X GET 'https://api.cloud.blnkfinance.com/data/lake/queries?instance_id=YOUR_INSTANCE_ID' \
-H 'X-blnk-key: CLOUD_API_KEY'
{
"data": [
{
"id": "lake_query_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"instance_id": "instance_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"owner_user_id": "user_01K4EX0BRXHNNGCRVT2TPNK07W",
"name": "Applied volume by currency",
"description": "APPLIED transaction counts by currency",
"sql": "SELECT currency, COUNT(*) AS txn_count FROM transactions GROUP BY currency LIMIT 1000",
"range_mode": "fixed",
"start_date": "2026-08-01T00:00:00Z",
"end_date": "2026-08-31T00:00:00Z",
"rolling_days": 0,
"schedule": {
"id": "lake_query_schedule_6e6feddd-930b-4e38-8ba1-1a3eee659bb3",
"query_id": "lake_query_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"cron_expression": "0 9 * * *",
"timezone": "America/New_York",
"enabled": true,
"next_run_at": "2026-08-16T13:00:00Z"
},
"created_at": "2026-08-12T09:28:16.864765Z",
"updated_at": "2026-08-12T09:28:16.864765Z"
}
]
}