Overview

Through Terminal or another CLI interface you can send Curl commands to the Brain. You can also use Postman to send PUT commands, but this thread only focuses on the Curl commands via CLI.

Commands
NOTE In the below commands, you will need to replace BRAIN_IP with the IP address of your Brain

Clear Cache

  • curl -H “Content-Type: application/json” -H “Accept: application/json” -d “{}” -X PUT http://BRAIN_IP:8000/api/v1/clear-cache
    This command clears storage within the Brain. Items such as devices, images and log storage will be cleared. After sending this command a new sync will be triggered pulling the latest information from the Cloud to the Brain

Clear Logs

  • curl -H “Content-Type: application/json” -H “Accept: application/json” -d “{}” -X PUT http://BRAIN_IP:8000/api/v1/clear-logs
    This command clears log content in the Brain. We have noticed in previous versions of the software the Brain log will become flooded and stuck on a prior date. This command clears the information in the log storage, but is only available on Brains running software v2.2.9 or later

Forced Active Offline

  • curl -X PUT -H “Content-Type: application/json” -d ‘{offline’ “http://BRAIN_IP:8000/api/v1/force-active-offline”.
  • Offline can be one of two states
    • Offline:1 = force active offline
    • Offline = 0 disable active offline
  • When the Brain is in this state, it will not accept any new Publishes. The Brain is acting in an Offline state and will need to be manually entered back into Active Online with the next command

Sync On Wan

  • curl -X PUT -H “Content-Type: application/json” -d ‘{sync_on_wan_restore’ “http://brain ip:8000/api/v1/sync-on-wan-restore”
    • Three possible values for sync_on_wan_restore
      • 0 = Auto
      • 1 = On
      • 2 = Off

Data Reset on Publish

  • curl -X PUT -H “Content-Type: application/json” -d ‘{brain_reset_data_dir’ “http://Brain_IP:8000/api/v1/reset-data-dir-on-publish”
    This setting clears storage in the data folder of the Brain each time a publish is prompted.
    • 1 = On
    • 0 = Off
  • Note – This setting is disabled by default. We identified an issue where Brains in an offline state, with this setting enabled would come back online unprovisioned when power cycled

Log Level Debugging

  • curl -X PUT -H “Content-Type: application/json” -d ‘{“brain_log_level”:“debug”}’ Brain_IP:8000/api/v1/log/level
    This setting enables log level debugging on your Brain. This will add more information to your log files, this setting is only recommended for troubleshooting and not recommended for daily usage.
Revision: 10
Last modified: 10 September 2020

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment