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>
PATCHhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/schedules/{sid}Scope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired
sidstringpathrequired

Request body

application/json

Fields to change on a pending schedule; null clears recurrence, cron or ends_at.

cronstring
= null
ends_atstring
= null
payloadobject
= null
recurrencestring
= null
run_atstring
= null
timezonestring
= null
{
  "cron": null,
  "ends_at": null,
  "payload": null,
  "recurrence": null,
  "run_at": null,
  "timezone": null
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/flags/{id}/schedules/{sid}" \
  -H "Content-Type: application/json" \
  -d '{"cron":null,"ends_at":null,"payload":null,"recurrence":null,"run_at":null,"timezone":null}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "action": "string",
  "anchor_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "cron": "string",
  "ends_at": "2024-01-01T00:00:00Z",
  "error": "string",
  "executed_at": "2024-01-01T00:00:00Z",
  "flag_id": "string",
  "id": "string",
  "occurrence": 0,
  "pair_id": "string",
  "payload": {},
  "project_id": "string",
  "recurrence": "string",
  "run_at": "2024-01-01T00:00:00Z",
  "series_id": "string",
  "status": "string",
  "timezone": "string"
}
Schema
actionstringrequired
anchor_atstring
First occurrence; later ones are anchor_at + n * period in timezone.
created_atstringrequired
created_bystring
cronstring
Five-field cron evaluated in timezone (recurrence = cron).
ends_atstring
No occurrence is created after this instant.
errorstringrequired
Why the run failed (empty otherwise).
executed_atstring
flag_idstringrequired
idstringrequired
occurrenceintegerrequired
pair_idstring
Links the two halves of an enable/disable pair.
payloadobjectrequired
project_idstringrequired
recurrencestring
daily | weekly | monthly | yearly | cron; absent = one-off.
run_atstringrequired
series_idstring
Shared by every occurrence of one recurring schedule.
statusstringrequired
timezonestringrequired
IANA zone the recurrence's wall-clock times are kept in.
400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/sharesScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200 Projects this flag is served in besides its own
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "project_id": "string",
      "project_name": "string"
    }
  ]
}
Schema
dataShareTarget[]required
Show child parameters
created_atstringrequired
project_idstringrequired
project_namestringrequired
404
PUThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/shares/{target_id}Scope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired
target_idstringpathrequired
Another project of the same organization

Code samples

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

Responses

204 Shared (idempotent)
400
403
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/shares/{target_id}Scope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired
target_idstringpathrequired

Code samples

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

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/sticky-assignmentsScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200 {total, values: [{value, units}]}
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/sticky-assignmentsScope flag:write

Forget stored assignments: units are bucketed by hash again (re-randomise).

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200 {removed}
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/toggleScope 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
enabledbooleanrequired
{
  "enabled": true
}

Code samples

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

Responses

200 the updated FlagRecord
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
404
409 experiment_running (a running experiment owns this flag; retry with force=true), or protected environment: use a change request
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/triggersScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200
Example
[
  {
    "action": "string",
    "created_at": "2024-01-01T00:00:00Z",
    "created_by": "string",
    "environment": "string",
    "fire_count": 0,
    "flag_id": "string",
    "id": "string",
    "last_fired_at": "2024-01-01T00:00:00Z",
    "name": "string",
    "revoked_at": "2024-01-01T00:00:00Z",
    "rotated_at": "2024-01-01T00:00:00Z"
  }
]
Schema
actionstringrequired
enable | disable | kill
created_atstringrequired
created_bystring
environmentstring
Environment the action applies to; absent = the base state (kill: everywhere).
fire_countintegerrequired
flag_idstringrequired
idstringrequired
last_fired_atstring
namestringrequired
revoked_atstring
rotated_atstring
404

Updated