query
GET
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/logs Scope insight:readParameters
project_idstringpathrequiredslugstringpathrequiredlevelstringqueryinfo | error
qstringqueryText in the error, path or execution id
limitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/logs"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of EndpointRun, newest first
404
PUT
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/materialization Scope insight:writeParameters
project_idstringpathrequiredslugstringpathrequiredRequest body
application/json
enabledbooleanrequired{
"enabled": true
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/materialization" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Switched; the first materialization starts immediately
Example
{
"active": true,
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"current_version": 0,
"description": "string",
"id": "string",
"last_error": "string",
"last_refresh_at": "2024-01-01T00:00:00Z",
"materialization_error": "string",
"materialization_status": "string",
"materialized": true,
"materialized_at": "2024-01-01T00:00:00Z",
"materialized_version": 0,
"name": "string",
"refresh_every_minutes": 0,
"slug": "string",
"updated_at": "2024-01-01T00:00:00Z"
}Schema
activebooleanrequiredInactive endpoints answer 404 to callers.
created_atstringrequiredcreated_bystringcurrent_versionintegerrequiredVersion served when a caller names none.
descriptionstringrequiredidstringrequiredlast_errorstringlast_refresh_atstringmaterialization_errorstringmaterialization_statusstringpending | running | completed | failed; null when never materialized.materializedbooleanrequiredServe from precomputed rows (refreshed on the schedule) instead of running the query.
materialized_atstringmaterialized_versionintegernamestringrequiredrefresh_every_minutesintegerRefresh the current version this often; null = only on request.
slugstringrequiredupdated_atstringrequired400 Query not eligible (the detail says why)
403
404
GET
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/openapi.json Scope insight:readParameters
project_idstringpathrequiredslugstringpathrequiredversionintegerqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/openapi.json"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OpenAPI 3.0 document for this endpoint, with its variables as a schema
404
POST
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/pin Scope insight:writeParameters
project_idstringpathrequiredslugstringpathrequiredRequest body
application/json
versionintegerrequired{
"version": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/pin" \
-H "Content-Type: application/json" \
-d '{"version":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Rolled back or forward to that version
Same as 200 · PUT /v1/projects/{project_id}/endpoints/{slug}/materialization
403
404
GET
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/result Scope insight:readParameters
project_idstringpathrequiredslugstringpathrequiredversionintegerqueryrefreshbooleanqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/result"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"refreshed_at": "2024-01-01T00:00:00Z",
"result": {},
"slug": "string",
"version": 0
}Schema
refreshed_atstringrequiredresultobjectrequiredA
QueryResult.slugstringrequiredversionintegerrequired404
422
503
POST
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/run Parameters
project_idstringpathrequiredslugstringpathrequiredRequest body
application/json
debugbooleanInclude the compiled
ClickHouse query in the response.limitintegerRows to return (1 to 50000); required with
offset.offsetintegerrefreshstringcache (default: cached or materialized result when present), force (recompute, update the cache) or direct (skip materialized rows and the cache).variablesobjectVariable values by name (
date_from/date_to and breakdown keys are built in).versioninteger{
"debug": true,
"limit": 0,
"offset": 0,
"refresh": "string",
"variables": {},
"version": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/run" \
-H "Content-Type: application/json" \
-d '{"debug":true,"limit":0,"offset":0,"refresh":"string","variables":{},"version":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"cache_hit": true,
"columns": [
"string"
],
"compiled_query": "string",
"computed_at": "2024-01-01T00:00:00Z",
"endpoint": "string",
"execution_id": "string",
"has_more": true,
"materialized_at": "2024-01-01T00:00:00Z",
"mode": "string",
"results": [
[
{}
]
],
"version": 0
}Schema
cache_hitbooleanrequiredcolumnsstring[]requiredcompiled_querystringPresent with
debug: true.computed_atstringrequiredendpointstringrequiredexecution_idstringrequiredExecution id: matches the log entry.
has_morebooleanrequiredMore rows exist past
offset + limit.materialized_atstringmodestringrequiredcache | direct | materializedresultsobject[][]requiredversionintegerrequired400 problem+json with
code (required_variable_missing, variable_not_allowed, invalid_variable_value, invalid_request) and attr403 The key lacks endpoint:read, query:read or admin
404 Unknown, inactive, or disabled version
422
429 Retry-After set
503 Retry-After set
504
GET
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/versions Scope insight:readParameters
project_idstringpathrequiredslugstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/versions"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
{data: QueryEndpointVersion[]}, newest first (an endpoint holds few versions, so no cursor)404
POST
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/versions Scope insight:writeParameters
project_idstringpathrequiredslugstringpathrequiredRequest body
application/json
notestringqueryobjectrequiredvariablesobject[]As on create.
{
"note": "string",
"query": {},
"variables": [
{}
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/versions" \
-H "Content-Type: application/json" \
-d '{"note":"string","query":{},"variables":[{}]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 The new version is current
Same as 200 · PUT /v1/projects/{project_id}/endpoints/{slug}/materialization
400
403
404
422
PATCH
https://lucidace.com /v1/projects/{project_id}/endpoints/{slug}/versions/{version} Scope insight:writeParameters
project_idstringpathrequiredslugstringpathrequiredversionintegerpathrequiredRequest body
application/json
disabledbooleanA disabled version answers 404; the current version cannot be disabled.
notestring{
"disabled": true,
"note": "string"
}Code samples
cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/endpoints/{slug}/versions/{version}" \
-H "Content-Type: application/json" \
-d '{"disabled":true,"note":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"disabled": true,
"last_executed_at": "2024-01-01T00:00:00Z",
"note": "string",
"query": {},
"result": {},
"result_at": "2024-01-01T00:00:00Z",
"variables": [
{}
],
"version": 0
}Schema
created_atstringrequiredcreated_bystringdisabledbooleanrequiredDisabled versions answer 404.
last_executed_atstringnotestringrequiredqueryobjectrequiredresultobjectNewest cached result (a
QueryResult); null before the first run.result_atstringvariablesobject[]required[{name, type, default?, required?, description?}].versionintegerrequired400
403
404
Updated