01-16-2020 01:26 PM
I use postman in the following way to configure a static epg port binding, a vpc connection.
https://apic01/api/node/mo/uni/tn-tn_{{tenant}}/ap-ap_{{ap}}/epg-epg_{{epg}}_{{tenant}}.json
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-a-p1-p2_PolGrp]",
"status": "created"
},
"children": []
}
}
This works but I need to run it twice for redundant devices. I was wondring if I could set two static ports binding in one post request.
Something that would look like this:
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-A-p1-p2_PolGrp]",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-B-p3-p4_PolGrp]",
"status": "created"
},
"children": []
}
This obviously doesn't work.
Any suggestions?
}
Thanks.
01-16-2020 02:53 PM
Hi there,
Not sure about ACI, but from a programming perspective you have a datastrucutre with duplicate keys. Have you tried making the tDN key hold a list value:
{ "fvRsPathAtt": { "attributes": { "encap": "vlan-{{epg}}", "tDn": ["topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-A-p1-p2_PolGrp]", "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-B-p3-p4_PolGrp]"], "status": "created" }, "children": []
} }
cheers,
Seb.
01-16-2020 04:55 PM
Hi @jgesualdi,
I ran into something similar a while ago and used Postman Command or Collection Runner.
01-20-2020 01:02 AM
Hi @jgesualdi ,
Here it is...
https://apic01/api/node/mo/uni/tn-tn_{{tenant}}/ap-ap_{{ap}}.json
{
"fvAEPg": {
"attributes": {
"dn": "uni/tn-tn_{{tenant}}/ap-ap_{{ap}}/epg-epg_{{epg}}_{{tenant}}"
},
"children": [
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-a-p1-p2_PolGrp]",
"status": "created"
}
}
},
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-B-p3-p4_PolGrp]",
"status": "created"
}
}
}
]
}
}
04-07-2024 01:37 PM
Hello @Remi-Astruc,
I have a similar question but it is not for APIC but Nexus Dashboard Orchestrator API. Do you know by chance what’s wrong with my code?
Thank you in advance for your time.
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide