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}/flag-policyScope flag:read

Parameters

project_idstringpathrequired

Code 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_descriptionboolean
Every flag has a description.
= false
require_ownerboolean
Every flag has an owner.
= false
required_tagsstring[]
When non-empty, every flag carries at least one of these tags (e.g. team tags).
= []
404
PUThttps://lucidace.com/v1/projects/{project_id}/flag-policyScope admin

Applies to flags saved from now on; existing flags are checked at their next change.

Parameters

project_idstringpathrequired

Request 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_descriptionboolean
Every flag has a description.
= false
require_ownerboolean
Every flag has an owner.
= false
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

Responses

400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/flag-previewsScope flag:read

Parameters

project_idstringpathrequired
flag_keystringquery
distinct_idstringquery
limitintegerquery
cursorstringquery

Code 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[]required
Show child parameters
created_atstringrequired
distinct_idstringrequired
flag_keystringrequired
variantstringrequired
A variant key, or on for a boolean / config flag.
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/flag-previewsScope flag:write

Parameters

project_idstringpathrequired

Request body

application/json
distinct_idstringrequired
flag_keystringrequired
variantstringrequired
A 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_atstringrequired
distinct_idstringrequired
flag_keystringrequired
variantstringrequired
A variant key, or on for a boolean / config flag.
400
403
404 No such flag
DELETEhttps://lucidace.com/v1/projects/{project_id}/flag-previewsScope flag:write

Parameters

project_idstringpathrequired
flag_keystringqueryrequired
distinct_idstringqueryrequired

Code 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
GEThttps://lucidace.com/v1/projects/{project_id}/flag-purposesScope flag:read

The purposes of the project's flags and the effective lifetimes.

Parameters

project_idstringpathrequired

Code 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.
lifetimesobjectrequired
Effective expected lifetime in days per purpose (null = permanent).
purposesstring[]required
Every purpose, in display order.
404
PUThttps://lucidace.com/v1/projects/{project_id}/flag-purposes/lifetimesScope admin

Replace the project's lifetime overrides (`{purpose: days | null}`; absent = default).

Parameters

project_idstringpathrequired

Request 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
POSThttps://lucidace.com/v1/projects/{project_id}/flag-schedules/previewScope flag:read

Parameters

project_idstringpathrequired

Request body

application/json
countinteger
Runs to list, 1-50 (default 5).
cronstring
ends_atstring
recurrencestring
run_atstringrequired
timezonestring
{
  "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[]required
timezonestringrequired
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/flag-segmentsScope flag:read

Parameters

project_idstringpathrequired

Code 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[]required
Show child parameters
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
keystringrequired
kindstringrequired
rules (expanded into definitions), list (uploaded members) or synced (members materialised from a connector-mirrored warehouse table).
member_countintegerrequired
namestringrequired
rulesobject[]required
[{filters: [Filter]}]: rules are OR-ed, a rule's filters AND-ed.
sourceobject
synced only: {table, column} of warehouse_rows (column empty = the row key).
sync_errorstring
synced_atstring
updated_atstringrequired
next_cursorstring
404

Updated