Open NX API Sandbox access

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2015 04:40 PM - edited 06-04-2019 02:20 AM
Hi I am trying to do REST calls to N9K and am having difficulty.
Instructions say - 'After Software VPN connection: Telnet/SSH access to the tool server and virtual network element. If required, to enable nxapi, run 'feature nxapi' on the switch. Use POSTMAN to post objects to the virtual element.'
1/ I have SSH access to N9k and toolbox server from windows PC.
2/ I enable feature nxapi on N9k and confirm running
switch-n9kV2# sh nxapi
nxapi enabled
HTTP Listen on port 80
HTTPS Listen on port 443
3/ When I try and use postman or standard HTTP/HTTPS from home PC to N9K sandbox management IP address i keep getting connection refused.
When I try and test if port 80/443 is open via telnei to those ports from toolbox server I get connection refused
cisco@toolserver:~$ telnet 10.10.10.51 80
Trying 10.10.10.51...
telnet: Unable to connect to remote host: Connection refused
cisco@toolserver:~$
Any tips?
- Labels:
-
Connectivity Issues and VPN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2015 02:42 AM
hi chris
thanks for the enquiry. we'll reach out to the engineering team for support on your request. we hopefully
should hear back soon. as an possible solution you may have to enable the http and/or https port on the n9kv switch.
engineering should be able to provide input.
Thanks eddie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2015 04:34 AM
please follow the steps to run NXAPI using postman.
On switch:
- Login to the switch.
- Run ‘config t’
- Enable nxapi using ‘feature nxapi’. Exit to switch prompt
- Run ‘copy r s’
NXAPI code:
POST-URL : http://SWITCH-IP/api/aaaLogin.json
Content-Type: application/json
Cache-Control: no-cache
POST BODY :
{
"aaaUser" : {
"attributes" : {
"name" : "SWITCH_USER",
"pwd" : "SWITCH_PASSWORD"
}
}
}
Postman:
- Open postman
- Copy POST URL, mentioned in above section, after replacing SWITCH-IP with IP address of Nexus switch .
- Select method as POST
- Open raw JSON section.
- Copy POST-BODY JSON to raw JSON body section of postman.
- Replace SWITCH_USERNAME with switch user.
- Replace SWITCH_PASSWORD with switch password.
- Click send button
This would save the cookie and after that, you can query other NXAPI using postman without login. And HTTP and HTTPS query from browser should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 05:37 AM
I'm trying to do the NX-OS sandbox lab from devnet site.I'm trying to make API calls using the postman but i get below error.Not sure what is wrong.I'm doing the same steps as in tutorial.Would be great if someone helps me out
- The server couldn't send a response:Ensure that the backend is working properly
- Self-signed SSL certificates are being blocked:Fix this by turning off 'SSL certificate verification' in Settings > General
- Proxy configured incorrectlyEnsure that proxy is configured correctly in Settings > Proxy
- Request timeout:Change request timeout in Settings > General

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 06:32 AM
Hi,
We are using self-signed SSL cert for the sandbox. Please disable "SSL certificate verification" in your Postman to allow the request. The detailed postman settings could be found at https://learning.getpostman.com/docs/postman/launching_postman/settings/
Regards,
Bob
