Skip to main content

Environments API

API for managing organization environment variables and secrets

Quick Startโ€‹

# List available operations
epilot environments

# Call an operation
epilot environments listEnvironmentVariables

Common Flagsโ€‹

FlagDescription
-p key=valueSet 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, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operationsโ€‹

environments

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

NameInTypeRequiredDescription
keypathstringYesEnvironment 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

NameInTypeRequiredDescription
keypathstringYesEnvironment 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

NameInTypeRequiredDescription
keypathstringYesEnvironment 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 '$'