cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1871
Views
5
Helpful
3
Replies

Open NX-OS Programmability - NX-API Sandbox

jamearl
Cisco Employee
Cisco Employee

Hi Team,

 

For this open access lab, I can access the Sandbox NX-API page https://sbx-nxos-mgmt.cisco.com/, however, all API POSTs are returning errors.

 

Method: NXAPI-CLI

Format: json-rpc

Command: cli

Error: none

 

Using the entered command 'show run' or show version' as examples, this message is returned

[
  {
    "jsonrpc": "2.0",
    "method": "cli",
    "params": {
      "cmd": "show version",
      "version": 1
    },
    "id": 1
  }
]
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32006,
    "message": "VDC does not exist",
    "data": {
      "msg": "Could not retrieve the requested VDC"
    }
  },
  "id": 1
}

 

Am I doing this wrong, or does the lab need to be reset?

 

Kind regards,

 

 

3 Replies 3

omz
VIP Alumni
VIP Alumni

Hi 

Are you using the https://sbx-nxos-mgmt.cisco.com/ API in the browser?

It works on my end .. could be something intermittent .. maybe try again .. logout / login again ..

Screenshot 2020-05-18 at 10.12.48.pngScreenshot 2020-05-18 at 10.14.32.png

jamearl
Cisco Employee
Cisco Employee

Hi @omz

 

It does seem intermittant. A few refreshes later (Google Chrome) I got a returned 'Server' error with 'show run'. Another refresh and now I'm getting a good response.

I then tried this again on Postman but I'm still getting 400 Bad requests there. I then tried the WebAPI again and again it's retuning 'VDC does not exist"

 

 

 

Kind regards,

 

Hey there, as these are always on sandbox, they get a lot of requests at once and you may see intermittent results during peak and busy periods. I would recommend reserving a sandbox or if you are only wanting to test NX9K, spin a single device up in vagrant using virtual box on your local machine.

 

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io