07-21-2023 05:23 PM - edited 07-21-2023 05:29 PM
APIs provide a powerful method to configure and retrieve information from the SmartZone controller. To perform any API task, we need to include a service ticket in our requests. This service ticket grants us access to the controller's functionalities. In this guide, I will demonstrate how to obtain a service ticket using the Postman app.
1. Start by downloading and installing the Postman app on your system.
2. Open Postman and create a new HTTP request.
3. From the dropdown menu, choose the "POST" operation and paste the following URL:
https://{your-controller-ip-address}:8443/wsg/api/public/v9_0/serviceTicket
4. In the "Body" section, select "raw" and paste the following JSON body:
{
"username": "admin",
"password": "admin"
}
5. Note: These credentials are the same as the ones you use to log in to the web interface of your controller. Keep in mind that any action performed using this service ticket will have the same access rights as your user account in the controller's web GUI.
For this demo, I am using credentials for the admin user, for which the service ticket will grant me with full access to all possible operations on the controller.
6. Click "Send" to execute the request.
Upon successful execution, the response window will display the generated service ticket:
Congratulations! You have successfully obtained a service ticket, enabling you to perform future API operations with your controller.
Feel free to utilize this service ticket to interact with the controller's functionalities through APIs, enhancing your network management experience.