Environments API
- Base URL:
https://environments.sls.epilot.io - API Docs: https://docs.epilot.io/api/environments
API for managing organization environment variables and secrets
Quick Startโ
# List available operations
epilot environments
# Call an operation
epilot environments listEnvironmentVariables
Common Flagsโ
| Flag | Description |
|---|---|
-p key=value | Set a named parameter |
-d '{...}' | Request body JSON |
-H 'Key: Value' | Custom header |
-t, --token <token> | Bearer token for authentication |
--profile <name> | Use a named profile |
-s, --server <url> | Override server base URL |
-i, --include | Include response headers in output |
--json | Output raw JSON (no formatting) |
-v, --verbose | Verbose output (show request details) |
--jsonata <expr> | JSONata expression to transform response |
--definition <file> | Override OpenAPI spec file/URL |
--guided | Prompt for all parameters interactively |
--no-interactive | Disable interactive prompts |
Operationsโ
environments
listEnvironmentVariablesโ List all environment variables for the organization. Returns metadata only, no secret values.createEnvironmentVariableโ Create a new environment variable or secret for the organization.getEnvironmentVariableโ Get an environment variable by key. Returns value only for String type, omitted for SecretString.updateEnvironmentVariableโ Create or update an environment variable. Acts as an upsert โ creates the variable if it does not exist.deleteEnvironmentVariableโ Delete an environment variable by key.
listEnvironmentVariablesโ
List all environment variables for the organization. Returns metadata only, no secret values.
GET /v1/environments
Sample Call
epilot environments listEnvironmentVariables
With JSONata filter:
epilot environments listEnvironmentVariables --jsonata 'items[0]'
Sample Response
{
"items": [
{
"key": "string",
"type": "String",
"description": "string",
"value": "string",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
]
}
createEnvironmentVariableโ
Create a new environment variable or secret for the organization.
POST /v1/environments
Request Body (required)
Sample Call
epilot environments createEnvironmentVariable \
-d '{"key":"string","type":"String","description":"string","value":"string"}'
Using stdin pipe:
cat body.json | epilot environments createEnvironmentVariable
With JSONata filter:
epilot environments createEnvironmentVariable --jsonata 'key'
Sample Response
{
"key": "string",
"type": "String",
"description": "string",
"value": "string",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
getEnvironmentVariableโ
Get an environment variable by key. Returns value only for String type, omitted for SecretString.
GET /v1/environments/{key}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | Environment variable key |
Sample Call
epilot environments getEnvironmentVariable \
-p key=example
Using positional args for path parameters:
epilot environments getEnvironmentVariable example
With JSONata filter:
epilot environments getEnvironmentVariable -p key=example --jsonata 'key'
Sample Response
{
"key": "string",
"type": "String",
"description": "string",
"value": "string",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
updateEnvironmentVariableโ
Create or update an environment variable. Acts as an upsert โ creates the variable if it does not exist.
PUT /v1/environments/{key}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | Environment variable key |
Request Body (required)
Sample Call
epilot environments updateEnvironmentVariable \
-p key=example \
-d '{"type":"String","value":"string","description":"string"}'
Using positional args for path parameters:
epilot environments updateEnvironmentVariable example
Using stdin pipe:
cat body.json | epilot environments updateEnvironmentVariable -p key=example
With JSONata filter:
epilot environments updateEnvironmentVariable -p key=example --jsonata 'key'
Sample Response
{
"key": "string",
"type": "String",
"description": "string",
"value": "string",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z"
}
deleteEnvironmentVariableโ
Delete an environment variable by key.
DELETE /v1/environments/{key}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | Environment variable key |
Sample Call
epilot environments deleteEnvironmentVariable \
-p key=example
Using positional args for path parameters:
epilot environments deleteEnvironmentVariable example
With JSONata filter:
epilot environments deleteEnvironmentVariable -p key=example --jsonata '$'