Improve this doc
Detailed information for resources

balenaCloud API Resources

Note: We recently renamed applications to fleets and are in the process of updating our API resources. Application resources continue to function correctly and can be used to work with fleets. Find out more about the changes here.

Available fields

id
created_at
application
name
value

Examples

Get all fleet environment variables for a fleet

curl -X GET \
"https://api.balena-cloud.com/v6/application_environment_variable?\$filter=application%20eq%20<FLEET ID>" \
-H  "Content-Type: application/json"  \
-H "Authorization: Bearer <AUTH_TOKEN>" 

Create a fleet environment variable

curl -X POST \
"https://api.balena-cloud.com/v6/application_environment_variable" \
-H  "Content-Type: application/json"  \
-H "Authorization: Bearer <AUTH_TOKEN>" \
--data '{
    "application": "<FLEET ID>",
    "name": "<NAME>",
    "value": "<VALUE>"
}'

Update a fleet environment variable

curl -X PATCH \
"https://api.balena-cloud.com/v6/application_environment_variable(<ID>)" \
-H  "Content-Type: application/json"  \
-H "Authorization: Bearer <AUTH_TOKEN>" \
--data '{
    "value": "<NEW VALUE>"
}'

Remove a fleet environment variable

curl -X DELETE \
"https://api.balena-cloud.com/v6/application_environment_variable(<ID>)" \
-H  "Content-Type: application/json"  \
-H "Authorization: Bearer <AUTH_TOKEN>"