Getting started
List environment variables
Read variable names and non-secret values. Secret values are masked.
GET
/api/customer/v1/projects/{projectId}/environmentPath parameters
| Name | Value |
|---|---|
projectId | Required resource ID from an earlier API response. |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request GET "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}/environment" \
--header "Authorization: Bearer $HCODE_API_KEY" Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"isSecret": {
"type": "boolean"
}
},
"required": [
"key",
"value",
"isSecret"
],
"additionalProperties": true
}
}
},
"required": [
"variables"
],
"additionalProperties": true
}See errors and retries for failure responses.