Click here to view code image
""" create a new endpoint """
import json
import requests
url =
"https://ise.devnetsandbox.com/ers/config/endpoint"
payload = {
"ERSEndPoint": {
"name": "DevNet_Endpoint",
"description": "DevNet Endpoint-1",
"mac": "FF:EE:DD:03:04:05",
"groupId": " 00000000-1111-2222-3333-
444444444444",
"staticGroupAssignment": True
}
}
headers = {
'content-type': "application/json",
'accept': "application/json",
'authorization': "Basic
ZGV2YXNjOnN0cm9uZ3Bhc3N3b3JkJw==",
'cache-control': "no-cache",
}
response = requests.request(
"POST",
url,
data=json.dumps(payload),
headers=headers
)
print(response.text)
The response header contains the newly created
endpoint ID:
Click here to view code image
Location:
https://ise.devnetsandbox.com:9060/ers/config/endpoint/
deadbeef-1111-2222-3333-444444444444
Other ISE APIs
For a complete list of all Cisco ISE APIs, see
https://developer.cisco.com/docs/identity-services-
engine/.