persons
GET
https://lucidace.com /v1/projects/{project_id}/computed-traits Scope person:readParameters
project_idstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/computed-traits"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of ComputedTraitRow, newest first
Example
{
"data": [
{
"aggregate": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"enabled": true,
"entity": "string",
"event": "string",
"filters": [
{}
],
"group_type_index": 0,
"id": "string",
"last_entities": 0,
"last_error": "string",
"last_run_at": "2024-01-01T00:00:00Z",
"last_status": "string",
"last_written": 0,
"math_property": "string",
"name": "string",
"property": "string",
"updated_at": "2024-01-01T00:00:00Z",
"window_days": 0
}
],
"next_cursor": "string"
}Schema
dataComputedTraitRow[]requiredShow child parameters
aggregatestringrequiredcount, sum, last, most_frequent, first_seen or last_seen.created_atstringrequiredcreated_bystringdescriptionstringrequiredenabledbooleanrequiredentitystringrequiredperson or group.eventstringrequiredfiltersobject[]required[{property, op, value}] event property conditions (all must hold).group_type_indexintegeridstringrequiredlast_entitiesintegerrequiredlast_errorstringrequiredlast_run_atstringlast_statusstringrequirednever, ok or failed.last_writtenintegerrequiredmath_propertystringnamestringrequiredpropertystringrequiredThe person or group property the value is written to.
updated_atstringrequiredwindow_daysintegerrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/computed-traits Scope person:writeParameters
project_idstringpathrequiredRequest body
application/json
aggregatestringrequiredcount, sum, last, most_frequent, first_seen or last_seen.descriptionstringenabledbooleanentitystringrequiredperson or group.eventstringrequiredfiltersCond[]Event property conditions, all must hold.
Show child parameters
opstringrequiredeq, neq, contains, is_set, is_not_set, gt or lt.propertystringrequiredvalueobjectgroup_type_indexintegerGroup type 0 to 4 (group traits only).
math_propertystringThe event property summed, or whose last or most frequent value is kept.
namestringrequiredpropertystringProperty written on the profile (default
trait_<slug of name>; never $lc_*).window_daysintegerTrailing window, 1 to 365 days (default 30).
{
"aggregate": "string",
"description": "string",
"enabled": true,
"entity": "string",
"event": "string",
"filters": [
{
"op": "string",
"property": "string",
"value": {}
}
],
"group_type_index": 0,
"math_property": "string",
"name": "string",
"property": "string",
"window_days": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/computed-traits" \
-H "Content-Type: application/json" \
-d '{"aggregate":"string","description":"string","enabled":true,"entity":"string","event":"string","filters":[{"op":"string","property":"string","value":{}}],"group_type_index":0,"math_property":"string","name":"string","property":"string","window_days":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"aggregate": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"enabled": true,
"entity": "string",
"event": "string",
"filters": [
{}
],
"group_type_index": 0,
"id": "string",
"last_entities": 0,
"last_error": "string",
"last_run_at": "2024-01-01T00:00:00Z",
"last_status": "string",
"last_written": 0,
"math_property": "string",
"name": "string",
"property": "string",
"updated_at": "2024-01-01T00:00:00Z",
"window_days": 0
}Schema
aggregatestringrequiredcount, sum, last, most_frequent, first_seen or last_seen.created_atstringrequiredcreated_bystringdescriptionstringrequiredenabledbooleanrequiredentitystringrequiredperson or group.eventstringrequiredfiltersobject[]required[{property, op, value}] event property conditions (all must hold).group_type_indexintegeridstringrequiredlast_entitiesintegerrequiredlast_errorstringrequiredlast_run_atstringlast_statusstringrequirednever, ok or failed.last_writtenintegerrequiredmath_propertystringnamestringrequiredpropertystringrequiredThe person or group property the value is written to.
updated_atstringrequiredwindow_daysintegerrequired400
404
409
GET
https://lucidace.com /v1/projects/{project_id}/computed-traits/{id} Scope person:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}"TypeScript
Python
Go
PHP
Ruby
Java
PUT
https://lucidace.com /v1/projects/{project_id}/computed-traits/{id} Scope person:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
aggregatestringrequiredcount, sum, last, most_frequent, first_seen or last_seen.descriptionstringenabledbooleanentitystringrequiredperson or group.eventstringrequiredfiltersCond[]Event property conditions, all must hold.
Show child parameters
opstringrequiredeq, neq, contains, is_set, is_not_set, gt or lt.propertystringrequiredvalueobjectgroup_type_indexintegerGroup type 0 to 4 (group traits only).
math_propertystringThe event property summed, or whose last or most frequent value is kept.
namestringrequiredpropertystringProperty written on the profile (default
trait_<slug of name>; never $lc_*).window_daysintegerTrailing window, 1 to 365 days (default 30).
{
"aggregate": "string",
"description": "string",
"enabled": true,
"entity": "string",
"event": "string",
"filters": [
{
"op": "string",
"property": "string",
"value": {}
}
],
"group_type_index": 0,
"math_property": "string",
"name": "string",
"property": "string",
"window_days": 0
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}" \
-H "Content-Type: application/json" \
-d '{"aggregate":"string","description":"string","enabled":true,"entity":"string","event":"string","filters":[{"op":"string","property":"string","value":{}}],"group_type_index":0,"math_property":"string","name":"string","property":"string","window_days":0}'TypeScript
Python
Go
PHP
Ruby
Java
DELETE
https://lucidace.com /v1/projects/{project_id}/computed-traits/{id} Scope person:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
404
POST
https://lucidace.com /v1/projects/{project_id}/computed-traits/{id}/run Scope person:readParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
dry_runbooleanCompute and compare only: nothing is written and the run is not recorded (default false).
{
"dry_run": true
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}/run" \
-H "Content-Type: application/json" \
-d '{"dry_run":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"changed": 0,
"dry_run": true,
"entities": 0,
"preview": [
{
"changed": true,
"entity_key": "string",
"value": {}
}
],
"written": 0
}Schema
changedintegerrequiredValues that changed (written unless this was a dry run).
dry_runbooleanrequiredentitiesintegerrequiredEntities with a value in the window.
previewTraitPreview[]requiredShow child parameters
changedbooleanrequiredDiffers from the value last written (a run would write it).
entity_keystringrequiredvalueobjectrequiredwrittenintegerrequired400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/computed-traits/{id}/values Scope person:readParameters
project_idstringpathrequiredidstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/computed-traits/{id}/values"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of TraitValue (last value written per person id or group key), by key
404
Updated