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}/release/abortScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/release/abort"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "awaiting_cr": "string",
  "baseline": {},
  "created_at": "2024-01-01T00:00:00Z",
  "current_phase": 0,
  "flag_id": "string",
  "id": "string",
  "paused_reason": "string",
  "phase_applied_at": "2024-01-01T00:00:00Z",
  "phases": [
    {}
  ],
  "pipeline_id": "string",
  "project_id": "string",
  "started_by": "string",
  "status": "string",
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
awaiting_crstring
Change request the next phase waits on.
baselineobjectrequired
{env: {enabled, filters}} at start: what a rollback restores.
created_atstringrequired
current_phaseintegerrequired
Index of the last applied phase (-1 = none yet).
flag_idstringrequired
idstringrequired
paused_reasonstring
Why the automation paused (guardrail breach or a person).
phase_applied_atstring
When the current phase went live (the automation's hold counts from here).
phasesobject[]required
Copy of the pipeline's phases taken at start.
pipeline_idstring
project_idstringrequired
started_bystring
statusstringrequired
active | paused | completed | aborted | rolled_back
updated_atstringrequired
403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/release/advanceScope flag:write

Apply the next phase, or open its change request when the phase is gated.

Parameters

project_idstringpathrequired
idstringpathrequired
forcebooleanquery
Advance even while an experiment runs on the flag

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/release/advance"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "change_request": {
    "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"
  },
  "release": {
    "awaiting_cr": "string",
    "baseline": {},
    "created_at": "2024-01-01T00:00:00Z",
    "current_phase": 0,
    "flag_id": "string",
    "id": "string",
    "paused_reason": "string",
    "phase_applied_at": "2024-01-01T00:00:00Z",
    "phases": [
      {}
    ],
    "pipeline_id": "string",
    "project_id": "string",
    "started_by": "string",
    "status": "string",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}
Schema
change_requestChangeRequest
Show child parameters
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
releaseobjectrequired
Show child parameters
awaiting_crstring
Change request the next phase waits on.
baselineobjectrequired
{env: {enabled, filters}} at start: what a rollback restores.
created_atstringrequired
current_phaseintegerrequired
Index of the last applied phase (-1 = none yet).
flag_idstringrequired
idstringrequired
paused_reasonstring
Why the automation paused (guardrail breach or a person).
phase_applied_atstring
When the current phase went live (the automation's hold counts from here).
phasesobject[]required
Copy of the pipeline's phases taken at start.
pipeline_idstring
project_idstringrequired
started_bystring
statusstringrequired
active | paused | completed | aborted | rolled_back
updated_atstringrequired
403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/release/pauseScope flag:write

Stop the automation of the flag's active release (manual advance is blocked too until resumed).

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
reasonstring
Why the automation stops (shown on the release and the timeline).
{
  "reason": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/release/pause" \
  -H "Content-Type: application/json" \
  -d '{"reason":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/release/resumeScope flag:write

Resume a paused release; the current phase's hold starts again from now.

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/release/resume"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/rerandomizeScope flag:write

Rotate the flag's salt (approval rules for protected environments apply).

Parameters

project_idstringpathrequired
idstringpathrequired
forcebooleanquery
Rotate although a running experiment owns the flag; its analysis window restarts

Request body

application/json
confirmstringrequired
The flag key, typed again to confirm.
reasonstringrequired
Why (1-500 chars); kept on the flag history row and the audit entry.
reset_stickyboolean
Also forget stored sticky assignments (default true); false keeps sticky units where they are.
{
  "confirm": "string",
  "reason": "string",
  "reset_sticky": true
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/rerandomize" \
  -H "Content-Type: application/json" \
  -d '{"confirm":"string","reason":"string","reset_sticky":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "environments": [
    "string"
  ],
  "flag_id": "string",
  "results_reset_at": "2024-01-01T00:00:00Z",
  "sticky_removed": 0,
  "warning": "string"
}
Schema
environmentsstring[]required
Environments whose own targeting got the new salt too.
flag_idstringrequired
results_reset_atstring
Set when a running experiment's analysis window restarted now.
sticky_removedintegerrequired
warningstringrequired
400
403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/restoreScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200 The flag is back, switched off
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 Not a deleted flag
409 A live flag took the key
PATCHhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/rolloutScope flag:write

Parameters

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

Request body

application/json
rollout_pctnumberrequired
0..=100; applied to the flag's first condition (one is added when it has none).
{
  "rollout_pct": 0
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/flags/{id}/rollout" \
  -H "Content-Type: application/json" \
  -d '{"rollout_pct":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
404
409 experiment_running (a running experiment owns this flag; retry with force=true), or protected environment: use a change request

Updated