How to Use the Browser Developer Tool to Obtain API and Payload from the GUI
Finding Director APIs is much easier using Chrome browser developer tools.
To find an API, navigate to a specific page in the Director GUI, perform create/update/fetch/delete actions and look for corresponding API details, for example, request URL (API), request method, status code, and payload in the Network section of the developer tools.
Suppose you want to manage Organization in Versa Director:
To obtain the API and payload for creating and managing the organization:
Step 1. Right-click the GUI and select Inspect.
Step 2.
Step 3: In Director, select Workflows > Infrastructure > Organizations. Click + Add icon to create the organization, and then click Deploy. The go to Network Tab in Dev Console.
The following POST API is used to create the organization:
Since this is Post requires, we need payload.
To get API payload scroll down the tab
To obtain the PUT API, open the API-Test (organization) and click Deploy. The following Put API is used to update the organization.
Copy PUT API payload by going down, same as we did for POST API.
To obtain the GET API, open the API-Test (organization) and click Save.
The following GET API is used to fetch the organization.
To obtain DELETE API to delete an organization, Go Workflow> Infrastructure> Organizations, select the API-Test (organization) and click the – Delete icon to obtain the DELETE API.
Using above Methods, you can get any API and payload from the Browser Developer Tool.