A Bruno collection covering the Spacelift GraphQL API. Use it to explore, test, and script against your Spacelift account.
- Bruno desktop app or the Bruno VS Code extension
- A Spacelift account with an API key — create one under Settings → API Keys
In Bruno, click Open Collection and select the Spacelift/ folder from this repository.
Copy the example environment file and fill in your credentials:
cp Spacelift/environments/local.bru.example Spacelift/environments/local.bruOpen the local environment in Bruno (gear icon → Environments → local) and fill in:
| Variable | Description |
|---|---|
SPACELIFT_ENDPOINT |
Your account's GraphQL endpoint, e.g. https://myaccount.app.spacelift.io/graphql |
SPACELIFT_API_KEY_ID |
The ID of your API key (shown after creation) |
SPACELIFT_API_KEY_SECRET |
The secret for your API key (shown only once at creation) — stored as a secret variable |
Leave jwt blank — it is filled in automatically in the next step.
Run Auth → Get Token. Bruno will store the token and use it for all subsequent requests. Tokens expire after a few hours — just re-run this request if you start getting authentication errors.
Trigger and confirm a run:
- Stacks → List Stacks — find your stack's ID
- Runs → Trigger Run — set
stackto that ID - Runs → Confirm Run — set
stackandrunto confirm it
Attach a policy to a stack:
- Policies → List Policies — find the policy ID
- Stacks → List Stacks — find the stack ID
- Policies → Attach Policy — provide both IDs
Add an environment variable to a context:
- Contexts → List Contexts — find the context ID
- Contexts → Add Config — set
contextto that ID, setconfig.typetoENVIRONMENT_VARIABLE
Requests that require IDs use obvious placeholder strings like STACK_ID_HERE. Replace these in the Variables panel before sending.
The collection covers all non-deprecated Spacelift API endpoints, organized into folders by resource type.
For information about how to contribute, please see our CONTRIBUTING.md file.
This repository is licensed under the MIT License.