The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter provides information about the Cisco Nexus 1000V application programming interface (API) functions. The Cisco Nexus 1000V resource name is generic across all hypervisors. The functions that support write (create, update, and delete) operations are explicitly marked as writeable. All others are read-only functions.
The chapter contains the following topics:
["/api/n1k/uplink"] [Read-only]
Retrieves information about the uplink ports configured on the VSM.
<set name="uplink_set"> <instance name="Ethernet5/2" url="/api/n1k/uplink/Ethernet5%2F2"> <properties> <module>5</module> <packetsTx>3801</packetsTx> <mtu>1500</mtu> <cdpPort>Ethernet101/1/5</cdpPort> <cdpSwitch>sf-n5k-14(SSI134306N1)</cdpSwitch> <cdpNativeVlan>231</cdpNativeVlan> <packetsRx>16114898</packetsRx> <vlans>250-350</vlans> <name>Ethernet5/2</name> <ethernet>Ethernet</ethernet> <speed>1000 Mb/s</speed> <mode>trunk</mode> <portProfile>sys-uplink</portProfile> <status>up</status> </properties> </instance> </set>
Property |
Writeable or Readable |
---|---|
module |
Readable |
portChannelType |
Readable |
packetsTx |
Readable |
mtu |
Readable |
cdpPort |
Readable |
port |
Readable |
status |
Readable |
mode |
Readable |
vlans |
Readable |
portChannel |
Readable |
cdpNativeVlan |
Readable |
portChannelMembers |
Readable |
packetsRx |
Readable |
cdpswitch |
Readable |
portProfile |
Readable |
speed |
Readable |
["/api/n1k/license"] [Read-only]
Retrieves information about the licensing details of the Cisco Nexus 1000V switch.
<set name="license_set"> <instance name="NEXUS1000V_LAN_SERVICES_PKG" url="/api/n1k/license/NEXUS1000V_LAN_SERVICES_PKG"> <properties> <expires>N/A</expires> <type>NEXUS1000V_LAN_SERVICES_PKG</type> <available>0</available> <status>Unused</status> <used>0</used> </properties> </instance> </set>
Property |
Writeable or Readable |
---|---|
expires |
Readable |
type |
Readable |
available |
Readable |
status |
Readable |
used |
Readable |
["/api/n1k/port-profile"] [Read-only]
Retrieves a list of all of the port profiles that are configured on the VSM.
<set name="portProfile_set"> <instance name="policy-1" url="/api/n1k/port-profile/policy-1"> <properties> <maxPorts>32</maxPorts> <type>Vethernet</type> <name>policy-1</name> <systemVlans>none</systemVlans> <status>1</status> <minPorts>1</minPorts> <vlans></vlans> <usedPorts>0</usedPorts> </properties> </instance> </set>
Property | Writeable or Readable |
---|---|
maxPorts | Readable |
type | Readable |
systemVlans | Readable |
status | Readable |
minPorts | Readable |
vlans | Readable |
usedPorts | Readable |
["/api/n1k/vnic"] [Read-only]
Retrieves information about the virtual Ethernet ports that are connected to the Cisco Nexus 1000V switch.
<set name="vnic_set"> <instance name="Vethernet5" uri="/api/vc/vnic/Vethernet5"> <properties> <mac>0050.56ba.58bc</mac> <dvport>DVPort65</dvport> <adapter>Net Adapter 1</adapter> <hostIP>172.23.231.192</hostIP> <vlans>231</vlans> <portGroup>n1kv-system-control</portGroup> <status>up</status> <module>3</module> <vm>vsm-vcplugin-1-2</vm> <vnic>Vethernet5</vnic> </properties> </instance> </set>
Property |
Writeable or Readable |
---|---|
mac |
Readable |
dvport |
Readable |
adapter |
Readable |
vlans |
Readable |
portGroup |
Readable |
status |
Readable |
module |
Readable |
vm |
Readable |
vnic |
Readable |
["/api/n1k/summary"] [Read-only]
Retrieves a summary of the Cisco Nexus 1000V switch.
<set name="summary_set"> <instance url="/api/n1k/summary"> <properties> <haStatus>false</haStatus> <name>switch</name> <switchMode>ESSENTIAL</switchMode> <mode>L3</mode> <version>version 5.2(1)SK1(2.1) [gdb]</version> <ip>172.23.231.45</ip> </properties> </instance> </set>
Property |
Writeable or Readable |
---|---|
haStatus |
Readable |
name |
Readable |
switchMode |
Readable |
mode |
Readable |
version |
Readable |
ip |
Readable |