flags
POST
https://lucidace.com /v1/projects/{project_id}/flag-segments Scope flag:writeParameters
project_idstringpathrequiredRequest body
application/json
descriptionstringkeystringrequired1 to 100 chars of letters, digits,
_, -, .; referenced from flag conditions.kindstringrules (default), list (uploaded members) or synced (members from a mirrored table).namestringrulesobject[][{filters: [Filter]}]: rules are OR-ed, a rule's filters AND-ed. Empty for member segments.sourceobjectsynced: {table, column} of a connector-mirrored warehouse table (column absent = row key).{
"description": "string",
"key": "string",
"kind": "string",
"name": "string",
"rules": [
{}
],
"source": {}
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-segments" \
-H "Content-Type: application/json" \
-d '{"description":"string","key":"string","kind":"string","name":"string","rules":[{}],"source":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
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_atstringrequired400
403
404
409
GET
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id} Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}"TypeScript
Python
Go
PHP
Ruby
Java
PUT
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id} Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
descriptionstringnamestringrulesobject[]sourceobjectsynced segments: replace the source.{
"description": "string",
"name": "string",
"rules": [
{}
],
"source": {}
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}" \
-H "Content-Type: application/json" \
-d '{"description":"string","name":"string","rules":[{}],"source":{}}'TypeScript
Python
Go
PHP
Ruby
Java
DELETE
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id} Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
409
GET
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/change-requests Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/change-requests"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Pending and approved requests of the segment
Example
{
"data": [
{
"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"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
applied_versionintegerapprovalsobject[]required[{user_id, note, at}], one entry per approver so far.base_versionintegerFlag version the request was made against; apply fails when the flag moved on.
created_atstringrequiredenvironmentstringexperiment_idstringexpires_atstringPending or approved requests past this instant expire unused.
failure_reasonstringWhy a
failed request could not be applied.flag_idstringidstringrequiredpolicy_keystringThe approval-policy key whose rule governs this request (
flag.rollout, ...).project_idstringrequiredproposalobjectrequiredquorumintegerrequiredApprovals needed before the request counts as approved.
requested_bystringreview_notestringreviewed_atstringreviewed_bystringstatusstringrequiredsubjectstringrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/change-requests Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
The segment body an edit writes (same fields as PUT /flag-segments/{id}).
descriptionstringnamestringrulesobject[]sourceobject{
"description": "string",
"name": "string",
"rules": [
{}
],
"source": {}
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/change-requests" \
-H "Content-Type: application/json" \
-d '{"description":"string","name":"string","rules":[{}],"source":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Pending request; approving it with
apply: true writes the editExample
{
"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"
}Schema
applied_versionintegerapprovalsobject[]required[{user_id, note, at}], one entry per approver so far.base_versionintegerFlag version the request was made against; apply fails when the flag moved on.
created_atstringrequiredenvironmentstringexperiment_idstringexpires_atstringPending or approved requests past this instant expire unused.
failure_reasonstringWhy a
failed request could not be applied.flag_idstringidstringrequiredpolicy_keystringThe approval-policy key whose rule governs this request (
flag.rollout, ...).project_idstringrequiredproposalobjectrequiredquorumintegerrequiredApprovals needed before the request counts as approved.
requested_bystringreview_notestringreviewed_atstringreviewed_bystringstatusstringrequiredsubjectstringrequired400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/members Scope flag:readParameters
project_idstringpathrequiredidstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/members"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"added_at": "2024-01-01T00:00:00Z",
"key": "string"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
added_atstringrequiredkeystringrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flag-segments/{id}/members Scope flag:writeAdd / remove members of a `list` segment (at most 10,000 keys per call).
Parameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
addstring[]removestring[]replacebooleanDrop every member first (upload a fresh list in batches: first batch with
replace).{
"add": [],
"remove": [],
"replace": false
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flag-segments/{id}/members" \
-H "Content-Type: application/json" \
-d '{"add":[],"remove":[],"replace":false}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"member_count": 0
}Schema
member_countintegerrequired400
403
404
409
Updated