ERS Endpoints API
Manage endpoint records - the core of ISE’s device identity database.
Endpoint Resource
Base URL |
|
Resource Type |
|
Max Page Size |
100 |
Filterable Fields |
|
List All Endpoints
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?page=1&size=100"
Response
{
"SearchResult": {
"total": 52,
"resources": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "AA:BB:CC:DD:EE:FF",
"link": {
"rel": "self",
"href": "https://ise-01:9060/ers/config/endpoint/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
]
}
}
Get All Endpoints (Loop)
ise_get_all_endpoints() {
local PAGE=1 SIZE=100 TOTAL=1
while [ $((PAGE * SIZE - SIZE)) -lt $TOTAL ]; do
RESPONSE=$(curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?page=${PAGE}&size=${SIZE}")
TOTAL=$(echo "$RESPONSE" | jq -r '.SearchResult.total')
echo "$RESPONSE" | jq -r '.SearchResult.resources[]'
PAGE=$((PAGE + 1))
done
}
Get Endpoint by MAC
MAC="AA:BB:CC:DD:EE:FF"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?filter=mac.EQ.${MAC}"
Response
{
"SearchResult": {
"total": 1,
"resources": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "AA:BB:CC:DD:EE:FF"
}
]
}
}
Get Endpoint Details by ID
ENDPOINT_ID="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/${ENDPOINT_ID}"
Response
{
"ERSEndPoint": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "AA:BB:CC:DD:EE:FF",
"mac": "AA:BB:CC:DD:EE:FF",
"profileId": "...",
"staticProfileAssignment": false,
"groupId": "...",
"staticGroupAssignment": true,
"portalUser": "",
"identityStore": "",
"identityStoreId": "",
"customAttributes": {
"customAttributes": {
"Department": "Engineering",
"AssetTag": "LAPTOP-001"
}
},
"link": {
"rel": "self",
"href": "https://ise-01:9060/ers/config/endpoint/..."
}
}
}
Search Endpoints
By MAC Pattern
# All endpoints starting with AA:BB
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?filter=mac.STARTSWITH.AA:BB"
By Profile
# Get profile ID first
PROFILE_ID="..."
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?filter=profileId.EQ.${PROFILE_ID}"
Create Endpoint
Simple Create
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"ERSEndPoint": {
"mac": "AA:BB:CC:DD:EE:FF",
"description": "Engineering Laptop"
}
}' \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint"
Create with Group Assignment
# Get group ID first
GROUP_ID=$(curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpointgroup?filter=name.EQ.Workstations" \
| jq -r '.SearchResult.resources[0].id')
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST \
-d "{
\"ERSEndPoint\": {
\"mac\": \"AA:BB:CC:DD:EE:FF\",
\"groupId\": \"${GROUP_ID}\",
\"staticGroupAssignment\": true,
\"description\": \"Engineering Laptop\"
}
}" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint"
Create with Custom Attributes
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"ERSEndPoint": {
"mac": "AA:BB:CC:DD:EE:FF",
"description": "Engineering Laptop",
"customAttributes": {
"customAttributes": {
"Department": "Engineering",
"AssetTag": "LAPTOP-001",
"Owner": "jsmith"
}
}
}
}' \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint"
Response (201 Created)
{
"ERSResponse": {
"operation": "POST-endpoint-create",
"messages": [],
"link": {
"rel": "self",
"href": "https://ise-01:9060/ers/config/endpoint/new-uuid-here"
}
}
}
Update Endpoint
ENDPOINT_ID="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X PUT \
-d '{
"ERSEndPoint": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"mac": "AA:BB:CC:DD:EE:FF",
"description": "Updated description",
"groupId": "new-group-id",
"staticGroupAssignment": true
}
}' \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/${ENDPOINT_ID}"
Delete Endpoint
By ID
ENDPOINT_ID="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-X DELETE \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/${ENDPOINT_ID}"
By MAC (Two-Step)
MAC="AA:BB:CC:DD:EE:FF"
# Step 1: Get ID
ENDPOINT_ID=$(curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?filter=mac.EQ.${MAC}" \
| jq -r '.SearchResult.resources[0].id')
# Step 2: Delete
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-X DELETE \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/${ENDPOINT_ID}"
Bulk Operations
Bulk Create
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"ERSBulkRequest": {
"operationType": "create",
"resourceMediaType": "application/json",
"resources": [
{"mac": "AA:BB:CC:DD:EE:01", "description": "Device 1"},
{"mac": "AA:BB:CC:DD:EE:02", "description": "Device 2"},
{"mac": "AA:BB:CC:DD:EE:03", "description": "Device 3"}
]
}
}' \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/bulk/submit"
Response
{
"ERSBulkRequestResult": {
"id": "bulk-job-uuid"
}
}
Check Bulk Job Status
BULK_ID="bulk-job-uuid"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/bulk/${BULK_ID}"
Bulk Delete
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"ERSBulkRequest": {
"operationType": "delete",
"resourceMediaType": "application/json",
"idList": [
"uuid-1",
"uuid-2",
"uuid-3"
]
}
}' \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/bulk/submit"
Helper Functions
Complete endpoint management script
#!/bin/bash
# ISE Endpoint Management Functions
# Requires: ISE_PAN_FQDN, ISE_API_USER, ISE_API_PASS
ise_endpoint_get() {
local MAC="$1"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?filter=mac.EQ.${MAC}" \
| jq -r '.SearchResult.resources[0]'
}
ise_endpoint_create() {
local MAC="$1" DESC="${2:-}" GROUP_ID="${3:-}"
local PAYLOAD="{\"ERSEndPoint\":{\"mac\":\"${MAC}\""
[ -n "$DESC" ] && PAYLOAD="${PAYLOAD},\"description\":\"${DESC}\""
[ -n "$GROUP_ID" ] && PAYLOAD="${PAYLOAD},\"groupId\":\"${GROUP_ID}\",\"staticGroupAssignment\":true"
PAYLOAD="${PAYLOAD}}}"
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d "$PAYLOAD" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint"
}
ise_endpoint_delete() {
local MAC="$1"
local ID=$(ise_endpoint_get "$MAC" | jq -r '.id')
[ "$ID" = "null" ] && echo "Not found" && return 1
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-X DELETE \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint/${ID}"
}
ise_endpoint_count() {
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
-H "Accept: application/json" \
"https://${ISE_PAN_FQDN}:9060/ers/config/endpoint?size=1" \
| jq -r '.SearchResult.total'
}
netapi CLI Equivalent
| curl | netapi |
|---|---|
List all |
|
Get by MAC |
|
Create |
|
Delete |
|
Count |
|
Export |
|