...
4. Get/set property value using REST API
- Check out the GadgetkeeperAPI GadgetKeeper API - Thing Properties page for details on how to perform basic method operations on GadgetKeeper API using cURL or a REST API tool
- Obtain required parameters:
- Use API Explorer to perform REST calls using UI
- Use cURL to perform REST calls using command lines:
To get property value:
Code Block | ||
---|---|---|
|
||
curl -i -X GET -H "X-ApiKey: <API_KEY>" "http://api.gadgetkeeper.com/v1/things/<THING_ID>/properties/<PROPERTY_ID>/value.json" |
To set property value:
Code Block | ||
---|---|---|
|
||
curl -i -X PUT -H "X-ApiKey: <API_KEY>" -H "Content-Type: text/json; charset=UTF-8" -d "<NEW_TEMPERATURE_VALUE>" "http://api.gadgetkeeper.com/v1/things/<THING_ID>/properties/<PROPERTY_ID>/value.json" |