flags
POST
https://lucidace.com /v1/projects/{project_id}/flags/{id}/change-requests Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
descriptionstringenabledbooleanencrypt_payloadbooleanRemote config:
true seals the payload at rest, false stores it in clear (LC-FLG-26).environmentstringexpires_atstringfiltersFlagFiltersShow child parameters
app_contextsstring[]Serve only to SDKs declaring one of these app contexts (max 50; empty = everywhere).
compatstringForeign evaluation dialect of an imported flag (
posthog): the gateway buckets and matches it the way that vendor did, so migrated users keep their variants. Empty = Lucida's own.conditionsCondition[]Show child parameters
aggregationAggregationfiltersFilter[]payload_patchobjectRFC 7386 JSON merge patch applied to the served payload when this condition decides (P-L10).
rollout_pctnumberrequiredsegmentstringKey of a reusable flag segment (LC-FLG-15): the condition matches units in any of the segment's rules AND this condition's own
filters. The gateway expands it before serving.variant_overridestringcontinuitybooleanExperience continuity (LC-FLG-34): an identified person keeps the bucket of the anonymous id they had before identify.
designobjectExperiment design the gateway assigns by (LC-EXT-22), multivariate flags only:
{kind: "switchback", start, slice_seconds, run_len, geo_key?, control?, treated?} serves the arm of the current time block (per region when geo_key is set), {kind: "geo", geo_key, regions: {region: variant}} serves each region its variant. Units outside the design fall through to the next condition. Checked by [validate_design].early_exitbooleanStop at the first condition whose filters match (a rollout miss there is final).
evaluation_runtimestringclient | server, or empty for both: public keys never see server-only flags and secret keys never see client-only ones.holdoutobjectHoldout
{id, salt, percentage}: units hashing under percentage never see the flag.kill_switchbooleannamespaceobjectLayer range
{id, salt, start, end, total}: only units hashing into [start, end) of total buckets are eligible (evaluator support: see the lane report).prerequisitesPrerequisite[]Show child parameters
flagstringrequiredvalueobjectrequiredsaltstringstickybooleanSticky bucketing (LC-EXT-29): units keep their stored assignment when allocation changes. Only on-values are stored (boolean
true, the served variant); a unit that was out of the rollout is not pinned and is re-hashed, so raising a rollout only adds units.kindstringlifecyclestringdraft | active | launched | deprecated.namestringowner_user_idstringAbsent keeps the owner,
null clears it, a user id sets it.payloadsobjectprotected_envsarrayreasonstringWhy the change is made (rollback / incident reason, LC-FLG-42); stored on the history row, not on the flag.
stickinessstringtagsarrayvariantsarray{
"description": null,
"enabled": null,
"encrypt_payload": null,
"environment": null,
"expires_at": null,
"filters": null,
"kind": null,
"lifecycle": null,
"name": null,
"owner_user_id": null,
"payloads": null,
"protected_envs": null,
"reason": null,
"stickiness": null,
"tags": null,
"variants": null
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/change-requests" \
-H "Content-Type: application/json" \
-d '{"description":null,"enabled":null,"encrypt_payload":null,"environment":null,"expires_at":null,"filters":null,"kind":null,"lifecycle":null,"name":null,"owner_user_id":null,"payloads":null,"protected_envs":null,"reason":null,"stickiness":null,"tags":null,"variants":null}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"applied_version": 0,
"approvals": [
{}
],
"base_version": 0,
"created_at": "2024-01-01T00:00:00Z",
"environment": "string",
"experiment_id": "string",
"expires_at": "2024-01-01T00:00:00Z",
"failure_reason": "string",
"flag_id": "string",
"id": "string",
"policy_key": "string",
"project_id": "string",
"proposal": {},
"quorum": 0,
"requested_by": "string",
"review_note": "string",
"reviewed_at": "2024-01-01T00:00:00Z",
"reviewed_by": "string",
"status": "string",
"subject": "string"
}Schema
applied_versionintegerapprovalsobject[]required[{user_id, note, at}], one entry per approver so far.base_versionintegerFlag version the request was made against; apply fails when the flag moved on.
created_atstringrequiredenvironmentstringexperiment_idstringexpires_atstringPending or approved requests past this instant expire unused.
failure_reasonstringWhy a
failed request could not be applied.flag_idstringidstringrequiredpolicy_keystringThe approval-policy key whose rule governs this request (
flag.rollout, ...).project_idstringrequiredproposalobjectrequiredquorumintegerrequiredApprovals needed before the request counts as approved.
requested_bystringreview_notestringreviewed_atstringreviewed_bystringstatusstringrequiredsubjectstringrequired400
403
404
POST
https://lucidace.com /v1/projects/{project_id}/flags/{id}/copy Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredforcebooleanqueryEdit serving state although a running experiment owns the flag
Request body
application/json
fromstringrequiredtostringrequired{
"from": "string",
"to": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/copy" \
-H "Content-Type: application/json" \
-d '{"from":"string","to":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"enabled": true,
"environment_state": {},
"expires_at": "2024-01-01T00:00:00Z",
"filters": {},
"holdout_id": "string",
"id": "string",
"key": "string",
"kind": "string",
"lifecycle": "string",
"name": "string",
"namespace_id": "string",
"owner_user_id": "string",
"payloads": {},
"protected_envs": [
"string"
],
"stickiness": "string",
"tags": [
"string"
],
"updated_at": "2024-01-01T00:00:00Z",
"variants": {},
"version": 0
}Schema
created_atstringrequiredcreated_bystringdescriptionstringrequiredenabledbooleanrequiredenvironment_stateobjectrequiredexpires_atstringfiltersobjectrequiredholdout_idstringidstringrequiredkeystringrequiredkindstringrequiredlifecyclestringrequireddraft | active | launched | deprecated (advisory; stale detection surfaces the last two).namestringrequirednamespace_idstringowner_user_idstringpayloadsobjectrequiredprotected_envsstring[]requiredstickinessstringrequiredtagsstring[]requiredupdated_atstringrequiredvariantsobjectrequiredversionintegerrequired403
404
409
GET
https://lucidace.com /v1/projects/{project_id}/flags/{id}/copy-preview Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredfromstringqueryrequiredtostringqueryrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flags/{id}/copy-preview?from=<from>&to=<to>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
{from, to, diff, needs_approval}404
POST
https://lucidace.com /v1/projects/{project_id}/flags/{id}/copy-to-projects Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredforcebooleanqueryOverwrite serving state of a target flag although a running experiment owns it; otherwise that target fails
Request body
application/json
copy_schedulesbooleanAlso copy the flag's pending schedules.
overwritebooleanUpdate a flag with the same key in the target instead of skipping it.
targetsstring[]required1 to 20 target project ids.
{
"copy_schedules": true,
"overwrite": true,
"targets": [
"string"
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/copy-to-projects" \
-H "Content-Type: application/json" \
-d '{"copy_schedules":true,"overwrite":true,"targets":["string"]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"results": [
{
"columns": [
"string"
],
"dry_run": true,
"from_project_id": "string",
"sections": [
"string"
],
"settings": {}
}
]
}Schema
resultsCopyResult[]requiredShow child parameters
columnsstring[]requiredProject columns set from the source (privacy and replay sections).
dry_runbooleanrequiredfrom_project_idstringrequiredsectionsstring[]requiredsettingsobjectrequiredKeys copied per
settings.<name> object.400
404
GET
https://lucidace.com /v1/projects/{project_id}/flags/{id}/dependents Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flags/{id}/dependents"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"blocking": true,
"data": [
{
"id": "string",
"name": "string"
}
]
}Schema
blockingbooleanrequiredTrue when a delete would be refused without
force=true.dataDependent[]requiredShow child parameters
idstringrequirednamestringrequired404
DELETE
https://lucidace.com /v1/projects/{project_id}/flags/{id}/environments/{env} Scope flag:writeDrop an environment's override so it serves the base state again. A protected environment needs a change request.
Parameters
project_idstringpathrequiredidstringpathrequiredenvstringpathrequiredforcebooleanqueryEdit serving state although a running experiment owns the flag
Code samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/flags/{id}/environments/{env}"TypeScript
Python
Go
PHP
Ruby
Java
Updated