transformations
GET
https://lucidace.com /v1/projects/{project_id}/transformation-libraries/{id}/versions Parameters
project_idstringpathrequiredidstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/transformation-libraries/{id}/versions"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of LibraryVersion, newest first
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"source": "string",
"version": 0
}
],
"next_cursor": "string"
}Schema
dataLibraryVersion[]requiredShow child parameters
created_atstringrequiredcreated_bystringsourcestringrequiredversionintegerrequirednext_cursorstring404
GET
https://lucidace.com /v1/projects/{project_id}/transformations Parameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/transformations"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of Transformation in application order (a project has at most 50; one page)
Example
{
"data": [
{
"flags": 0,
"repo": "string"
}
],
"next_cursor": "string"
}Schema
dataStored[]requiredShow child parameters
flagsintegerrequiredrepostringrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/transformations Parameters
project_idstringpathrequiredRequest body
application/json
conditionsobject[]Property conditions that must all hold (AND):
{property, op, value} with op one of eq, neq, contains, not_contains, gt, gte, lt, lte, regex, is_set, is_not_set.enabledbooleaneventstringLegacy single event name; combined (OR) with
events. Omit both for every event.eventsstring[]Event names the rule applies to (OR).
filterstringFilter expression that must be true, e.g.
properties.plan != 'free' and event in ('a','b').namestringrequiredpositionintegerApplication order (ascending); defaults to last.
ruleobjectrequired{"kind": "drop_event" | "drop_property" | "rename_property" | "hash_property" | "set_property" | "sample" | "code", ...}. code takes source, optional inputs (constants) and secrets (name -> value, sealed at rest and returned blank; send "" to keep a stored secret).{
"conditions": [
{}
],
"enabled": true,
"event": "string",
"events": [
"string"
],
"filter": "string",
"name": "string",
"position": 0,
"rule": {}
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/transformations" \
-H "Content-Type: application/json" \
-d '{"conditions":[{}],"enabled":true,"event":"string","events":["string"],"filter":"string","name":"string","position":0,"rule":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"created_at": "2024-01-01T00:00:00Z",
"enabled": true,
"event_name": "string",
"id": "string",
"name": "string",
"position": 0,
"quarantine_reason": "string",
"quarantined_until": "2024-01-01T00:00:00Z",
"rule": {},
"scope": {},
"updated_at": "2024-01-01T00:00:00Z"
}Schema
created_atstringrequiredenabledbooleanrequiredevent_namestringEvent name the rule applies to;
null = every event.idstringrequirednamestringrequiredpositionintegerrequiredquarantine_reasonstringquarantined_untilstringSet while the worker has the rule paused after repeated errors; it re-enables at this time.
ruleobjectrequiredscopeobjectrequired{events: [], conditions: [], filter: ""} (event_name is the legacy single-event scope).updated_atstringrequired400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/transformations/metrics Parameters
project_idstringpathrequiredhoursintegerqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/transformations/metrics"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of RuleMetrics: totals and an hourly series per rule that ran in the window (one page)
Example
{
"data": [
{
"series": [
{
"dropped": 0,
"errors": 0,
"hour": "2024-01-01T00:00:00Z",
"modified": 0,
"processed": 0,
"transformation_id": "string"
}
],
"totals": {
"dropped": 0,
"errors": 0,
"modified": 0,
"processed": 0
},
"transformation_id": "string"
}
],
"next_cursor": "string"
}Schema
dataRuleMetrics[]requiredShow child parameters
seriesMetricHour[]requiredHourly buckets with activity, oldest first.
Show child parameters
droppedintegerrequirederrorsintegerrequiredhourstringrequiredmodifiedintegerrequiredprocessedintegerrequiredtransformation_idstringrequiredtotalsobjectrequiredShow child parameters
droppedintegerrequirederrorsintegerrequiredmodifiedintegerrequiredprocessedintegerrequiredtransformation_idstringrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/transformations/test Parameters
project_idstringpathrequiredRequest body
application/json
eventobjectA supplied event:
{event, distinct_id?, uuid?, properties}. Exactly one of event and sample is required.rulesarrayRules to try; when omitted the project's saved, enabled rules run.
sampleSampleSpecShow child parameters
eventstringRestrict the pick to this event name.
{
"event": {},
"rules": [
{
"conditions": [
{}
],
"event": "string",
"events": [
"string"
],
"filter": "string",
"rule": {}
}
],
"sample": {
"event": "string"
}
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/transformations/test" \
-H "Content-Type: application/json" \
-d '{"event":{},"rules":[{"conditions":[{}],"event":"string","events":["string"],"filter":"string","rule":{}}],"sample":{"event":"string"}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"dropped": "string",
"input": {},
"logs": [
{
"id": "string",
"line": "string"
}
],
"properties": {},
"salted": true,
"sampled_out": true,
"steps": [
{
"dropped": true,
"error": true,
"id": "string",
"matched": true,
"modified": true
}
],
"warnings": [
"string"
]
}Schema
droppedstringWhy the event would not be ingested (
drop_event, sample:25), if so.inputobjectrequiredThe event the rules ran on (the picked one when
sample was used).logsRuleLog[]requiredlog(...) lines of code rules, in order.Show child parameters
idstringSaved rule id (absent for rules supplied in the request).
linestringrequiredpropertiesobjectrequiredsaltedbooleanrequiredWhether a hash salt is available (hash rules remove the value without one).
sampled_outbooleanrequiredstepsRuleStep[]requiredShow child parameters
droppedbooleanrequirederrorbooleanrequiredidstringSaved rule id (absent for rules supplied in the request).
matchedbooleanrequiredmodifiedbooleanrequiredwarningsstring[]required400
404 Unknown project, or
sample found no event in the last 24 hours503
DELETE
https://lucidace.com /v1/projects/{project_id}/transformations/{id} Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/transformations/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
PATCH
https://lucidace.com /v1/projects/{project_id}/transformations/{id} Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
clear_quarantinebooleantrue lifts an auto-quarantine immediately.conditionsarrayReplaces the conditions when present.
enabledbooleaneventstringnull clears the event scope (applies to every event).eventsarrayReplaces the event list when present.
filterstringReplaces the filter expression; an empty string clears it.
namestringpositionintegerruleobject{
"clear_quarantine": true,
"conditions": [
{}
],
"enabled": true,
"event": "string",
"events": [
"string"
],
"filter": "string",
"name": "string",
"position": 0,
"rule": {}
}Code samples
cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/transformations/{id}" \
-H "Content-Type: application/json" \
-d '{"clear_quarantine":true,"conditions":[{}],"enabled":true,"event":"string","events":["string"],"filter":"string","name":"string","position":0,"rule":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Updated