flags
GET
https://lucidace.com /v1/projects/{project_id}/flag-policy Scope flag:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-policy"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"allowed_contexts": [],
"require_description": false,
"require_owner": false,
"required_tags": []
}Schema
allowed_contextsstring[]When non-empty, the evaluation contexts a flag may bucket on or filter by:
distinct_id, person_id, device_id, group:<type> (group:* for any group), context:<user|device|org>.require_descriptionbooleanEvery flag has a description.
require_ownerbooleanEvery flag has an owner.
required_tagsstring[]When non-empty, every flag carries at least one of these tags (e.g. team tags).
404
PUT
https://lucidace.com /v1/projects/{project_id}/flag-policy Scope adminApplies to flags saved from now on; existing flags are checked at their next change.
Parameters
project_idstringpathrequiredRequest body
application/json
allowed_contextsstring[]When non-empty, the evaluation contexts a flag may bucket on or filter by:
distinct_id, person_id, device_id, group:<type> (group:* for any group), context:<user|device|org>.require_descriptionbooleanEvery flag has a description.
require_ownerbooleanEvery flag has an owner.
required_tagsstring[]When non-empty, every flag carries at least one of these tags (e.g. team tags).
{
"allowed_contexts": [],
"require_description": false,
"require_owner": false,
"required_tags": []
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/flag-policy" \
-H "Content-Type: application/json" \
-d '{"allowed_contexts":[],"require_description":false,"require_owner":false,"required_tags":[]}'TypeScript
Python
Go
PHP
Ruby
Java
GET
https://lucidace.com /v1/projects/{project_id}/flag-previews Scope flag:readParameters
project_idstringpathrequiredflag_keystringquerydistinct_idstringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-previews"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"distinct_id": "string",
"flag_key": "string",
"variant": "string"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
created_atstringrequireddistinct_idstringrequiredflag_keystringrequiredvariantstringrequiredA variant key, or
on for a boolean / config flag.next_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flag-previews Scope flag:writeParameters
project_idstringpathrequiredRequest body
application/json
distinct_idstringrequiredflag_keystringrequiredvariantstringrequiredA variant key of the flag;
on for a flag without variants.{
"distinct_id": "string",
"flag_key": "string",
"variant": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-previews" \
-H "Content-Type: application/json" \
-d '{"distinct_id":"string","flag_key":"string","variant":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"created_at": "2024-01-01T00:00:00Z",
"distinct_id": "string",
"flag_key": "string",
"variant": "string"
}Schema
created_atstringrequireddistinct_idstringrequiredflag_keystringrequiredvariantstringrequiredA variant key, or
on for a boolean / config flag.400
403
404 No such flag
DELETE
https://lucidace.com /v1/projects/{project_id}/flag-previews Scope flag:writeParameters
project_idstringpathrequiredflag_keystringqueryrequireddistinct_idstringqueryrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/flag-previews?flag_key=<flag_key>&distinct_id=<distinct_id>"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
GET
https://lucidace.com /v1/projects/{project_id}/flag-purposes Scope flag:readThe purposes of the project's flags and the effective lifetimes.
Parameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-purposes"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"flags": {},
"lifetimes": {},
"purposes": [
"string"
]
}Schema
flagsobjectrequired{flag_id: purpose} for every flag that has one.lifetimesobjectrequiredEffective expected lifetime in days per purpose (
null = permanent).purposesstring[]requiredEvery purpose, in display order.
404
PUT
https://lucidace.com /v1/projects/{project_id}/flag-purposes/lifetimes Scope adminReplace the project's lifetime overrides (`{purpose: days | null}`; absent = default).
Parameters
project_idstringpathrequiredRequest body
application/json
{}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/flag-purposes/lifetimes" \
-H "Content-Type: application/json" \
-d '{}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Effective lifetimes
400
403
404
POST
https://lucidace.com /v1/projects/{project_id}/flag-schedules/preview Scope flag:readParameters
project_idstringpathrequiredRequest body
application/json
countintegerRuns to list, 1-50 (default 5).
cronstringends_atstringrecurrencestringrun_atstringrequiredtimezonestring{
"count": 0,
"cron": "string",
"ends_at": "2024-01-01T00:00:00Z",
"recurrence": "string",
"run_at": "2024-01-01T00:00:00Z",
"timezone": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-schedules/preview" \
-H "Content-Type: application/json" \
-d '{"count":0,"cron":"string","ends_at":"2024-01-01T00:00:00Z","recurrence":"string","run_at":"2024-01-01T00:00:00Z","timezone":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"runs": [
"2024-01-01T00:00:00Z"
],
"timezone": "string"
}Schema
runsstring[]requiredtimezonestringrequired400
404
GET
https://lucidace.com /v1/projects/{project_id}/flag-segments Scope flag:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-segments"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"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"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
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_atstringrequirednext_cursorstring404
Updated