customer-analytics
POST
https://lucidace.com /v1/projects/{project_id}/usage-metrics/evaluate Parameters
project_idstringpathrequiredRequest body
application/json
entitystringrequiredperson (keys are person ids) or group (keys are group keys).group_type_indexintegerRequired for
group.keysstring[]requiredUp to 50 customers: a list page or one profile.
metric_idsarrayDefaults to every metric usable for the entity.
{
"entity": "string",
"group_type_index": 0,
"keys": [
"string"
],
"metric_ids": [
"string"
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/usage-metrics/evaluate" \
-H "Content-Type: application/json" \
-d '{"entity":"string","group_type_index":0,"keys":["string"],"metric_ids":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 {data: MetricUsage[]}
400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/usage-metrics/{id} Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/usage-metrics/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
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_atstringrequired404
PUT
https://lucidace.com /v1/projects/{project_id}/usage-metrics/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest 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 PUT "https://lucidace.com/v1/projects/{project_id}/usage-metrics/{id}" \
-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
DELETE
https://lucidace.com /v1/projects/{project_id}/usage-metrics/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/usage-metrics/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
Updated