04-19-2017 07:51 PM
Hello,
Is there an ERS API to GET/POST Blacklist devices in ISE 2.2?
If so could you please provide the path for this API?
Thanks,
Dipesh
Solved! Go to Solution.
04-19-2017 09:49 PM
Sure - see below on ISE v2.2
Find the endpoint ID for the Blacklist endpoint group:
root@kali:~# curl -k https://ers-admin:password@10.5.123.69:9060/ers/config/endpointgroup?filter=name.EQ.Blacklist -H Accept:application/json
{
"SearchResult" : {
"total" : 1,
"resources" : [ {
"id" : "aa000c30-8bff-11e6-996c-525400b48521",
"name" : "Blacklist",
"description" : "Blacklist Identity Group",
"link" : {
"rel" : "self",
"href" : "https://10.5.123.69:9060/ers/config/endpointgroup/aa000c30-8bff-11e6-996c-525400b48521",
"type" : "application/xml"
}
} ]
}
}
Then show all the endpoints within that endpoint group ID:
root@kali:~# curl -k https://ers-admin:password@10.5.123.69:9060/ers/config/endpoin?filter=groupId.EQ.aa000c30-8bff-11e6-996c-525400b48521 -H Accept:application/json
{
"SearchResult" : {
"total" : 2,
"resources" : [ {
"id" : "f4bc60b0-257f-11e7-bbb1-0050568f4d09",
"name" : "01:23:01:23:01:22",
"description" : "MAC#2",
"link" : {
"rel" : "self",
"href" : "https://10.5.123.69:9060/ers/config/endpoint/f4bc60b0-257f-11e7-bbb1-0050568f4d09",
"type" : "application/xml"
}
}, {
"id" : "eb85ac90-257f-11e7-bbb1-0050568f4d09",
"name" : "01:23:01:23:01:23",
"description" : "MAC#1",
"link" : {
"rel" : "self",
"href" : "https://10.5.123.69:9060/ers/config/endpoint/eb85ac90-257f-11e7-bbb1-0050568f4d09",
"type" : "application/xml"
}
} ]
}
}
root@kali:~#
Hope that helps to get you started :-)
04-19-2017 09:49 PM
Sure - see below on ISE v2.2
Find the endpoint ID for the Blacklist endpoint group:
root@kali:~# curl -k https://ers-admin:password@10.5.123.69:9060/ers/config/endpointgroup?filter=name.EQ.Blacklist -H Accept:application/json
{
"SearchResult" : {
"total" : 1,
"resources" : [ {
"id" : "aa000c30-8bff-11e6-996c-525400b48521",
"name" : "Blacklist",
"description" : "Blacklist Identity Group",
"link" : {
"rel" : "self",
"href" : "https://10.5.123.69:9060/ers/config/endpointgroup/aa000c30-8bff-11e6-996c-525400b48521",
"type" : "application/xml"
}
} ]
}
}
Then show all the endpoints within that endpoint group ID:
root@kali:~# curl -k https://ers-admin:password@10.5.123.69:9060/ers/config/endpoin?filter=groupId.EQ.aa000c30-8bff-11e6-996c-525400b48521 -H Accept:application/json
{
"SearchResult" : {
"total" : 2,
"resources" : [ {
"id" : "f4bc60b0-257f-11e7-bbb1-0050568f4d09",
"name" : "01:23:01:23:01:22",
"description" : "MAC#2",
"link" : {
"rel" : "self",
"href" : "https://10.5.123.69:9060/ers/config/endpoint/f4bc60b0-257f-11e7-bbb1-0050568f4d09",
"type" : "application/xml"
}
}, {
"id" : "eb85ac90-257f-11e7-bbb1-0050568f4d09",
"name" : "01:23:01:23:01:23",
"description" : "MAC#1",
"link" : {
"rel" : "self",
"href" : "https://10.5.123.69:9060/ers/config/endpoint/eb85ac90-257f-11e7-bbb1-0050568f4d09",
"type" : "application/xml"
}
} ]
}
}
root@kali:~#
Hope that helps to get you started :-)
04-21-2017 10:10 AM
Greatly appreciate your quick and detailed response. It worked.
Would you be able to share the corresponding POST/PUT call that would update this blacklist?
Thanks,
Dipesh
04-21-2017 05:04 PM
OK looked up SDK docs and found out it is the same URL to POST this list.
04-23-2017 06:46 PM
Nice work!
11-08-2017 08:19 PM
Great work Darren. Could you also share how to add a device to blacklist using restful API. The above examples are for getting the blacklisted device. I would like to post/put a device to a blacklist.
~Thanks
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