Environments
The two modes, `live` and `test`, as values.
Generated from
packages/api/src/resources/environments.controller.ts by packages/docs/tools/generate-reference.mjs. Every example is a real exchange recorded against the control plane by packages/api/src/testing/reference-examples.spec.ts, with ids from that run. Credentials in the formats this product issues (kr_, krsk_, krses_, JWTs) and values under credential-named fields (password, *_secret, *_token, *_key, lookup_hash) are elided at record time; the recorded file and every page of this site are swept for credential shapes (kr_, krsk_, krses_, JWTs, URLs carrying a password, password fields) before either is accepted. Do not edit by hand: src/reference.spec.ts regenerates it and fails on a difference.Environments are values, not rows (report section 5.2): the enum is closed so that the SDK's types are exhaustive and every composite key has a known cardinality. There is deliberately no create, update or delete here -- a third environment is a schema migration and a major SDK version, not a POST.
GET /v1/environments
Answers 200 on success.
Authentication.
- A
krsk_secret key or akrses_dashboard session, asAuthorization: Bearer.
Example.
curl https://keyring-api.belghalem.fr/v1/environments \
-H "Authorization: Bearer $KEYRING_SECRET_KEY"HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "list",
"data": [
{
"object": "environment",
"name": "live",
"billable": true
},
{
"object": "environment",
"name": "test",
"billable": false
}
]
}