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?
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
10-28-2015 04:34 AM
please follow the steps to run NXAPI using postman.
On switch:
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:
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.
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
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide