The one feature that got my heart beating faster in the recent release of NoTouch Center was by far the SDK Package, with its ability to perform REST API calls. As the trends in IT are going towards building infrastructure with code and scripting administrative tasks instead of using the GUI, this is demonstrating that we are carefully following the industry demands to make sure our much praised management solution stays current.
How to get started
What you will need is
- NoTouch Center version 4.5.x or greater
- An API Account in NoTouch Center
- An environment where you can execute Python, Java, Bash or PowerShell -scripts
Getting the SDK kit from NoTouch Center
Log in to your NoTouch Console and on the top click Resources click and then About. Scroll down almost to the end, until you reach the Extensions section.
Click on the NoTouch Center SDK Package -link to download the SDK package to your computer.
Unpack the content to a directory and you will see the following:
Creating an Account for the API calls
In order to perform REST API calls you would need to have an account who has the rights to execute the commands requested on NoTouch Center. In addition that account needs to have the “Login via API” right.
Before you create a user account, you should create a role with the appropriate rights. Create a new role and give it suitable permissions that match what you need to perform the actions you want to complete through the REST API calls. For testing purposes, you could select the Expert template, but for production you should go with the absolute minimum rights.
Once done, search for API to make sure that Login/Via API is enabled, and click Save.
Now you can create an account and get the needed API keys:
- Create a new user, and give it a meaningful name like RestAPIUser and give it a good password.
- Set the Security Level to the role previously created to assign the user the appropriate rights. Click Save.
- Click on the newly created user and scroll down to the bottom until you find the keys for API access.
- Copy the API Key and API Secret to a safe place.
- If you want to have additional security and only allow API calls from a certain IP addresses, you can specify those in the API Login Allowed From: – field
The last thing you need to be able to execute the REST API calls is the API URL. That is: https://URL_Of_Your_NoTouchCenter/easyadmin/api/v1
Now you have all the needed information to get started with the REST API in the script language you want. The script files have all the guides you need to get started in the comments. The Python script has the most complete set of API calls that you can call, so you can use that as a reference guide.