flags

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-flags"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/b5c3688b-7e55-4666-be20-ed9c5f8c72a6/social-card.svg?v=3e7ae33eec8b" alt="flags" width="600" height="315"></a>
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/change-requestsScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
descriptionstring
= null
enabledboolean
= null
encrypt_payloadboolean
Remote config: true seals the payload at rest, false stores it in clear (LC-FLG-26).
= null
environmentstring
= null
expires_atstring
= null
filtersFlagFilters
= null
Show child parameters
app_contextsstring[]
Serve only to SDKs declaring one of these app contexts (max 50; empty = everywhere).
compatstring
Foreign 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
aggregationAggregation
filtersFilter[]
payload_patchobject
RFC 7386 JSON merge patch applied to the served payload when this condition decides (P-L10).
rollout_pctnumberrequired
segmentstring
Key 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_overridestring
continuityboolean
Experience continuity (LC-FLG-34): an identified person keeps the bucket of the anonymous id they had before identify.
designobject
Experiment 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_exitboolean
Stop at the first condition whose filters match (a rollout miss there is final).
evaluation_runtimestring
client | server, or empty for both: public keys never see server-only flags and secret keys never see client-only ones.
holdoutobject
Holdout {id, salt, percentage}: units hashing under percentage never see the flag.
kill_switchboolean
namespaceobject
Layer 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
flagstringrequired
valueobjectrequired
saltstring
stickyboolean
Sticky 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.
kindstring
= null
lifecyclestring
draft | active | launched | deprecated.
= null
namestring
= null
owner_user_idstring
Absent keeps the owner, null clears it, a user id sets it.
= null
payloadsobject
= null
protected_envsarray
= null
reasonstring
Why the change is made (rollback / incident reason, LC-FLG-42); stored on the history row, not on the flag.
= null
stickinessstring
= null
tagsarray
= null
variantsarray
= null
{
  "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_versioninteger
approvalsobject[]required
[{user_id, note, at}], one entry per approver so far.
base_versioninteger
Flag version the request was made against; apply fails when the flag moved on.
created_atstringrequired
environmentstring
experiment_idstring
expires_atstring
Pending or approved requests past this instant expire unused.
failure_reasonstring
Why a failed request could not be applied.
flag_idstring
idstringrequired
policy_keystring
The approval-policy key whose rule governs this request (flag.rollout, ...).
project_idstringrequired
proposalobjectrequired
quorumintegerrequired
Approvals needed before the request counts as approved.
requested_bystring
review_notestring
reviewed_atstring
reviewed_bystring
statusstringrequired
subjectstringrequired
400
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/copyScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired
forcebooleanquery
Edit serving state although a running experiment owns the flag

Request body

application/json
fromstringrequired
tostringrequired
{
  "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_atstringrequired
created_bystring
descriptionstringrequired
enabledbooleanrequired
environment_stateobjectrequired
expires_atstring
filtersobjectrequired
holdout_idstring
idstringrequired
keystringrequired
kindstringrequired
lifecyclestringrequired
draft | active | launched | deprecated (advisory; stale detection surfaces the last two).
namestringrequired
namespace_idstring
owner_user_idstring
payloadsobjectrequired
protected_envsstring[]required
stickinessstringrequired
tagsstring[]required
updated_atstringrequired
variantsobjectrequired
versionintegerrequired
403
404
409
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/copy-previewScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired
fromstringqueryrequired
tostringqueryrequired

Code 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
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/copy-to-projectsScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired
forcebooleanquery
Overwrite serving state of a target flag although a running experiment owns it; otherwise that target fails

Request body

application/json
copy_schedulesboolean
Also copy the flag's pending schedules.
overwriteboolean
Update a flag with the same key in the target instead of skipping it.
targetsstring[]required
1 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[]required
Show child parameters
columnsstring[]required
Project columns set from the source (privacy and replay sections).
dry_runbooleanrequired
from_project_idstringrequired
sectionsstring[]required
settingsobjectrequired
Keys copied per settings.<name> object.
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/dependentsScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code 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
blockingbooleanrequired
True when a delete would be refused without force=true.
dataDependent[]required
Show child parameters
idstringrequired
namestringrequired
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/environments/{env}Scope flag:write

Drop an environment's override so it serves the base state again. A protected environment needs a change request.

Parameters

project_idstringpathrequired
idstringpathrequired
envstringpathrequired
forcebooleanquery
Edit 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

Responses

403
404
409

Updated