- Authenticate
- Get all tenants
- Create / delete tenant
- Create / delete application profile
- Create / delete EPG
- Create / delete VRF
- Create / delete bridge domain
- Create / delete leaf interface profile
- Create / delete switch profile and associate it with a leaf profile
- Configure vPC pair
- Create / delete interface selector for the interface profiles
- Create / delete interface policy groups
- Configure VLAN pool, physical domain, and AAEP
- Steps to decom interfaces
When you send this authentication request, you'll get the token. Postman will continue sending the token automatically when you make subsequent requests.
- Method: POST
- URL:
https://{{apic}}/api/aaaLogin.json - Body:
{
"aaaUser": {
"attributes": {
"name": "{{apic_username}}",
"pwd": "{{apic_password}}"
}
}
}
- Method: GET
- URL:
https://{{apic}}/api/class/fvTenant.json
- Method: POST
- URL:
https://{{apic}}/api/mo/uni/tn-{{tenant}}.json - Body:
{
"fvTenant": {
"attributes": {
"descr": "{{descr}}",
"dn": "uni/tn-{{tenant}}",
"name": "{{tenant}}",
"rn": "tn-{{tenant}}",
"status": "created,modified"
}
}
}
- Method: DELETE
- URL:
https://{{apic}}/api/mo/uni/tn-{{tenant}}.json
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ap-{{ap_name}}.json - Body:
{
"fvAp":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ap-{{ap_name}}",
"name": "{{ap_name}}",
"descr": "{{ap_name_descr}}",
"rn": "ap-{{ap_name}}",
"status": "created"
},
"children":
[
{
"fvRsApMonPol":
{
"attributes":
{
"tnMonEPGPolName": "{{monit_pol}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ap-{{ap_name}}.json - Body:
{
"fvAp":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ap-{{ap_name}}",
"status": "deleted"
},
"children":
[]
}
}
- method: POST
- url:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}.json - Body:
{
"fvAEPg":
{
"attributes":
{
"dn": "uni/tn-Heroes/ap-{{ap_name}}/epg-{{epg_name}}",
"name": "{{epg_name}}",
"descr": "{{descr}}",
"rn": "epg-{{epg_name}}",
"status": "created"
},
"children":
[
{
"fvRsBd":
{
"attributes":
{
"tnFvBDName": "{{bd_name}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- method: POST
- url:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}.json - Body:
{
"fvAEPg":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ctx-{{vrf}}.json - Body:
{
"fvCtx":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ctx-{{vrf}}",
"name": "{{vrf}}",
"rn": "ctx-{{vrf}}",
"status": "created"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ctx-{{vrf}}.json - Body:
{
"fvCtx":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ctx-{{vrf}}",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/BD-{{bd_name}}.json - Body:
{
"fvBD":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/BD-{{bd_name}}",
"mac": "{{mac_addr}}",
"arpFlood": "true",
"name": "{{bd_name}}",
"descr": "{{descr}}",
"unkMacUcastAct": "flood",
"unicastRoute": "false",
"rn": "BD-{{bd_name}}",
"status": "created"
},
"children":
[
{
"fvRsCtx":
{
"attributes":
{
"tnFvCtxName": "{{vrf}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/BD-{{bd_name}}.json - Body:
{
"fvBD":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/BD-{{bd_name}}",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{leaf_ifp}}.json - Body:
{
"infraAccPortP":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{leaf_ifp}}",
"name": "{{leaf_ifp}}",
"descr": "{{descr}}",
"rn": "accportprof-{{leaf_ifp}}",
"status": "created,modified"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{two_leaf_ifp}}.json - Body:
{
"infraAccPortP":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{two_leaf_ifp}}",
"name": "{{two_leaf_ifp}}",
"descr": "interface profile for leaf nodes 101 and 102",
"rn": "accportprof-{{two_leaf_ifp}}",
"status": "created,modified"
},
"children":
[]
}
}
- Method: POST
- URL:
TODO - Body:
TODO
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/nprof-test_leaf101_swp.json - Body:
{
"infraNodeP":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf101_swp",
"name": "test_leaf101_swp",
"rn": "nprof-test_leaf101_swp",
"status": "created,modified"
},
"children":
[
{
"infraLeafS":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf101_swp/leaves-leaf101-typ-range",
"type": "range",
"name": "leaf101",
"rn": "leaves-leaf101-typ-range",
"status": "created"
},
"children":
[
{
"infraNodeBlk":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf101_swp/leaves-leaf101-typ-range/nodeblk-d149546e6eb5cdbb",
"from_": "101",
"to_": "101",
"name": "d149546e6eb5cdbb",
"rn": "nodeblk-d149546e6eb5cdbb",
"status": "created"
},
"children":
[]
}
}
]
}
},
{
"infraRsAccPortP":
{
"attributes":
{
"tDn": "uni/infra/accportprof-{{leaf_ifp}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/nprof-test_leaf101_102_swp.json - Body:
{
"infraNodeP":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf101_102_swp",
"name": "test_leaf101_102_swp",
"descr": "swp for leaf 101 and leaf 102",
"rn": "nprof-test_leaf101_102_swp",
"status": "created,modified"
},
"children":
[
{
"infraLeafS":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf101_102_swp/leaves-leaf101_102-typ-range",
"type": "range",
"name": "leaf101_102",
"rn": "leaves-leaf101_102-typ-range",
"status": "created"
},
"children":
[
{
"infraNodeBlk":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf101_102_swp/leaves-leaf101_102-typ-range/nodeblk-496d6206c2b9411d",
"from_": "101",
"to_": "102",
"name": "496d6206c2b9411d",
"rn": "nodeblk-496d6206c2b9411d",
"status": "created"
},
"children":
[]
}
}
]
}
},
{
"infraRsAccPortP":
{
"attributes":
{
"tDn": "uni/infra/accportprof-{{two_leaf_ifp}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/nprof-test_leaf10_swp.json - Body:
{
"infraNodeP":
{
"attributes":
{
"dn": "uni/infra/nprof-test_leaf10_swp",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/fabric/protpol/expgep-{{protection_group}}.json - Body:
{
"fabricExplicitGEp":
{
"attributes":
{
"dn": "uni/fabric/protpol/expgep-{{protection_group}}",
"name": "{{protection_group}}",
"id": "100",
"rn": "expgep-{{protection_group}}",
"status": "created"
},
"children":
[
{
"fabricNodePEp":
{
"attributes":
{
"dn": "uni/fabric/protpol/expgep-{{protection_group}}/nodepep-{{node1}}",
"id": "{{node1}}",
"status": "created",
"rn": "nodepep-{{node1}}"
},
"children":
[]
}
},
{
"fabricNodePEp":
{
"attributes":
{
"dn": "uni/fabric/protpol/expgep-{{protection_group}}/nodepep-{{node2}}",
"id": "{{node2}}",
"status": "created",
"rn": "nodepep-{{node2}}"
},
"children":
[]
}
},
{
"fabricRsVpcInstPol":
{
"attributes":
{
"tnVpcInstPolName": "default",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- NOTES:
leaf_ifpstands for leaf interface selector profile (Interfaces > Leaf Interfaces > Profiles).- For a single port,
fromPortandtoPortare the same value (Example:25). - Multiple API inspections always yield the same port block
block2. - To omit the IPG, simply omit this line:
"tDn": "uni/infra/funcprof/accportgrp-{{ipg}}",.
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{leaf_ifp}}/hports-{{acc_port_sel_name}}-typ-range.json - Body:
{
"infraHPortS":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{leaf_ifp}}/hports-{{int_selector}}-typ-range",
"name": "{{int_selector}}",
"rn": "hports-{{int_selector}}-typ-range",
"status": "created,modified"
},
"children":
[
{
"infraPortBlk":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{leaf_ifp}}/hports-{{int_selector}}-typ-range/portblk-block2",
"fromPort": "{{from_port}}",
"toPort": "{{to_port}}",
"name": "block2",
"rn": "portblk-block2",
"status": "created,modified"
},
"children":
[]
}
},
{
"infraRsAccBaseGrp":
{
"attributes":
{
"tDn": "uni/infra/funcprof/accportgrp-{{ipg}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{two_leaf_ifp}}/hports-{{vpc_int_selector}}-typ-range.json - Body:
{
"infraHPortS":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{two_leaf_ifp}}/hports-{{vpc_int_selector}}-typ-range",
"name": "{{vpc_int_selector}}",
"descr": "{{description}}",
"rn": "hports-{{vpc_int_selector}}-typ-range",
"status": "created,modified"
},
"children":
[
{
"infraPortBlk":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{two_leaf_ifp}}/hports-{{vpc_int_selector}}-typ-range/portblk-block2",
"fromPort": "{{from_port}}",
"toPort": "{{to_port}}",
"name": "block2",
"rn": "portblk-block2",
"status": "created,modified"
},
"children":
[]
}
},
{
"infraRsAccBaseGrp":
{
"attributes":
{
"tDn": "uni/infra/funcprof/accbundle-{{ipg}}",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{acc_port_sel_name}}.json - Body:
{
"infraAccPortP":
{
"attributes":
{
"dn": "uni/infra/accportprof-acc_port_sel_name",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/lldpIfP-{{lldp_int_pol}}.json - Body:
{
"lldpIfPol":
{
"attributes":
{
"dn": "uni/infra/lldpIfP-{{lldp_int_pol}}",
"name": "{{lldp_int_pol}}",
"rn": "lldpIfP-{{lldp_int_pol}}",
"status": "created"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/cdpIfP-{{cdp_int_pol}}.json - Body:
{
"cdpIfPol":
{
"attributes":
{
"dn": "uni/infra/cdpIfP-{{cdp_int_pol}}",
"name": "{{cdp_int_pol}}",
"rn": "cdpIfP-{{cdp_int_pol}}",
"status": "created"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/lacplagp-{{lacp_int_pol}}.json - Body:
{
"lacpLagPol":
{
"attributes":
{
"dn": "uni/infra/lacplagp-{{lacp_int_pol}}",
"name": "{{lacp_int_pol}}",
"descr": "Meh",
"mode": "active",
"rn": "lacplagp-{{lacp_int_pol}}",
"status": "created"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/funcprof/accportgrp-{{int_pol_grp}}.json - Body:
{
"infraAccPortGrp":
{
"attributes":
{
"dn": "uni/infra/funcprof/accportgrp-{{int_pol_grp}}",
"name": "{{int_pol_grp}}",
"descr": "meh",
"rn": "accportgrp-{{int_pol_grp}}",
"status": "created"
},
"children":
[
{
"infraRsLldpIfPol":
{
"attributes":
{
"tnLldpIfPolName": "test_enable_LLDP",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/funcprof/accbundle-{{vpc_int_pol_grp}}.json - Body:
{
"infraAccBndlGrp":
{
"attributes":
{
"dn": "uni/infra/funcprof/accbundle-{{vpc_int_pol_grp}}",
"lagT": "node",
"name": "{{vpc_int_pol_grp}}",
"rn": "accbundle-{{vpc_int_pol_grp}}",
"status": "created"
},
"children":
[
{
"infraRsCdpIfPol":
{
"attributes":
{
"tnCdpIfPolName": "test_enable_CDP",
"status": "created,modified"
},
"children":
[]
}
},
{
"infraRsLldpIfPol":
{
"attributes":
{
"tnLldpIfPolName": "test_enable_LLDP",
"status": "created,modified"
},
"children":
[]
}
},
{
"infraRsLacpPol":
{
"attributes":
{
"tnLacpLagPolName": "test_lacp_active",
"status": "created,modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{leaf_ifp}}/hports-catalyst-typ-range/rsaccBaseGrp.json - Body:
{
"infraRsAccBaseGrp":
{
"attributes":
{
"tDn": "uni/infra/funcprof/accportgrp-{{int_pol_grp}}"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{two_leaf_ifp}}/hports-test_server_vpc-typ-range/rsaccBaseGrp.json - Body:
{
"infraRsAccBaseGrp":
{
"attributes":
{
"tDn": "uni/infra/funcprof/accbundle-{{vpc_int_pol_grp}}"
},
"children":
[]
}
}
Including an encapsulation block
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/vlanns-[test_vlan_pool]-static.json - Body:
{
"fvnsVlanInstP":
{
"attributes":
{
"dn": "uni/infra/vlanns-[test_vlan_pool]-static",
"name": "test_vlan_pool",
"allocMode": "static",
"rn": "vlanns-[test_vlan_pool]-static",
"status": "created"
},
"children":
[
{
"fvnsEncapBlk":
{
"attributes":
{
"dn": "uni/infra/vlanns-[test_vlan_pool]-static/from-[vlan-1]-to-[vlan-50]",
"from": "vlan-1",
"to": "vlan-50",
"rn": "from-[vlan-1]-to-[vlan-50]",
"status": "created"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/vlanns-[test_vlan_pool]-static/from-[vlan-60]-to-[vlan-70].json - Body:
{
"fvnsEncapBlk":
{
"attributes":
{
"dn": "uni/infra/vlanns-[test_vlan_pool]-static/from-[vlan-60]-to-[vlan-70]",
"from": "vlan-60",
"to": "vlan-70",
"descr": "db",
"rn": "from-[vlan-60]-to-[vlan-70]",
"status": "created"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/vlanns-[jm_vlan_pool]-static/from-[vlan-30]-to-[vlan-40].json - Body:
{
"fvnsEncapBlk":
{
"attributes":
{
"dn": "uni/infra/vlanns-[jm_vlan_pool]-static/from-[vlan-30]-to-[vlan-40]",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/phys-test_phyDom.json - Body:
{
"physDomP":
{
"attributes":
{
"dn": "uni/phys-test_phyDom",
"name": "test_phyDom",
"rn": "phys-test_phyDom",
"status": "created"
},
"children":
[
{
"infraRsVlanNs":
{
"attributes":
{
"tDn": "uni/infra/vlanns-[test_vlan_pool]-static",
"status": "created"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/phys-dom_phy_core/rsvlanNs.json - Body:
{
"infraRsVlanNs":
{
"attributes":
{
"tDn": "uni/infra/vlanns-[jm_vlan_pool]-static"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra.json - Body:
{
"infraInfra":
{
"attributes":
{
"dn": "uni/infra",
"status": "modified"
},
"children":
[
{
"infraAttEntityP":
{
"attributes":
{
"dn": "uni/infra/attentp-{{aaep}}",
"name": "{{aaep}}",
"rn": "attentp-{{aaep}}",
"status": "created"
},
"children":
[
{
"infraRsDomP":
{
"attributes":
{
"tDn": "uni/phys-test_phyDom",
"status": "created"
},
"children":
[]
}
}
]
}
},
{
"infraFuncP":
{
"attributes":
{
"dn": "uni/infra/funcprof",
"status": "modified"
},
"children":
[]
}
}
]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/funcprof/accportgrp-{{int_pol_grp}}/rsattEntP.json - Body:
{
"infraRsAttEntP":
{
"attributes":
{
"tDn": "uni/infra/attentp-{{aaep}}",
"status": "created,modified"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/funcprof/accbundle-{{vpc_int_pol_grp}}/rsattEntP.json - Body:
{
"infraRsAttEntP":
{
"attributes":
{
"tDn": "uni/infra/attentp-{{aaep}}",
"status": "created,modified"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/fabric/outofsvc.json - Body:
{
"fabricRsOosPath":
{
"attributes":
{
"dn": "uni/fabric/outofsvc/rsoosPath-[topology/pod-1/paths-{{node}}/pathep-[eth1/4]]",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/fabric/outofsvc.json - Body:
{
"fabricRsOosPath":
{
"attributes":
{
"tDn": "topology/pod-1/paths-{{node}}/pathep-[eth1/4]",
"lc": "blacklist"
},
"children":
[]
}
}
Steps:
- Remove all EPG static path bindings from interfaces
- Delete the related policy groups
- Delete the interface profile or remove int selector
- Shutdown the physical interfaces
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}/rspathAtt-[topology/pod-1/{{node}}/pathep-[{{interface}}]].json - Body:
{
"fvRsPathAtt":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}/rspathAtt-[topology/pod-1/{{node}}/pathep-[{{interface}}]]",
"encap": "vlan-{{vlan}}",
"mode": "{{mode}}",
"tDn": "topology/pod-1/{{node}}/pathep-[{{interface}}]",
"rn": "rspathAtt-[topology/pod-1/{{node}}/pathep-[{{interface}}]]",
"status": "created,modified"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}/rspathAtt-[topology/pod-1/paths-{{node}}/pathep-[{{interface}}]].json - Body:
{
"fvRsPathAtt":
{
"attributes":
{
"dn": "uni/tn-{{tenant}}/ap-{{ap_name}}/epg-{{epg_name}}/rspathAtt-[topology/pod-1/paths-{{node}}/pathep-[{{interface}}]]",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{leaf_int_profile}}.json - Body:
{
"infraAccPortP":
{
"attributes":
{
"dn": "uni/infra/accportprof-{{leaf_int_profile}}",
"status": "deleted"
},
"children":
[]
}
}
In the example below, the interface range could be 1 for a single interface such as hports-ethernet1_1-typ-range or 5-8 for a contiguous range such as ethernet1_5-8-typ-range.
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/accportprof-{{leaf_int_profile}}/hports-ethernet1_{{range}}-typ-range.json - Body:
{
"infraHPortS":
{
"attributes":
{
"dn": "uni/infra/accportprof-SnV_FI-1A/hports-ethernet1_{{range}}-typ-range",
"status": "deleted"
},
"children":
[]
}
}
- Method: POST
- URL:
https://{{apic}}/api/node/mo/uni/infra/funcprof/accbundle-{{vpc_pol_group}}.json - Body:
{
"infraAccBndlGrp":
{
"attributes":
{
"dn": "uni/infra/funcprof/accbundle-{{vpc_pol_group}}",
"status": "deleted"
},
"children":
[]
}
}