Support for device environment variables

I though I posted this before but it seems I haven’t. You can workaround the issue by doing HTTP requests directly to the API, like so:

# creates a new application config variable
# similar request works for `device_config_variable` as well
curl -X POST 'https://api.myopenbalena.com/v5/application_config_variable' \
	-H 'authorization: Bearer <TOKEN>' \
	-H 'content-type: application/json' \
	--data-binary '{"application": <APPID>,"name":"<KEY>","value":"<VALUE>"}'

# creates a new application environment variable
# similar request works for `device_environment_variable` as well
curl -X POST 'https://api.myopenbalena.com/v5/application_environment_variable' \
	-H 'authorization: Bearer <TOKEN>' \
	-H 'content-type: application/json' \
	--data-binary '{"application": <APPID>,"env_var_name":"<KEY>","value":"<VALUE>"}'

# updates the value of an application config variable.
# similar request works for `device_config_variable` as well
curl -X PATCH 'https://api.myopenbalena.com/v5/application_config_variable(<ID>)' \
	-H 'authorization: Bearer <TOKEN>' \
	-H 'content-type: application/json' \
	--data-binary '{"value":"<VALUE>"}'

# updates the value of an application environment variable
# similar request works for `device_environment_variable` as well
curl -X PATCH 'https://api.myopenbalena.com/v5/application_environment_variable(<ID>)' \
	-H 'authorization: Bearer <TOKEN>' \
	-H 'content-type: application/json' \
	--data-binary '{"value":"<VALUE>"}'

You’ll need to adjust accordingly if you’re using self-signed certificates, as it happens by default – passing --cacert <PATH_TO_CERT> should do it for curl.

Note that these queries will stop working as soon as the issue is fixed.