insights

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-insights"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/779dd941-1d44-44e1-a1a0-2950ef8b9779/social-card.svg?v=3e7ae33eec8b" alt="insights" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/insightsScope insight:read

Parameters

project_idstringpathrequired
qstringquery
tagstringquery
folderstringquery
folder_idstringquery
a folder id, or none for insights in no folder
favoritedbooleanquery
limitintegerquery
cursorstringquery

Code 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[]required
Show child parameters
created_atstringrequired
created_bystring
descriptionstringrequired
favoritedbooleanrequired
Whether the calling user favorited it (always false for API keys).
folderstringrequired
folder_idstring
The folder it sits in (see object_acl); null = top level. folder is the legacy text label.
idstringrequired
kindstringrequired
namestringrequired
project_idstringrequired
queryobjectrequired
settingsobjectrequired
Display settings (display, overlay): presentation only, not part of the query or its versions.
tagsstring[]required
updated_atstringrequired
versionintegerrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/insightsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
folderstring
namestringrequired
queryobjectrequired
Query IR document ({"kind": ...}); JSON Schema: GET /v1/query.schema.json; examples: help page query-api.
settingsobject
Display 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_atstringrequired
created_bystring
descriptionstringrequired
favoritedbooleanrequired
Whether the calling user favorited it (always false for API keys).
folderstringrequired
folder_idstring
The folder it sits in (see object_acl); null = top level. folder is the legacy text label.
idstringrequired
kindstringrequired
namestringrequired
project_idstringrequired
queryobjectrequired
settingsobjectrequired
Display settings (display, overlay): presentation only, not part of the query or its versions.
tagsstring[]required
updated_atstringrequired
versionintegerrequired
Headers
ETagstring
400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/insights/{id}Scope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired
canonicalstringquery
1 or true: keys sorted at every level

Code 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 304

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

Headers
ETagstring
304
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/insights/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/insights/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
PATCHhttps://lucidace.com/v1/projects/{project_id}/insights/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
descriptionstring
favoritedboolean
Favorite or unfavorite for the calling user (ignored for API keys).
folderstring
folder_idstring
Move into the folder with this id; null takes the insight out of its folder (same checks as PUT /objects/insight/{id}/folder).
namestring
queryobject
settingsobject
tagsarray
{
  "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

Responses

400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/insights/{id}/chart.svgScope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired
modestringquery
light (default) or dark: picks the theme's colours and the background.
hide_legendbooleanquery
Hide the legend (it is drawn for two or more series otherwise).
refreshbooleanquery
Bypass 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
GEThttps://lucidace.com/v1/projects/{project_id}/insights/{id}/versionsScope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired
limitintegerquery
cursorstringquery

Code 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[]required
Show child parameters
changed_bystring
created_atstringrequired
descriptionstringrequired
insight_idstringrequired
namestringrequired
queryobjectrequired
versionintegerrequired
next_cursorstring
404
GEThttps://lucidace.com/v1/projects/{project_id}/surveysScope insight:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code 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[]required
Show child parameters
ignoredintegerrequired
Answers the NPS / rating score ignores (NPS not a whole 0..10, rating not a number).
last_response_atstringrequired
RFC 3339 time of the newest answer.
responsesintegerrequired
Answers, counted once per (survey_id, submission_id, question_id).
survey_idstringrequired
next_cursorstring
400
404
503
Updated