flags

Embed
Preview of the card
<a href="https://lucida.15-204-158-166.sslip.io/docs/ref-flags"><img src="https://lucida.15-204-158-166.sslip.io/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://lucida.15-204-158-166.sslip.io/v1/flag-health/{token}

Receive health reports. Unknown or revoked tokens are 404; a missing or bad signature on a signed hook is 401. Reports naming an unknown flag are skipped and listed in `unmatched`.

Parameters

tokenstringpathrequired

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/flag-health/{token}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {received, applied, unmatched, triggered}
400
401
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/flag-triggers/{token}

Fire a trigger. Unknown or revoked tokens are 404; a missing, stale or wrong signature is 401.

Parameters

tokenstringpathrequired
Lucida-Signaturestringheaderrequired
t=<unix>,v1=<hex hmac-sha256(secret, "<t>.<body>")>

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/flag-triggers/{token}" \
  -H "Lucida-Signature: <value>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {flag, action, version}
401
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests

Parameters

project_idstringpathrequired
statusstringquery
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
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[]required
Show child parameters
applied_versioninteger
approvalsobject[]required
[{user_id, note, at}], one entry per approver so far.
base_versioninteger
Flag version the request was made against; apply fails when the flag moved on.
created_atstringrequired
environmentstring
experiment_idstring
expires_atstring
Pending or approved requests past this instant expire unused.
failure_reasonstring
Why a failed request could not be applied.
flag_idstring
idstringrequired
policy_keystring
The approval-policy key whose rule governs this request (flag.rollout, ...).
project_idstringrequired
proposalobjectrequired
quorumintegerrequired
Approvals needed before the request counts as approved.
requested_bystring
review_notestring
reviewed_atstring
reviewed_bystring
statusstringrequired
subjectstringrequired
next_cursorstring
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/apply

Parameters

project_idstringpathrequired
crstringpathrequired

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/apply"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "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_versioninteger
approvalsobject[]required
[{user_id, note, at}], one entry per approver so far.
base_versioninteger
Flag version the request was made against; apply fails when the flag moved on.
created_atstringrequired
environmentstring
experiment_idstring
expires_atstring
Pending or approved requests past this instant expire unused.
failure_reasonstring
Why a failed request could not be applied.
flag_idstring
idstringrequired
policy_keystring
The approval-policy key whose rule governs this request (flag.rollout, ...).
project_idstringrequired
proposalobjectrequired
quorumintegerrequired
Approvals needed before the request counts as approved.
requested_bystring
review_notestring
reviewed_atstring
reviewed_bystring
statusstringrequired
subjectstringrequired
403
404
409
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/approve

Parameters

project_idstringpathrequired
crstringpathrequired

Request body

application/json
applyboolean
Approve and apply in one call (flag changes; experiment start).
notestring
{
  "apply": true,
  "note": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/approve" \
  -H "Content-Type: application/json" \
  -d '{"apply":true,"note":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
409
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/cancel

Parameters

project_idstringpathrequired
crstringpathrequired

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/cancel"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
409
POSThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/reject

Parameters

project_idstringpathrequired
crstringpathrequired

Request body

application/json
applyboolean
Approve and apply in one call (flag changes; experiment start).
notestring
{
  "apply": true,
  "note": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/change-requests/{cr}/reject" \
  -H "Content-Type: application/json" \
  -d '{"apply":true,"note":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
409
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/flag-audit

Parameters

project_idstringpathrequired
daysintegerquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/flag-audit"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "cliffs": [
    {
      "after": 0,
      "before": 0,
      "day": "string",
      "flag": "string"
    }
  ],
  "days": 0,
  "debt": [
    {
      "flag": "string",
      "points": 0,
      "reasons": [
        "string"
      ]
    }
  ],
  "debt_score": 0,
  "ghosts": [
    {
      "calls": 0,
      "flag": "string"
    }
  ],
  "shifts": [
    {
      "before": 0,
      "flag": "string",
      "recent": 0,
      "value": "string"
    }
  ]
}
Schema
cliffsCliff[]required
Show child parameters
afterintegerrequired
Calls on the last full day.
beforeintegerrequired
Median daily calls before the drop.
daystringrequired
flagstringrequired
daysintegerrequired
debtDebtItem[]required
Show child parameters
flagstringrequired
pointsintegerrequired
reasonsstring[]required
debt_scoreintegerrequired
Sum of the points of every flag with debt; lower is better.
ghostsGhost[]required
Show child parameters
callsintegerrequired
flagstringrequired
Called by an SDK but no live flag has this key.
shiftsShift[]required
Show child parameters
beforenumberrequired
Share of calls before and in the last three days, 0 to 1.
flagstringrequired
recentnumberrequired
valuestringrequired
Served value whose share moved the most.
400
404
503
GEThttps://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/flag-blocklist

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/projects/{project_id}/flag-blocklist"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "id": "string",
      "kind": "string",
      "note": "string",
      "value": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
created_atstringrequired
idstringrequired
kindstringrequired
host (exact, or *.example.com) or cidr.
notestringrequired
valuestringrequired
next_cursorstring
404

Updated