Skip to main content
Retrieve all global environment variables set in the sandbox. Sensitive values (containing KEY, SECRET, PASSWORD, TOKEN) are masked for security.

Endpoint

GET /env

Request

Headers

Authorization: Bearer YOUR_JWT_TOKEN

Example Request

curl https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response

Success (200 OK)

{
  "env_vars": {
    "PATH": "/usr/local/bin:/usr/bin:/bin",
    "HOME": "/root",
    "DATABASE_URL": "postgres://localhost/mydb",
    "API_KEY": "***MASKED***",
    "SECRET_TOKEN": "***MASKED***"
  }
}

Status Codes

CodeDescription
200Success
401Unauthorized

Use Cases

View All Variables

curl https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq '.env_vars'

Check Specific Variable

curl https://sandbox_abc123xyz.hopx.dev/env \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" | jq -r '.env_vars.DATABASE_URL'

Next Steps