11-08-2018 02:03 PM
Does anyone of the correct JSON body required to update a static SGT mapping via REST. Here is what I am trying:
I am doing a JSON PUT to my admin node:
https://10.0.128.237:9060/ers/config/sgmapping/17a7afe2-b3e5-459c-8090-587ed1fb3381
The body I am trying to use is:
{
"SGMapping" : {
"sgt" : "2cd52dd0-85ea-11e8-9fa1-024294424ec9",
"deployTo" : "ALL",
"deployType" : "ALL",
"hostName" : "1.1.1.1"
}
}
The hostName field I think is causing me the issue. I am not sure why I would need to specify the IP or hostname since I am reference the object ID in the URL.
Any thoughts would be appreciated.
Solved! Go to Solution.
11-09-2018 01:31 AM
I believe you can set it using SXP Local Bindings section (Refer ERS API documentation in ISE) instead of IP SGT Mappings as below where sxpVpn is the SXP Domain name.
11-08-2018 02:19 PM - edited 11-08-2018 02:38 PM
Okay I figured the first part out. I can get it to update or create:
{
"SGMapping" : {
"sgt" : "2cd52dd0-85ea-11e8-9fa1-024294424ec9",
"deployTo" : "ALL",
"deployType" : "ALL",
"hostIp" : "3.3.3.3"
}
}
Now the only thing I need to figure out is how to set the SXP domain. For static entries I put in the GUI I have the option to set the SXP domain. When I update or add via REST I don't see that option.
Here is what the mappings look like when I add/update via REST.
3.3.3.3 doesn't have Deploy Via set so it won't get pushed out. Is that a oversight in the REST API?
11-08-2018 02:50 PM
Okay in playing with this more I found that if I use SGT groups and assign the new device to the group everything works because the groups have the domain set:
{
"SGMapping" : {
"mappingGroup" : "d9e414a0-f365-4969-9a03-843debea756d",
"hostIp" : "3.3.3.3/32"
}
}
My guess is that the SXP domain was an oversight in the SGT REST API. If you can't set the SXP domain there is no point in adding/modifying IP to SGT mapping via REST. For now, unless I hear otherwise, I will have to create an SGT Group for every SGT tag I create.
11-09-2018 01:25 AM
04-24-2020 12:38 AM
11-09-2018 01:31 AM
I believe you can set it using SXP Local Bindings section (Refer ERS API documentation in ISE) instead of IP SGT Mappings as below where sxpVpn is the SXP Domain name.
11-09-2018 05:30 AM
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