Manage any arbitrary SQL query
Path: /api/chf/query/raw
Method: POST
Request body:
{
[mandatory] "query": "SELECT * FROM flows.base",
[optional] "settings":
{
"max_execution_time": 1.0,
"timeout_overflow_mode": "throw"
}
}Response:
{
"message": "Success",
"data": {
"uuid": "c8144dc6-8aa0-ae89-1550-542cff5c3bab"
}
}settings defines a query execution time policy. If a query exceeds the specified maximum execution time, it is interrupted, and an error is returned to the FE. Otherwise, the query will be executed again, and the results will be available as usual.
max_execution_time: specifies the maximum allowed time in seconds before a query is interrupted.timeout_overflow_mode: controls the behavior when a query exceeds the specified max_execution_time during execution. It supports the following options:
throw: The query is terminated and a 412 Precondition Failed error is returned.break: The query is terminated but no error is returned. When the FE requests data, the BE returns no data.Path: /api/chf/query/raw/{uuid}
Method: GET
Path parameter:
uuid - received from the previous requestResponse:
{
"message": "Success",
"data": {
"state": "has_next",
"page": [
[
"6a6dca6b-c4fa-2616-ae1d-d84861ee5c06",
"222.140.159.126",
"zharfql.com",
"1726745922"
],
[
"3bf0b438-06ac-290e-665c-7c47b90211a4",
"82.119.161.168",
"isjfhwe.com",
"1726745922"
],
[
"f774ecfc-5161-52dc-e61e-70eaf44624da",
"110.49.247.110",
"kchowpebkw.com",
"1726745922"
],
...
]
}
}state one of:
has_next - there is the next page, it can asked for immediatelyno_page_processing - there is no next page yet, but the query it still being processed, maybe it will appear later; sleep for a bit and try againno_page_no_processing - the query processing has finished and there’s no next page; stoppage contains data in DataTable format.
Path: /api/chf/query/raw/{uuid}
Method: DELETE
Path parameter:
uuid - received from the previous requestResponse:
{
"message": "Successfully interrupted processing the query (5f966c56-6acb-d5c5-7832-eb29b000f333)",
"data": null
}