DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

The response header contains the newly created group
ID:


Click here to view code image


Location:
https://ise.devnetsandbox.com:9060/ers/config/endpoint
group/00000000-1111-2222-3333-444444444444

Creating an Endpoint and Adding It to a Group


The API
https://ise.devnetsandbox.com:9060/ers/config/endpoi
nt posts the data to create a new endpoint. It uses the
POST method. The following shows the payload that is
needed to create an Endpoint called ‘DevNet Endpoint’
with a specified groupId.


Method: POST


URL:


Click here to view code image


Data - {
"ERSEndPoint" : {
"name" : "DevNet_Endpoint",
"description" : "DevNet Endpoint-1",
"mac" : "FF:EE:DD:03:04:05",
"groupId" : " 00000000-1111-2222-3333-
444444444444",
"staticGroupAssignment" : true
}
}

This API uses the group ID from the header and requires
basic authentication headers. Example 11-17 shows a
Python requests script.


Example 11-17 Python POST Code to Create a New
Endpoint

Free download pdf