Developer guide: 0. Set up your shell

Define the lc helper, the API and capture hosts and the key variables every later call reuses.

Embed
Preview of the card
<a href="https://lucidace.com/help/developer-guide-set-up-your-shell"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/778fb6db-bf43-4c1e-96b5-aa19fc7b45f4/social-card.svg?v=3e7ae33eec8b" alt="Developer guide: 0. Set up your shell" width="600" height="315"></a>

0. Set up your shell

export LUCIDA_API="https://lucidace.com"            # app / management API
export LUCIDA_CAPTURE="https://capture.lucidace.com" # event + flag-decide + replay ingest
export LUCIDA_ACCOUNT_KEY="lc_pat_..."                                 # your account key, keep it secret

# Management API call helper: adds the auth header and JSON content type
lc() { curl -sS -H "Authorization: Bearer $LUCIDA_ACCOUNT_KEY" -H "Content-Type: application/json" "$@"; }

The two hosts are the current values for this deployment. If you run your own Lucida, use your own two hosts: the API host serves /v1/orgs, /v1/projects/... and the rest of the management API; the capture host serves only POST /v1/batch, /v1/s2s/batch, /v1/capture, /v1/flags, /v1/replay and the other ingest and flag-evaluation routes (section 3). The examples use jq to pick ids out of answers. Variables set in earlier steps ($ORG_ID, $PROJECT_ID, $PK, $SK) are reused everywhere. Never print or log a key; read secrets from a file or a secret store.

Updated