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>
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/triggersScope admin

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
actionstringrequired
enable | disable | kill
environmentstring
Environment for enable / disable; absent = the base state. Ignored by kill (all environments).
namestringrequired
{
  "action": "string",
  "environment": "string",
  "name": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/{id}/triggers" \
  -H "Content-Type: application/json" \
  -d '{"action":"string","environment":"string","name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "secret": "string",
  "trigger": {
    "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"
  },
  "url": "string"
}
Schema
secretstringrequired
HMAC-SHA256 key for the Lucida-Signature header.
triggerobjectrequired
Show child parameters
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
urlstringrequired
POST here to fire.
400
403
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/triggers/{tid}Scope admin

Parameters

project_idstringpathrequired
idstringpathrequired
tidstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/flags/{id}/triggers/{tid}"
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
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/triggers/{tid}/rotateScope admin

Parameters

project_idstringpathrequired
idstringpathrequired
tidstringpathrequired

Code samples

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

Responses

403
404
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/usageScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired
fromstringquery
tostringquery

Code samples

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

Responses

200
Example
{
  "flag": "string",
  "series": [
    {
      "calls": 0,
      "day": "string",
      "value": "string"
    }
  ]
}
Schema
flagstringrequired
seriesUsagePoint[]required
Show child parameters
callsintegerrequired
Number of evaluations.
daystringrequired
YYYY-MM-DD
valuestringrequired
Served value (true, a variant key, ...).
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/value-schemaScope flag:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

200
Example
{
  "schema": {}
}
Schema
schemaobjectrequired
JSON Schema subset: type, enum, const, required, properties, additionalProperties, items, minItems, maxItems, minimum, maximum, minLength, maxLength, pattern (plus title, description, default).
404 No such flag, or it has no schema
PUThttps://lucidace.com/v1/projects/{project_id}/flags/{id}/value-schemaScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
schemaobjectrequired
JSON Schema subset: type, enum, const, required, properties, additionalProperties, items, minItems, maxItems, minimum, maximum, minLength, maxLength, pattern (plus title, description, default).
{
  "schema": {}
}

Code samples

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

Responses

400 Bad schema, or a current payload breaks it
403
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/flags/{id}/value-schemaScope flag:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/link-templatesScope flag:read

Parameters

project_idstringpathrequired

Code samples

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

Responses

200
Example
[
  {
    "created_at": "2024-01-01T00:00:00Z",
    "created_by": "string",
    "id": "string",
    "kind": "string",
    "object_type": "string",
    "title": "string",
    "url_template": "string"
  }
]
Schema
created_atstringrequired
created_bystring
idstringrequired
kindstringrequired
object_typestringrequired
flag | experiment | any
titlestringrequired
url_templatestringrequired
URL with {key}, {project} and {name} placeholders.
404
POSThttps://lucidace.com/v1/projects/{project_id}/link-templatesScope admin

Parameters

project_idstringpathrequired

Request body

application/json
kindstringrequired
object_typestringrequired
flag | experiment | any
titlestringrequired
url_templatestringrequired
http(s) URL with {key}, {project} and {name} placeholders.
{
  "kind": "string",
  "object_type": "string",
  "title": "string",
  "url_template": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/link-templates" \
  -H "Content-Type: application/json" \
  -d '{"kind":"string","object_type":"string","title":"string","url_template":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "id": "string",
  "kind": "string",
  "object_type": "string",
  "title": "string",
  "url_template": "string"
}
Schema
created_atstringrequired
created_bystring
idstringrequired
kindstringrequired
object_typestringrequired
flag | experiment | any
titlestringrequired
url_templatestringrequired
URL with {key}, {project} and {name} placeholders.
400
403
404

Updated