customer-analytics
PUT
https://lucidace.com /v1/projects/{project_id}/customer-journeys/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
descriptionstringnamestringrequiredstepsStep[]required[{label, source: {type: event|action, name|id}, filters?, optional?}], the first required.Show child parameters
filtersobjectlabelstringrequiredoptionalbooleansourceobjectrequired{type: "event", name} or {type: "action", id}.window_daysintegerConversion window in days (default 14).
{
"description": "string",
"name": "string",
"steps": [
{
"filters": {},
"label": "string",
"optional": true,
"source": {}
}
],
"window_days": 0
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}" \
-H "Content-Type: application/json" \
-d '{"description":"string","name":"string","steps":[{"filters":{},"label":"string","optional":true,"source":{}}],"window_days":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"id": "string",
"name": "string",
"origin": "string",
"steps": [
{}
],
"updated_at": "2024-01-01T00:00:00Z",
"window_days": 0
}Schema
created_atstringrequiredcreated_bystringdescriptionstringrequiredidstringrequirednamestringrequiredoriginstringrequiredtemplate | funnel | scratchstepsobject[]required[{label, source: {type, name|id}, filters?, optional}]updated_atstringrequiredwindow_daysintegerrequired400
403
404
409
DELETE
https://lucidace.com /v1/projects/{project_id}/customer-journeys/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
POST
https://lucidace.com /v1/projects/{project_id}/customer-journeys/{id}/paths Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
daysintegerscopestringrequiredbetween (to the next required step), before or after_dropoff.stepintegerrequired0-based step index.
{
"days": 0,
"scope": "string",
"step": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/paths" \
-H "Content-Type: application/json" \
-d '{"days":0,"scope":"string","step":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"columns": [
"string"
],
"meta": {
"bytes_read": 0,
"cache_hit": true,
"cache_key": "string",
"clamped_range": true,
"computed_at": "2024-01-01T00:00:00Z",
"execution_ms": 0,
"next_allowed_client_refresh": "2024-01-01T00:00:00Z",
"rows_read": 0,
"sampled": true,
"sql_hash": "string"
},
"rows": [
[
{}
]
]
}Schema
columnsstring[]requiredmetaobjectrequiredShow child parameters
bytes_readintegerBytes
ClickHouse read, like rows_read.cache_hitbooleanrequiredcache_keystringrequiredStable hash of the cache key (project, SQL, timezone, canonical query).
clamped_rangebooleanrequiredcomputed_atstringrequiredWhen the result was computed (
last_refresh).execution_msintegerWall time of the
ClickHouse call; None on a cache hit.next_allowed_client_refreshstringrequiredBefore this,
refresh: "force_*" recomputes but the dashboards' auto refresh serves the cache.rows_readintegerRows
ClickHouse read (its X-ClickHouse-Summary header); None when not reported.sampledbooleanrequiredsql_hashstringrequiredrowsobject[][]required400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/customer-journeys/{id}/progress Parameters
project_idstringpathrequiredidstringpathrequiredentitystringqueryrequiredkeystringqueryrequiredgroup_type_indexintegerqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/progress?entity=<entity>&key=<key>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 {journey_id, completed, steps: StepProgress[]}
400
404
503
POST
https://lucidace.com /v1/projects/{project_id}/customer-journeys/{id}/run Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
daysintegerLook-back in days (default 30).
{
"days": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/run" \
-H "Content-Type: application/json" \
-d '{"days":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 {journey_id, days, steps: StepFlow[]}
400
404
503
POST
https://lucidace.com /v1/projects/{project_id}/customer-journeys/{id}/steps/promote Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
eventstringrequiredA path node: a custom event name, or a page path starting with
/.labelstringoptionalbooleanpositioninteger0-based insert position (default: the end).
{
"event": "string",
"label": "string",
"optional": true,
"position": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/steps/promote" \
-H "Content-Type: application/json" \
-d '{"event":"string","label":"string","optional":true,"position":0}'TypeScript
Python
Go
PHP
Ruby
Java
GET
https://lucidace.com /v1/projects/{project_id}/usage-metrics Scope insight:readParameters
project_idstringpathrequiredapplies_tostringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/usage-metrics"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of UsageMetricRow, newest first
Example
{
"data": [
{
"applies_to": "string",
"calc": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"display": "string",
"filters": {},
"format": "string",
"group_type_index": 0,
"id": "string",
"interval_days": 0,
"math_property": "string",
"name": "string",
"source": {},
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}Schema
dataUsageMetricRow[]requiredShow child parameters
applies_tostringrequiredperson | group | bothcalcstringrequiredcount | sumcreated_atstringrequiredcreated_bystringdescriptionstringrequireddisplaystringrequirednumber | sparklinefiltersobjectformatstringrequirednumeric | currencygroup_type_indexintegeridstringrequiredinterval_daysintegerrequired7, 30 or 90.
math_propertystringnamestringrequiredsourceobjectrequired{kind: events, matchers: [...]} or {kind: warehouse, table, timestamp_field, key_field}.updated_atstringrequirednext_cursorstring400
404
POST
https://lucidace.com /v1/projects/{project_id}/usage-metrics Scope insight:writeParameters
project_idstringpathrequiredRequest body
application/json
applies_tostringperson, group or both (default).calcstringcount (default) or sum of math_property.descriptionstringdisplaystringnumber (default) or sparkline.filtersobjectProperty group
{and|or: [...]} applied to every matcher.formatstringnumeric (default) or currency.group_type_indexintegerRestrict a group metric to one group type (0 to 4).
interval_daysinteger7, 30 or 90 days (default 30).
math_propertystringnamestringrequiredsourceobjectrequired{kind: "events", matchers: [{type: "event"|"action", name|id, filters?}]} (matchers are OR-ed) or {kind: "warehouse", table, timestamp_field, key_field}.{
"applies_to": "string",
"calc": "string",
"description": "string",
"display": "string",
"filters": {},
"format": "string",
"group_type_index": 0,
"interval_days": 0,
"math_property": "string",
"name": "string",
"source": {}
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/usage-metrics" \
-H "Content-Type: application/json" \
-d '{"applies_to":"string","calc":"string","description":"string","display":"string","filters":{},"format":"string","group_type_index":0,"interval_days":0,"math_property":"string","name":"string","source":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"applies_to": "string",
"calc": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"display": "string",
"filters": {},
"format": "string",
"group_type_index": 0,
"id": "string",
"interval_days": 0,
"math_property": "string",
"name": "string",
"source": {},
"updated_at": "2024-01-01T00:00:00Z"
}Schema
applies_tostringrequiredperson | group | bothcalcstringrequiredcount | sumcreated_atstringrequiredcreated_bystringdescriptionstringrequireddisplaystringrequirednumber | sparklinefiltersobjectformatstringrequirednumeric | currencygroup_type_indexintegeridstringrequiredinterval_daysintegerrequired7, 30 or 90.
math_propertystringnamestringrequiredsourceobjectrequired{kind: events, matchers: [...]} or {kind: warehouse, table, timestamp_field, key_field}.updated_atstringrequired400
403
404
409
Updated