Cisco Nexus 3000 and 9000 Series NX-API REST SDK and API, Release 7.x
NX-OS 7(x)
- Cisco Nexus 3000 and 9000 Series NX-API REST Documentation
- Cisco Nexus 3000 and 9000 Series NX-API REST SDK User Guide and API Reference, Release 7.x
- Getting Started with the Cisco Nexus 3000 and 9000 Series NX-API REST SDK
- New and Changed
- Manageability
- Configuring System Management
- Configuring VXLAN BGP EVPN
- Configuring Fundamentals
- Configuring Power Modes
- Configuring Interfaces
- Configuring Static MPLS and Segment Routing
- Configuring Netstack
- Configuring Layer 2 Switching
- Configuring Multicast
- Configuring QoS
- Configuring TCAM
- Configuring Security
- Configuring Unicast Routing
- Configuring ARP
- Configuring DNS
- Configuring OSPFv2
- Configuring BGP
- Configuring a BGP Router
- Configuring an IPv4 Labeled Unicast Address Family
- Configuring an IPv4 Multicast Address Family
- Configuring an IPv4 MVPN Address Family
- Configuring an IPv4 Unicast Address Family
- Configuring an IPv6 Labeled Unicast Address Family
- Configuring an IPv6 Multicast Address Family
- Configuring an IPv6 MVPN Address Family
- Configuring an IPv6 Unicast Address Family
- Configuring an L2VPN EVPN Address Family
- Configuring a Link-State Address Family
- Configuring a VPNv4 Unicast Address Family
- Configuring a VPNv6 Unicast Address Family
- Configuring a Peer Template
- Configuring a BGP Neighbor
- Configuring a BMP Server
- Configuring EVPN
- Querying Ephemeral Data
- Configuring VRF
- First-Hop Redundancy Protocols
- Configuring Static Routes
- Configuring Route Policy Manager
- New and Changed RPM Model Information
- Configuring a Route Map
- Matching Two BGP Communities
- Removing a Configured Match of Two BGP Communities
- Setting the Segment Routing (SR) Label Index of a Route
- Deleting the Segment Routing (SR) Label Index of a Route (IPv4)
- Setting the Local Preference to 100 for all Routes Included in an Access List
- Deleting the Local Preference Set to 100 for all Routes Included in an Access List
- Building and Matching a Prefix List
- Configuring RPM for IPv4
- Configuring RPM for IPv6
- Configuring Telemetry
- Querying Analytic Information
- Querying Configurations (Show Commands)
- Querying Interface and VLAN Counters and Statistics
- Using the Managed Object Browser
- Monitoring the Environment
Configuring a Route Map
DME
YANG
CopyPOST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "testRtMap"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"descr": "world",
"loadShareV4": "enabled",
"loadShareV6": "enabled",
"order": "10"
},
"children": [
{
"rtmapSetOrigin": {
"attributes": {
"originT": "egp",
"type": "origin"
}}},{
"rtmapMatchAsPathAccessList": {
"children": [
{
"rtmapRsRtAsPathAccAtt": {
"attributes": {
"tDn": "sys/rpm/accesslist-testAccList2"
}}},{
"rtmapRsRtAsPathAccAtt": {
"attributes": {
"tDn": "sys/rpm/accesslist-testAccList1"
}}}]}},{
"rtmapSetNh": {
"attributes": {
"addr": "10.10.10.10"
}}},{
"rtmapSetNh": {
"attributes": {
"addr": "2000::4"
}}},{
"rtmapSetRegComm": {
"attributes": {
"noCommAttr": "disabled"
},
"children": [
{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65535:65281"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:0:0"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65535:65283"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65535:65282"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65530:50300"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65530:50800"
}}}]}},{
"rtmapMatchRegComm": {
"attributes": {
"criteria": "exact"
},
"children": [
{
"rtmapRsRegCommAtt": {
"attributes": {
"tDn": "sys/rpm/rtregcom-testRegComm1"
}}},{
"rtmapRsRegCommAtt": {
"attributes": {
"tDn": "sys/rpm/rtregcom-testRegComm2"
}}}]}},{
"rtmapMatchRtType": {
"attributes": {
"routeT": "external"
}}},{
"rtmapMatchRtType": {
"attributes": {
"routeT": "local"
}}},{
"rtmapMatchRtType": {
"attributes": {
"routeT": "isis-l2"
}}},{
"rtmapMatchRtTag": {
"attributes": {
"tag": "232"
}}},{
"rtmapMatchRtTag": {
"attributes": {
"tag": "231"
}}},{
"rtmapMatchRtDstV6": {
"children": [
{
"rtmapRsRtDstV6Att": {
"attributes": {
"tDn": "sys/rpm/pfxlistv6-testV6PfxList2"
}}},{
"rtmapRsRtDstV6Att": {
"attributes": {
"tDn": "sys/rpm/pfxlistv6-testV6PfxList1"
}}}]}},{
"rtmapMatchRtDst": {
"children": [
{
"rtmapRsRtDstAtt": {
"attributes": {
"tDn": "sys/rpm/pfxlistv4-testV4PfxList2"
}}},{
"rtmapRsRtDstAtt": {
"attributes": {
"tDn": "sys/rpm/pfxlistv4-testV4PfxList1"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Copy<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>testRtMap</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<descr>world</descr>
<loadShareV4>enabled</loadShareV4>
<loadShareV6>enabled</loadShareV6>
<origin-items>
<originT>egp</originT>
<type>origin</type>
</origin-items>
<mrtacclist-items>
<rsrtAsPathAccAtt-items>
<RsRtAsPathAccAtt-list>
<tDn>/System/rpm-items/accesslist-items/Rule-list[name='testAccList2']</tDn>
</RsRtAsPathAccAtt-list>
<RsRtAsPathAccAtt-list>
<tDn>/System/rpm-items/accesslist-items/Rule-list[name='testAccList1']</tDn>
</RsRtAsPathAccAtt-list>
</rsrtAsPathAccAtt-items>
</mrtacclist-items>
<nh-items>
<SetNh-list>
<addr>10.10.10.10</addr>
</SetNh-list>
<SetNh-list>
<addr>2000::4</addr>
</SetNh-list>
</nh-items>
<sregcomm-items>
<noCommAttr>disabled</noCommAttr>
<item-items>
<Item-list>
<community>regular:as2-nn2:65535:65281</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:0:0</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65535:65283</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65535:65282</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65530:50300</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65530:50800</community>
</Item-list>
</item-items>
</sregcomm-items>
<mregcomm-items>
<criteria>exact</criteria>
<rsregCommAtt-items>
<RsRegCommAtt-list>
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='testRegComm1']</tDn>
</RsRegCommAtt-list>
<RsRegCommAtt-list>
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='testRegComm2']</tDn>
</RsRegCommAtt-list>
</rsregCommAtt-items>
</mregcomm-items>
<mrttype-items>
<MatchRtType-list>
<routeT>external</routeT>
</MatchRtType-list>
<MatchRtType-list>
<routeT>local</routeT>
</MatchRtType-list>
<MatchRtType-list>
<routeT>isis-l2</routeT>
</MatchRtType-list>
</mrttype-items>
<mrttag-items>
<MatchRtTag-list>
<tag>232</tag>
</MatchRtTag-list>
<MatchRtTag-list>
<tag>231</tag>
</MatchRtTag-list>
</mrttag-items>
<mrtdstv6-items>
<rsrtDstV6Att-items>
<RsRtDstV6Att-list>
<tDn>/System/rpm-items/pfxlistv6-items/RuleV6-list[name='testV6PfxList2']</tDn>
</RsRtDstV6Att-list>
<RsRtDstV6Att-list>
<tDn>/System/rpm-items/pfxlistv6-items/RuleV6-list[name='testV6PfxList1']</tDn>
</RsRtDstV6Att-list>
</rsrtDstV6Att-items>
</mrtdstv6-items>
<mrtdst-items>
<rsrtDstAtt-items>
<RsRtDstAtt-list>
<tDn>/System/rpm-items/pfxlistv4-items/RuleV4-list[name='testV4PfxList2']</tDn>
</RsRtDstAtt-list>
<RsRtDstAtt-list>
<tDn>/System/rpm-items/pfxlistv4-items/RuleV4-list[name='testV4PfxList1']</tDn>
</RsRtDstAtt-list>
</rsrtDstAtt-items>
</mrtdst-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>