Secrets & Variables API | FlightStack
Secrets & Variables API
Section titled “Secrets & Variables API”FlightStack stores environment variables and secrets in one store, scoped by org, repo, or variable group. Secrets are encrypted at rest and never returned in plaintext after creation.
All endpoints under /secrets.
Endpoints
Section titled “Endpoints”Variables
Section titled “Variables”| Method | Path | Purpose |
|---|---|---|
| GET | /secrets/variables | List variables. Filters: orgId=, repoId=, groupId=, scope=, includeInactive=. |
| POST | /secrets/variables | Create a variable. |
| PUT | /secrets/variables/{id} | Update a variable (key, value, isSecret, description, isActive). |
| DELETE | /secrets/variables/{id} | Delete a variable. |
Variable groups
Section titled “Variable groups”| Method | Path | Purpose |
|---|---|---|
| GET | /secrets/groups | List variable groups. Query: orgId=, includeVariables=. |
Create a variable
Section titled “Create a variable”curl -X POST https://api.flightstack.voostack.com/secrets/variables \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "key": "API_BASE_URL", "value": "https://api.example.com", "isSecret": false, "scope": "repository", "repoId": "7d2a8c84-...", "description": "Backend base URL for prod builds" }'Payload fields
Section titled “Payload fields”| Field | Type | Notes |
|---|---|---|
key | string | Variable name (uppercase + underscores recommended). |
value | string | Plain text. For isSecret=true, sent over TLS and encrypted at rest. |
isSecret | bool | Mask in logs; not returned on subsequent GETs. |
scope | organization|repository|group|pipeline | Which level the variable applies to. |
orgId | string | Required when scope is organization or group. |
repoId | string | Required when scope is repository. |
groupId | string | Required when scope is group. |
description | string | Shown in the dashboard. |
Scope resolution
Section titled “Scope resolution”When a build runs, FlightStack composes variables in this order (later overrides earlier):
- Organization-scoped variables
- Variable group(s) attached to the pipeline
- Repository-scoped variables
- Pipeline-scoped variables
- Per-run overrides passed in
POST /build→envVariables
Secrets are injected as environment variables on the agent. Use the ${{ }} syntax in
pipeline YAML to reference them — see variables docs.
See also
Section titled “See also”- Variables & step outputs — syntax and scoping
- Secrets management guide — operational patterns