query

Embed
Preview of the card
<a href="https://lucida.15-204-158-166.sslip.io/docs/ref-query"><img src="https://lucida.15-204-158-166.sslip.io/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/6b9f02b1-3d03-4964-99f8-d70e34c6b457/social-card.svg?v=3e7ae33eec8b" alt="query" width="600" height="315"></a>
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/correlation_exclusions

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/correlation_exclusions"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "events": [
    "string"
  ],
  "properties": [
    "string"
  ]
}
Schema
eventsstring[]
Event names left out of event correlation.
propertiesstring[]
Property keys left out of property correlation.
404
PUThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/correlation_exclusions

Parameters

project_idstringpathrequired

Request body

application/json
eventsstring[]
Event names left out of event correlation.
propertiesstring[]
Property keys left out of property correlation.
{
  "events": [
    "string"
  ],
  "properties": [
    "string"
  ]
}

Code samples

cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/correlation_exclusions" \
  -H "Content-Type: application/json" \
  -d '{"events":["string"],"properties":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoint-usage

Parameters

project_idstringpathrequired
fromstringquery
tostringquery
endpointstringquery
modestringquery
cache | direct | materialized | rejected
breakdownstringquery
endpoint | key | mode

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoint-usage"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {data: UsageRow[]} per day and breakdown value (last 30 days by default)
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of QueryEndpoint, newest first
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
namestringrequired
notestring
queryobjectrequired
Any Query IR document; becomes version 1.
refresh_every_minutesinteger
Recompute this often (5 to 10080 minutes); omit for on-demand only.
slugstringrequired
Lowercase letters, digits and dashes, 1 to 63 characters.
variablesobject[]
Variable definitions [{name, type, default?, required?, description?}] for {variables.name} in a SQL query; type is string, number, boolean, date, uuid or string_list.
{
  "description": "string",
  "name": "string",
  "note": "string",
  "query": {},
  "refresh_every_minutes": 0,
  "slug": "string",
  "variables": [
    {}
  ]
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","name":"string","note":"string","query":{},"refresh_every_minutes":0,"slug":"string","variables":[{}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
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
activebooleanrequired
Inactive endpoints answer 404 to callers.
created_atstringrequired
created_bystring
current_versionintegerrequired
Version served when a caller names none.
descriptionstringrequired
idstringrequired
last_errorstring
last_refresh_atstring
materialization_errorstring
materialization_statusstring
pending | running | completed | failed; null when never materialized.
materializedbooleanrequired
Serve from precomputed rows (refreshed on the schedule) instead of running the query.
materialized_atstring
materialized_versioninteger
namestringrequired
refresh_every_minutesinteger
Refresh the current version this often; null = only on request.
slugstringrequired
updated_atstringrequired
400
403
404
409 Slug taken
422
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}

Parameters

project_idstringpathrequired
slugstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404
DELETEhttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}

Parameters

project_idstringpathrequired
slugstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
PATCHhttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}

Parameters

project_idstringpathrequired
slugstringpathrequired

Request body

application/json
descriptionstring
namestringrequired
refresh_every_minutesinteger
{
  "description": "string",
  "name": "string",
  "refresh_every_minutes": 0
}

Code samples

cURL
curl -X PATCH "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","name":"string","refresh_every_minutes":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
PUThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/active

Parameters

project_idstringpathrequired
slugstringpathrequired

Request body

application/json
activebooleanrequired
{
  "active": true
}

Code samples

cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/active" \
  -H "Content-Type: application/json" \
  -d '{"active":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/history

Parameters

project_idstringpathrequired
slugstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/history"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {data: AuditEntry[]}, newest 200 changes
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/logs

Parameters

project_idstringpathrequired
slugstringpathrequired
levelstringquery
info | error
qstringquery
Text in the error, path or execution id
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/logs"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of EndpointRun, newest first
404
PUThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/endpoints/{slug}/materialization

Parameters

project_idstringpathrequired
slugstringpathrequired

Request body

application/json
enabledbooleanrequired
{
  "enabled": true
}

Code samples

cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/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

Same as 201 · POST /v1/projects/{project_id}/endpoints

400 Query not eligible (the detail says why)
403
404

Updated