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>
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/guarded-rolloutScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200
Example
{
  "advance_every_hours": 0,
  "advanced_at": "2024-01-01T00:00:00Z",
  "breach": {},
  "created_at": "2024-01-01T00:00:00Z",
  "current_pct": 0,
  "ended_at": "2024-01-01T00:00:00Z",
  "flag_id": "string",
  "guardrails": [
    {}
  ],
  "id": "string",
  "notice": {},
  "previous": {},
  "project_id": "string",
  "started_at": "2024-01-01T00:00:00Z",
  "status": "string",
  "step_index": 0,
  "steps": [
    {}
  ]
}
Schema
advance_every_hoursinteger
The guardrail job advances one step every this many hours while no guardrail is breached.
advanced_atstringrequired
When the current step started.
breachobject
created_atstringrequired
current_pctnumberrequired
ended_atstring
flag_idstringrequired
guardrailsobject[]required
[{metric: uuid, direction?: "lower_is_better" | "higher_is_better", threshold?: f64, action?: "rollback" | "notify"}]
idstringrequired
noticeobject
Unacknowledged notify-only breach {metrics, at}; advancing waits for an acknowledgement.
previousobjectrequired
Flag state restored on rollback or abort: {enabled, filters}.
project_idstringrequired
started_atstringrequired
statusstringrequired
active | completed | rolled_back | aborted
step_indexintegerrequired
stepsobject[]required
[10, 25, {pct: 50, audience: [filter]}, 100]: a number rolls out to everyone, an object to the audience first (its condition goes before the flag's previous conditions).
404
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/guarded-rolloutScope flag:write

Parameters

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

Request body

application/json
advance_every_hoursinteger
Advance one step every this many hours (1-720) while no guardrail is breached.
guardrailsGuardrail[]required
Show child parameters
actionstring
rollback (default) restores the flag; notify records a notice, tells the flag's subscribers and holds the rollout until someone acknowledges it.
directionstring
lower_is_better or higher_is_better; defaults to the metric's own direction.
metricstringrequired
Saved metric id.
thresholdnumber
Largest tolerated relative regression (0.02 = 2 %): a breach needs the engine's harm verdict AND a regression beyond this. 0 (default) = any significant harm.
stepsarray
Percentages or {pct, audience: [filter]} steps; ascending for the same audience and ending at 100 for everyone. Default [10, 25, 50, 100].
{
  "advance_every_hours": 0,
  "guardrails": [
    {
      "action": "string",
      "direction": "string",
      "metric": "string",
      "threshold": 0
    }
  ],
  "steps": [
    {}
  ]
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/guarded-rollout" \
  -H "Content-Type: application/json" \
  -d '{"advance_every_hours":0,"guardrails":[{"action":"string","direction":"string","metric":"string","threshold":0}],"steps":[{}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/guarded-rollout/abortScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json

optional

reasonstring
Why the rollout is aborted; stored on the restoring history row.
{
  "reason": "string"
}

Code samples

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

Responses

403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/guarded-rollout/acknowledgeScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200 Notice acknowledged: the rollout may advance; the acknowledged metrics stay quiet

Same as 200 · GET /v1/projects/{project_id}/flags/{id}/guarded-rollout

403
404
409
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/guarded-rollout/advanceScope flag:write

Parameters

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

Code samples

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

Responses

403
404
409 Not active, a guardrail notice waits for acknowledgement, or a guardrail is breached (rolled back)
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/healthScope flag:read

The flag's health: its own states and the environment-wide ones.

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200
Example
{
  "states": [
    {
      "dismissed_at": "2024-01-01T00:00:00Z",
      "environment": "string",
      "flag_id": "string",
      "hook_id": "string",
      "id": "string",
      "links": [
        "string"
      ],
      "reason": "string",
      "status": "string",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "unhealthy": true
}
Schema
statesHealthState[]required
The flag's states and the environment-wide ones.
Show child parameters
dismissed_atstring
environmentstringrequired
'' = the base state / every environment.
flag_idstring
Null = the whole environment.
hook_idstring
idstringrequired
linksstring[]required
reasonstringrequired
statusstringrequired
healthy | unhealthy
updated_atstringrequired
unhealthybooleanrequired
True while an undismissed unhealthy state applies.
404
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/health/dismissScope flag:write

Dismiss the flag's unhealthy badge until the next status change.

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
environmentstring
Only this environment ('' = base); absent = every unhealthy state of the flag.
{
  "environment": "string"
}

Code samples

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

Responses

200 {dismissed}
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/health/historyScope flag:read

The flag's health history (reports and dismissals), newest first.

Parameters

project_idstringpathrequired
idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

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

Responses

200
Example
{
  "data": [
    {
      "actor_user_id": "string",
      "at": "2024-01-01T00:00:00Z",
      "environment": "string",
      "flag_id": "string",
      "hook_id": "string",
      "id": "string",
      "links": [
        "string"
      ],
      "reason": "string",
      "status": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
actor_user_idstring
atstringrequired
environmentstringrequired
flag_idstring
hook_idstring
idstringrequired
linksstring[]required
reasonstringrequired
statusstringrequired
healthy | unhealthy | dismissed
next_cursorstring
404
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/historyScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200
Example
[
  {
    "actor_user_id": "string",
    "after": {},
    "before": {},
    "change_kind": "string",
    "created_at": "2024-01-01T00:00:00Z",
    "flag_id": "string",
    "id": "string",
    "reason": "string",
    "version": 0
  }
]
Schema
actor_user_idstring
afterobject
beforeobject
change_kindstringrequired
created_atstringrequired
flag_idstringrequired
idstringrequired
reasonstring
Why the change was made (rollback / kill reason), when the actor gave one.
versionintegerrequired
404

Updated