04-13-2021 02:48 AM
Hi Guys,
I've been trying to get this to work for few days now but couldn't figure out the issue.
I can successfully create VRFs, BDs, etc using the API (PATCH + add method) in the MSO. Please note that I want to use the PATCH method so I don't have to include the entire structure in each call (which is massive).
I am using the MSO version 2.2.3j
When I run the following (using Postman),
[ { "op": "add", "path": "/templates/temp1/anps/testANP2/epgs/-", "value": { "name": "myEPG", "displayName": "MY EPG", "contractRelationships": [], "subnets": [], "uSegEpg": false, "uSegAttrs": [], "intraEpg": "unenforced", "proxyArp": false, "preferredGroup": false, "selectors": [], "bdRef": "/schemas/603ed1ed340000e38f7244dd/templates/temp1/bds/myBD" } } ]
I keep getting the error below.
{ "code": 400, "message": "Bad Request: (2)(1)/epgs(0)/schemaId error.path.missing" }
Can someone point out what is missing here? Appreciate your input.
Thanks
05-11-2021 01:54 PM
Did you ever get anywhere with this? I'm essentially having the same issue just trying to add a BD although the error is slightly different.
It happens using Postman or the API Explorer in the MSO GUI.
{
"code": 400,
"message": "Bad Request: (0)(3)/schemaId error.path.missing"
}
05-25-2021 04:18 AM
No, I couldn't get it working with EPG creation. Did you get it working for the EPG creaion?
In any case, I did get the BD creation fine using the following.
[{ "op": "add", "path": "/templates/Template1/bds/-", "value": { "displayName" : "My BD", "name" : "myBD", "subnets" : [], "vrfRef": { "schemaId" : "603ed1ed324000e38f7244dd", "templateName": "Template1", "vrfName": "YourTestVRF" }, "intersiteBumTrafficAllow": true, "optimizeWanBandwidth": true, "l2Stretch": true } }]
08-12-2021 03:32 PM
Thanks this actually helped. Looks like I needed to use that broken out format for the vrfRef for the Anp and Bd References. I'm using MSO 3.3.1 on Nexus Dashboard 2.0.2 deployed in Vmware. Next I need to try and add the rest of the information for the BD and EPGs, and attach the site specific interfaces.
I was able to make the BD first then the EPG using a similar format to this using postman.
Patch -> https://{{MSO}}:/api/v1/schemas/{{schemaID}}?enableVersionCheck=false&validate=true [ { "op":"add", "path":"/templates/Template1/anps/{{anp}}/epgs/-", "value":{ "name": "NutanixTest3", "displayName": "NutanixTest3", "anpRef":{ "schemaId": "{{schemaID}}", "templateName": "Template1", "anpName": "{{anp}}" }, "vrfRef": { "schemaId": "{{schemaID}}", "templateName": "Template1", "vrfName": "vrf_spanned" }, "bdRef":{ "schemaId": "{{schemaID}}", "templateName": "Template1", "bdName": "NutanixTest3" } } } ]
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