Rate this page Â
- ★★
- ★★
- ★★
- ★★
- ★★
Can we improve this page? Send us feedbackRate this page
- ★★
- ★★
- ★★
- ★★
- ★★
The Notehub environment variable API provides RESTful methods that can be used
to GET
, PUT
, and DELETE
data related to
environment variables.
Get all project-level environment variables by ProjectUID.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
curl -X GET -L 'https://api.notefile.net/v1/projects/<projectUID>/environment_variables' -H 'X-SESSION-TOKEN: <authToken>'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "project_humidity": "33.4", "project_temp": "24.1" } }
Set project-level environment variables by ProjectUID.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
env_vars
object
A JSON object containing the key/value pair(s) of environment variable(s) to
add. For example: {"key1":"value1","key2":"value2"}
.
curl -X PUT -L 'https://api.notefile.net/v1/projects/<projectUID>/environment_variables' -H 'X-SESSION-TOKEN: <authToken>' -d '{"environment_variables":<env_vars>}'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "project_humidity": "33.4", "project_temp": "24.1" } }
Delete a project-level environment variable by ProjectUID and environment variable key.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
key
string
The key from the key/value pair of the environment variable to be deleted.
curl -X DELETE -L 'https://api.notefile.net/v1/projects/<projectUID>/environment_variables/<key>' -H 'X-SESSION-TOKEN: <authToken>'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "project_humidity": "33.4", "project_temp": "24.1" } }
Get all fleet-level environment variables by ProjectUID and FleetUID.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
fleetUID
string
The FleetUID of a Notehub device fleet.
curl -X GET -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/environment_variables' -H 'X-SESSION-TOKEN: <authToken>'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "fleet_humidity": "33.4", "fleet_temp": "24.1" } }
Set fleet-level environment variables by ProjectUID and FleetUID.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
fleetUID
string
The FleetUID of a Notehub device fleet.
env_vars
object
A JSON object containing the key/value pair(s) of environment variable(s) to be
added to the fleet. For example: {"key1":"value1","key2":"value2"}
.
curl -X PUT -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/environment_variables' -H 'X-SESSION-TOKEN: <authToken>' -d '{"environment_variables":<env_vars>}'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "fleet_humidity": "33.4", "fleet_temp": "24.1" } }
Delete a fleet-level environment variable on a Notehub project by ProjectUID, FleetUID, and environment variable key.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
fleetUID
string
The FleetUID of a Notehub device fleet.
key
string
The key from the key/value pair of the environment variable to be deleted.
curl -X DELETE -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/<fleetUID>/environment_variables/<key>' -H 'X-SESSION-TOKEN: <authToken>'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "fleet_humidity": "33.4", "fleet_temp": "24.1" } }
Get all device-level environment variables by ProjectUID and DeviceUID.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
deviceUID
string
The DeviceUID of a Notehub device.
It can also accept a serial number by prefixing the serial number with sn:
. Please note that the serial number must be URL encoded.
curl -X GET -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/environment_variables' -H 'X-SESSION-TOKEN: <authToken>'
environment_variables
object
JSON object containing device-level environment variables in "key":"value"
format.
environment_variables_env_default
object
JSON object containing any default environment variables in "key":"value"
format.
{ "environment_variables": { "_tags": "", "device_humidity": "55.9", "device_temp": "79.0" }, "environment_variables_env_default": {} }
Set device-level environment variables by ProjectUID and DeviceUID.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
deviceUID
string
The DeviceUID of a Notehub device.
It can also accept a serial number by prefixing the serial number with sn:
. Please note that the serial number must be URL encoded.
env_vars
object
A JSON object containing the key/value pair(s) of environment variable(s) to be added. For example: {"key1":"value1","key2":"value2"}
.
curl -X PUT -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/environment_variables' -H 'X-SESSION-TOKEN: <authToken>' -d '{"environment_variables":<env_vars>}'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "_tags": "", "device_humidity": "55.9", "device_temp": "79.0" } }
Delete an environment variable by ProjectUID, DeviceUID, and environment variable key.
Minimum Notehub project-level role required:
authToken
string
A Notehub API authentication token.
projectUID
string
The ProjectUID from a Notehub project.
deviceUID
string
The DeviceUID of a Notehub device.
It can also accept a serial number by prefixing the serial number with sn:
. Please note that the serial number must be URL encoded.
key
string
The key from the key/value pair of the environment variable to be deleted.
curl -X DELETE -L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/environment_variables/<key>' -H 'X-SESSION-TOKEN: <authToken>'
environment_variables
object
JSON object containing environment variables in "key":"value"
format.
{ "environment_variables": { "_tags": "", "device_humidity": "55.9", "device_temp": "79.0" } }