hit counter script
Download Print this page

Cisco Nexus 5000 Series Reference Manual page 4

Hide thumbs Also See for Nexus 5000 Series:

Advertisement

</outputs>
</ins_api>
The following example shows a request and its response in JSON format:
Request:
{
"ins_api": {
"version": "0.1",
"type": "cli_show",
"chunk": "0",
"sid": "session1",
"input": "show switchname",
"output_format": "json"
}
}
Response:
{
"ins_api": {
"type": "cli_show",
"version": "0.1",
"sid": "eoc",
"outputs": {
"output": {
"body": {
"hostname": "switch"
},
"input": "show switchname",
"msg": "Success",
"code": "200"
}
}
}
}
Sample NX-API Scripts
The sample scripts demonstrate how a script is used with NX-API. The scripts are available at
https://github.com/datacenter/nxos/tree/master/nxapi/samples.
• Cable Checker (check_cable.py)
• Cable Checker Blueprint (connectivity.json)
NX-API Sandbox
The NX-API Sandbox is the web-based user interface that you use to enter the commands, command type, and output type for the
Cisco Nexus 5000 and 6000 Series device using HTTP/HTTPS. After posting the request, the output response is displayed.
By default, NX-API is disabled. Begin enabling NX-API with the feature manager CLI command on the switch. Then enable NX-API
with the nxapi sandbox command.
Use a browser to access the NX-API Sandbox.
Note
When using the NX-API Sandbox, Cisco recommends that you use the Firefox browser, release 24.0 or
later.
The following example shows how to configure and launch the NX-API Sandbox:
4

Advertisement

loading

This manual is also suitable for:

Nexus 6000 series