calculated_properties

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-calculated-properties"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/735af874-4c3b-48d1-92bb-12f6da193fae/social-card.svg?v=3e7ae33eec8b" alt="calculated_properties" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/calculated_propertiesScope insight:read

Parameters

project_idstringpathrequired

Code samples

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

Responses

200 Page of CalculatedProperty by name (at most 100; one page)
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "description": "string",
      "expr": {},
      "id": "string",
      "name": "string",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Schema
dataCalculatedProperty[]required
Show child parameters
created_atstringrequired
descriptionstringrequired
exprobjectrequired
idstringrequired
namestringrequired
Referenced in queries as the event property calc:<name>.
updated_atstringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/calculated_propertiesScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
exprobjectrequired
Expression AST: prop | lit | concat | regex_extract | coalesce | arith | case | borrow (borrow: property key of the last event before, in the session or for the person).
namestringrequired
[a-z][a-z0-9_]{0,62}; used as calc:<name> in filters and breakdowns.
{
  "description": "string",
  "expr": {},
  "name": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/calculated_properties" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","expr":{},"name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "description": "string",
  "expr": {},
  "id": "string",
  "name": "string",
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
created_atstringrequired
descriptionstringrequired
exprobjectrequired
idstringrequired
namestringrequired
Referenced in queries as the event property calc:<name>.
updated_atstringrequired
400
403
404
409
DELETEhttps://lucidace.com/v1/projects/{project_id}/calculated_properties/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

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

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
descriptionstring
exprobject
{
  "description": "string",
  "expr": {}
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/calculated_properties/{id}" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","expr":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
Updated