CentreStack offers a RESTful API (Representational State Transfer Application Programming Interface) that you can use to automate most tasks via simple HTTP requests (Hypertext Transfer Protocol), such as posts, gets, deletes, etc.
The actual API documentation contains the full reference along with the mandatory "Hello World," but in this article I will show you a Powershell example using two back-to-back API calls with simple response parsing. If you understand this example, you will be able to use any of the documented API functions, because most of the requests require an authentication cookie to be obtained first and then passed in the HTTP Header of any subsequent calls. Most calls also require an XML object to be passed in the HTTP body, and the example in this article shows you how to do both of these tasks. CentreStack offers an alternate Powershell API that you can call directly without having to make extra HTTP requests, but the REST API is more complete, up-to-date, and more flexible for programming with different languages. For more information about the native Powershell API, please go to the CentreStack documentation (https://centrestack.com/Documentation/) and look for the Powershell Module Guide.
The Windows Client software contains a periodic check and upgrades itself if necessary. However, some Clients may fail to upgrade automatically and the user may not be aware of it. In such cases, you could use the REST API to do a manual upgrade check and display a warning popup to the user. The warning could instruct the users to download and install the Windows Client from the Web Portal, or have them contact the IT person so he/she could collect debug logs for the CentreStack developers (see https://support.centrestack.com/hc/en-us/articles/360000410633-Windows-client-doesn-t-auto-update for more information).
The code should be self-explanatory since many comments have been added on the lines starting with a pound sign (#). Please customize the login credentials and IP access point where indicated.
To implement the script, simply copy the entire code between the equal sign lines below into a notepad text file and name it "version_check.ps1". You can then schedule the script to run at regular intervals from the Windows Task Scheduler. You may need to change your Powershell execution policy in order to run the script (see https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6&viewFallbackFrom=powershell-Microsoft.PowerShell.Core for more information).
Please contact us if you are interested in the full API documentation and we will send it to you.