This guide will walk you through the process of extracting the details of your NSX Edges using Postman API.
Requirements
- Postman software
- User with correct rights in OVHcloud Control Panel
Background
-
GET is used to retrieve information from the given server using a given URI (Uniform Resource Identifier). When the GET request is used only data is retrieved.
-
POST is used to send data to the server, i.e. uploading a file or transferring some data to any kind of web form.
-
PUT is used for replacing the new data with existing data at the target resource.
Instructions
Adding or modifying user rights
From the OVHcloud Control Panel:
- Click
Hosted Private Cloud
from the top navigation menu. - Click
VMware
in the left-hand navigation menu. -
Select
your environment. - Click
Users
.
Create a user, or modify an existing user, to have the rights listed below.
- Token Validator: No
- IP: Yes
- Failover IP: Yes
- Status: Enabled
To modify the rights of an existing user, click the ...
button in the user's row and select Edit
.
Once the correct rights have been established, click the ...
button in the user's row and select View/Edit the rights for each DC
.
Check that the user has the rights listed below.
- vSphere access: Read/Write
- Add resources: Yes
- Access to the VM Network: Operator
-
Access to the V(X)LANs: Administrator
If you need to modify existing rights, click the ...
button in the user's row and select Modify rights
.
Retrieving Edge details using Postman API
From the Postman API interface, under the Authorization tab Type select Basic Auth
and type your Username and Password to access NSX Edge details.
Select GET
and use the following syntax to display all the details of that Edge.
https://nsx.pcc-xxx-xxx-xxx-xxx.ovh.us/api/4.0/edges/<your edge ID>/
If you do not have access to the vSphere web client and do not know the Edge ID but remember the Edge name, you can use the step below to find the Edge IDs.
Select GET
and use the following syntax to display a list of Edges as well as their Edge IDs and Edge names.
https://nsx.pcc-xxx-xxx-xxx-xxx.ovh.us/api/4.0/edges/
Select GET
and use the following syntax to display IPsec VPN tunnel details.
https://nsx.pcc-xxx-xxx-xxx-xxx.ovh.us/api/4.0/edges/<your edge ID>/ipsec/config
Select GET
and use the following syntax to display NAT rules.
https://nsx.pcc-xxx-xxx-xxx-xxx.ovh.us/api/4.0/edges/<your edge ID>/nat/config
Select GET
and use the following syntax to display Firewall rules.
https://nsx.pcc-xxx-xxx-xxx-xxx.ovh.us/api/4.0/edges/<your edge ID>/firewall/config
Go further
To see more options for your specific requirements, see VMware's NSX API guide.