to create an Endpoint Group called ‘DevNet Associate
Group’:
Click here to view code image
Data - {
"EndPointGroup" : {
"name" : "DevNet Associate Group",
"description" : "DevNet Associate Group"
}
}
Example 11-16 shows a Python requests command
using this API.
Example 11-16 Python POST Code to Create a New
Endpoint Group
Click here to view code image
""" create a new endpointgroup """
import json
import requests
url =
"https://ise.devnetsandbox.com/ers/config/endpointgroup"
payload = {
"EndPointGroup": {
"name": "DevNet Associate Group",
"description": "DevNet Associate Group"
}
}
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)