insights
GET
https://lucidace.com /v1/projects/{project_id}/insights Scope insight:readParameters
project_idstringpathrequiredqstringquerytagstringqueryfolderstringqueryfolder_idstringquerya folder id, or
none for insights in no folderfavoritedbooleanquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/insights"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of Insight, newest first
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"favorited": true,
"folder": "string",
"folder_id": "string",
"id": "string",
"kind": "string",
"name": "string",
"project_id": "string",
"query": {},
"settings": {},
"tags": [
"string"
],
"updated_at": "2024-01-01T00:00:00Z",
"version": 0
}
],
"next_cursor": "string"
}Schema
dataInsight[]requiredShow child parameters
created_atstringrequiredcreated_bystringdescriptionstringrequiredfavoritedbooleanrequiredWhether the calling user favorited it (always false for API keys).
folderstringrequiredfolder_idstringThe folder it sits in (see
object_acl); null = top level. folder is the legacy text label.idstringrequiredkindstringrequirednamestringrequiredproject_idstringrequiredqueryobjectrequiredsettingsobjectrequiredDisplay settings (
display, overlay): presentation only, not part of the query or its versions.tagsstring[]requiredupdated_atstringrequiredversionintegerrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/insights Scope insight:writeParameters
project_idstringpathrequiredRequest body
application/json
descriptionstringfolderstringnamestringrequiredqueryobjectrequiredQuery IR document (
{"kind": ...}); JSON Schema: GET /v1/query.schema.json; examples: help page query-api.settingsobjectDisplay settings, an object of at most 16 KB (
display, overlay, chart: units, axes, goal lines, legend, colours; retention / funnel display options); presentation only.tagsstring[]{
"description": "string",
"folder": "string",
"name": "string",
"query": {},
"settings": {},
"tags": [
"string"
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/insights" \
-H "Content-Type: application/json" \
-d '{"description":"string","folder":"string","name":"string","query":{},"settings":{},"tags":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"favorited": true,
"folder": "string",
"folder_id": "string",
"id": "string",
"kind": "string",
"name": "string",
"project_id": "string",
"query": {},
"settings": {},
"tags": [
"string"
],
"updated_at": "2024-01-01T00:00:00Z",
"version": 0
}Schema
created_atstringrequiredcreated_bystringdescriptionstringrequiredfavoritedbooleanrequiredWhether the calling user favorited it (always false for API keys).
folderstringrequiredfolder_idstringThe folder it sits in (see
object_acl); null = top level. folder is the legacy text label.idstringrequiredkindstringrequirednamestringrequiredproject_idstringrequiredqueryobjectrequiredsettingsobjectrequiredDisplay settings (
display, overlay): presentation only, not part of the query or its versions.tagsstring[]requiredupdated_atstringrequiredversionintegerrequiredHeaders
ETagstring400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/insights/{id} Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredcanonicalstringquery1 or true: keys sorted at every levelCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/insights/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Carries an
ETag (hash of the canonical JSON, key order ignored); If-None-Match gives 304Same as 201 · POST /v1/projects/{project_id}/insights
Headers
ETagstring304
404
DELETE
https://lucidace.com /v1/projects/{project_id}/insights/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/insights/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
PATCH
https://lucidace.com /v1/projects/{project_id}/insights/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
descriptionstringfavoritedbooleanFavorite or unfavorite for the calling user (ignored for API keys).
folderstringfolder_idstringMove into the folder with this id;
null takes the insight out of its folder (same checks as PUT /objects/insight/{id}/folder).namestringqueryobjectsettingsobjecttagsarray{
"description": "string",
"favorited": true,
"folder": "string",
"folder_id": "string",
"name": "string",
"query": {},
"settings": {},
"tags": [
"string"
]
}Code samples
cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/insights/{id}" \
-H "Content-Type: application/json" \
-d '{"description":"string","favorited":true,"folder":"string","folder_id":"string","name":"string","query":{},"settings":{},"tags":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
GET
https://lucidace.com /v1/projects/{project_id}/insights/{id}/chart.svg Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredmodestringquerylight (default) or dark: picks the theme's colours and the background.hide_legendbooleanqueryHide the legend (it is drawn for two or more series otherwise).
refreshbooleanqueryBypass the insight result cache.
Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/insights/{id}/chart.svg"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 The chart in the project's theme
"string"
400
404
422 The result is not a time series (show it as a table)
503
GET
https://lucidace.com /v1/projects/{project_id}/insights/{id}/versions Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/insights/{id}/versions"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of InsightVersion, newest first
Example
{
"data": [
{
"changed_by": "string",
"created_at": "2024-01-01T00:00:00Z",
"description": "string",
"insight_id": "string",
"name": "string",
"query": {},
"version": 0
}
],
"next_cursor": "string"
}Schema
dataInsightVersion[]requiredShow child parameters
changed_bystringcreated_atstringrequireddescriptionstringrequiredinsight_idstringrequirednamestringrequiredqueryobjectrequiredversionintegerrequirednext_cursorstring404
GET
https://lucidace.com /v1/projects/{project_id}/surveys Scope insight:readParameters
project_idstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/surveys"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of SurveySummary (last 365 days of $survey_response events), ordered by survey_id
Example
{
"data": [
{
"ignored": 0,
"last_response_at": "string",
"responses": 0,
"survey_id": "string"
}
],
"next_cursor": "string"
}Schema
dataSurveySummary[]requiredShow child parameters
ignoredintegerrequiredAnswers the NPS / rating score ignores (NPS not a whole 0..10, rating not a number).
last_response_atstringrequiredRFC 3339 time of the newest answer.
responsesintegerrequiredAnswers, counted once per
(survey_id, submission_id, question_id).survey_idstringrequirednext_cursorstring400
404
503
Updated