Sites Parameters API
The Site Parameters API allow Site Parameters to be queried and modified.
| HTML Method | URI | Action |
|---|---|---|
| GET | /sites/{SITE_ID}/parameters | Get the current Parameters for a Site |
| PUT | /sites/{SITE_ID}/parameters | Modify Parameters for a Site |
Get Site Parameters
URI Parameters: SITE_ID
HTML Method: GET
Example:
curl -H 'X-Api-Key: API_KEY' https://www.telemetry.net.au/api/v1/sites/1000/parameters
Returns: If the call succeeds, returns the Site Parameters in JSON format. Currently only the Site Variables are returned but this will be expanded on in the future. Variables are returned in their raw name (e.g. var1) and the site specific name (e.g. “AlarmLevel”). Only the Parameters that are in use by the Config are returned.
{
"var1":20.0,
"AlarmLow":20.0,
"var2":80.0,
"AlarmHigh":80.0,
"var5":2.0,
"FlowSamples":2.0,
"var6":5.2,
"Radius":5.2,
}
Modify Site Parameters
URI Parameters: SITE_ID
HTML Method: PUT
PUT Data: JSON format specifying the parameters to change for the specified Site. Allowable parameters are identical the values returned by the “Get Site Parameters” call.
Example:
curl -X PUT -H "Content-Type: application/json" -H 'X-Api-Key: API_KEY' --data '{"var2":10}' https://www.telemetry.net.au/api/v1/sites/1000/parameters
Returns: If the call succeeds, returns the complete set of Site Parameters in JSON format.
Note
API Key must have write access