Changing Smartspot settings can also be done through the Web API through an HTTP PUT request.
Retrieving the database ID of the Smartspot
First you will need to know the database ID of the Smartspot.
- Go the Brain Management Console and login.
- Go to
https://<brain-address>.intellifi.nl/api/spots?serial_number=<serial-number>
- Copy the
id
value under the results page. This value usually looks like this:5b2cadfb8be92f37e81f0999
HTTP PUT request on Web API spots resource
You can now perform an HTTP PUT request on the spots endpoint to change one or more settings.
- Use the following target URL:
https://<brain-address>.intellifi.nl/api/spots/<database-id>
- Use the following headers:
- Content-Type: application/json
- X-Api-Key: The Brain API key that was supplied to you.
- For the body we use JSON. In this example, we are going to change the
rfid_power_dbm
setting of the Smartspot. All settings that need to be changed will fall under theconfig_request
object. You can change more than one setting at a time.{ "config_request": { "rfid_power_dbm": 27 } }
- Send the request. An HTTP response with the status code 200 OK indicates the request was succesful. If the Smartspot is online, it should reboot to apply the new settings.
Example using cURL
Using cURL in a terminal/console the request could look like the following:
curl -X PUT -H 'Content-Type: application/json' -H 'X-Api-Key: <brain_api_key>' -d '{"config_request": {"rfid_power_dbm": 28}}' https://<brain-address>.intellifi.nl/api/spots/<database-id>
Comments
0 comments
Article is closed for comments.