flags
GET
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/schedules Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/schedules"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"applied_at": "2024-01-01T00:00:00Z",
"body": {},
"change_request_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"error": "string",
"id": "string",
"project_id": "string",
"run_at": "2024-01-01T00:00:00Z",
"segment_id": "string",
"status": "string"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
applied_atstringbodyobjectrequired{name, description, rules, source?}: the segment body written at run_at.change_request_idstringcreated_atstringrequiredcreated_bystringerrorstringidstringrequiredproject_idstringrequiredrun_atstringrequiredsegment_idstringrequiredstatusstringrequiredawaiting_approval | pending | applied | failed | cancelled.next_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/schedules Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
descriptionstringnamestringrulesobject[]sourceobjectrun_atstringrequiredWhen to write the edit (future, at most a year ahead).
{
"description": "string",
"name": "string",
"rules": [
{}
],
"source": {},
"run_at": "2024-01-01T00:00:00Z"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/schedules" \
-H "Content-Type: application/json" \
-d '{"description":"string","name":"string","rules":[{}],"source":{},"run_at":"2024-01-01T00:00:00Z"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
pending, or awaiting_approval with a change request when segment edits need approvalExample
{
"applied_at": "2024-01-01T00:00:00Z",
"body": {},
"change_request_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"error": "string",
"id": "string",
"project_id": "string",
"run_at": "2024-01-01T00:00:00Z",
"segment_id": "string",
"status": "string"
}Schema
applied_atstringbodyobjectrequired{name, description, rules, source?}: the segment body written at run_at.change_request_idstringcreated_atstringrequiredcreated_bystringerrorstringidstringrequiredproject_idstringrequiredrun_atstringrequiredsegment_idstringrequiredstatusstringrequiredawaiting_approval | pending | applied | failed | cancelled.400
403
404
DELETE
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/schedules/{sid} Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredsidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/schedules/{sid}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
403
404 No such schedule, or it already ran
POST
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/sync Scope flag:writeRe-materialise a `synced` segment now. A failed read keeps the previous members and records `sync_error`.
Parameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/sync"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"id": "string",
"key": "string",
"kind": "string",
"member_count": 0,
"name": "string",
"rules": [
{}
],
"source": {},
"sync_error": "string",
"synced_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}Schema
created_atstringrequiredcreated_bystringdescriptionstringrequiredidstringrequiredkeystringrequiredkindstringrequiredrules (expanded into definitions), list (uploaded members) or synced (members materialised from a connector-mirrored warehouse table).member_countintegerrequirednamestringrequiredrulesobject[]required[{filters: [Filter]}]: rules are OR-ed, a rule's filters AND-ed.sourceobjectsynced only: {table, column} of warehouse_rows (column empty = the row key).sync_errorstringsynced_atstringupdated_atstringrequired403
404
409
GET
https://lucidace.com /v1/projects/{project_id}/flag-settings Scope flag:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-settings"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"confirm_on_save": true,
"default_conditions": [
{}
],
"max_conditions": 0,
"max_flags": 0
}Schema
confirm_on_savebooleanrequiredThe editor asks for confirmation before saving a change to a live flag.
default_conditionsobject[]requiredConditions a new flag starts with when its draft names none.
max_conditionsintegermax_flagsinteger404
PUT
https://lucidace.com /v1/projects/{project_id}/flag-settings Scope adminParameters
project_idstringpathrequiredRequest body
application/json
confirm_on_savebooleandefault_conditionsobject[]max_conditionsintegerAt most this many conditions per flag (absent = unlimited).
max_flagsintegerAt most this many live flags (absent = unlimited).
{
"confirm_on_save": true,
"default_conditions": [
{}
],
"max_conditions": 0,
"max_flags": 0
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/flag-settings" \
-H "Content-Type: application/json" \
-d '{"confirm_on_save":true,"default_conditions":[{}],"max_conditions":0,"max_flags":0}'TypeScript
Python
Go
PHP
Ruby
Java
GET
https://lucidace.com /v1/projects/{project_id}/flag-stale Scope flag:readParameters
project_idstringpathrequiredlimitintegerquerycursorstringquerymin_age_daysintegerqueryOnly flags created at least this many days ago
excludestringqueryComma-separated flag keys or tags to leave out
Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-stale"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"next_cursor": "string",
"stale": [
{
"id": "string",
"key": "string",
"purpose": "string",
"reasons": [
"string"
],
"variants": [
"string"
],
"winner": "string"
}
]
}Schema
next_cursorstringPass as
?cursor= for the next page (flags are ordered by key).staleStaleFlag[]requiredShow child parameters
idstringrequiredkeystringrequiredpurposestringThe flag's purpose, when set.
reasonsstring[]requiredfully_rolled_out, not_evaluated_30d, expired, experiment_concluded, past_expected_lifetime (older than its purpose allows, N-EXP-12), ...variantsstring[]requiredVariant keys (a multivariate flag is cleaned up to one of them).
winnerstringWinning variant of a finished experiment on this flag: clean the flag up to it.
404
GET
https://lucidace.com /v1/projects/{project_id}/flag-templates Scope flag:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-templates"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"definition": {},
"description": "string",
"id": "string",
"name": "string"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
created_atstringrequireddefinitionobjectrequiredA flag draft body (
kind, filters, variants, tags, ...) applied by the editor.descriptionstringrequiredidstringrequirednamestringrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flag-templates Scope flag:writeParameters
project_idstringpathrequiredRequest body
application/json
definitionobjectrequiredA flag draft body without
key: kind, filters, variants, tags, ...descriptionstringnamestringrequired{
"definition": {},
"description": "string",
"name": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-templates" \
-H "Content-Type: application/json" \
-d '{"definition":{},"description":"string","name":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"created_at": "2024-01-01T00:00:00Z",
"definition": {},
"description": "string",
"id": "string",
"name": "string"
}Schema
created_atstringrequireddefinitionobjectrequiredA flag draft body (
kind, filters, variants, tags, ...) applied by the editor.descriptionstringrequiredidstringrequirednamestringrequired400
403
404
409
Updated