ERS API Reference
Overview
The External RESTful Services (ERS) API provides configuration CRUD operations for ISE resources. With 199 endpoints across 70 resource types, ERS is the primary API for automation and integration.
Base URL |
|
Port |
9060 (HTTPS) |
Authentication |
HTTP Basic (ERS Admin role required) |
Content-Type |
|
Pagination |
|
Setup
# Load credentials
dsource d000 dev/network
# ERS API configuration
ISE_HOST="${ISE_PAN_IP}"
ISE_PORT="9060"
ISE_AUTH="${ISE_API_USER}:${ISE_API_PASS}"
BASE_URL="https://${ISE_HOST}:${ISE_PORT}/ers/config"
Authentication
|
Authentication Required ISE ERS and OpenAPI use HTTP Basic Authentication. Credentials must have ERS Admin role enabled in ISE Administration > System > Admin Access > Administrators.
|
Resource Categories
Identity Management
| Resource | Endpoints | netapi | Description |
|---|---|---|---|
5 |
MAC addresses representing network devices |
||
Endpoint Groups |
5 |
Logical groupings for policy assignment |
|
Identity Groups |
5 |
User identity groupings |
|
Internal Users |
5 |
Local user accounts |
|
Guest Users |
5 |
Temporary guest accounts |
Network Devices
| Resource | Endpoints | netapi | Description |
|---|---|---|---|
Network Devices |
5 |
Switches, WLCs, routers (RADIUS clients) |
|
Network Device Groups |
5 |
Device groupings by location, type, etc. |
Policy
| Resource | Endpoints | netapi | Description |
|---|---|---|---|
Authorization Profiles |
5 |
RADIUS attributes returned on success |
|
Downloadable ACLs |
5 |
dACLs pushed to network devices |
|
Allowed Protocols |
5 |
EAP method configurations |
|
Conditions |
5 |
Policy condition building blocks |
Common Operations
List Resources
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_HOST}:9060/ers/config/endpoint" \
-H "Accept: application/json" | jq '.SearchResult.resources'
netapi ise get-endpoints
Get Single Resource
# By ID
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_HOST}:9060/ers/config/endpoint/${ID}" \
-H "Accept: application/json"
# By name
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_HOST}:9060/ers/config/endpoint/name/${NAME}" \
-H "Accept: application/json"
netapi ise get-endpoint "C8:5B:76:C6:59:62"
Create Resource
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_HOST}:9060/ers/config/endpoint" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-X POST \
-d '{"ERSEndPoint": {"mac": "AA:BB:CC:DD:EE:FF", ...}}'
netapi ise create-endpoint "AA:BB:CC:DD:EE:FF" --group "Linux-Workstations"
Filtering
ERS supports query string filters:
# ERS Filter Operators
EQ - Equals
NEQ - Not Equals
STARTSW - Starts With
ENDSW - Ends With
CONTAINS - Contains
GT - Greater Than
LT - Less Than
GE - Greater Than or Equal
LE - Less Than or Equal
# Examples
filter=mac.STARTSW.C8:5B
filter=name.CONTAINS.workstation
filter=staticGroupAssignment.EQ.true
# Find endpoints starting with specific MAC prefix
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_HOST}:9060/ers/config/endpoint?filter=mac.STARTSW.C8:5B" \
-H "Accept: application/json"
Pagination
Pagination
ERS API Pagination
ERS supports page and size query parameters:
# First page, 100 results
curl -sk -u "${ISE_AUTH}" \
"${BASE_URL}/endpoint?page=1&size=100" \
-H "Accept: application/json"
# Page through all results
PAGE=1
SIZE=100
while true; do
RESULT=$(curl -sk -u "${ISE_AUTH}" \
"${BASE_URL}/endpoint?size=${SIZE}&page=${PAGE}" \
-H "Accept: application/json")
COUNT=$(echo "$RESULT" | jq '.SearchResult.resources | length')
echo "$RESULT" | jq -r '.SearchResult.resources[].name'
[[ "$COUNT" -lt "$SIZE" ]] && break
((PAGE++))
done
| Parameter | Description |
|---|---|
|
Page number (1-based) |
|
Results per page (max 100) |
Response Schema
ERS Response Structure
All ERS API responses follow a consistent structure:
List Operations (GET collection)
{
"SearchResult": {
"total": 142,
"resources": [
{
"id": "uuid-string",
"name": "resource-name",
"description": "optional description",
"link": {
"rel": "self",
"href": "https://ise:9060/ers/config/resource/uuid",
"type": "application/json"
}
}
]
}
}
Single Resource (GET by ID/name)
{
"ERSResourceName": {
"id": "uuid-string",
"name": "resource-name",
"description": "optional description",
// Resource-specific fields
"link": {
"rel": "self",
"href": "https://ise:9060/ers/config/resource/uuid"
}
}
}
Create/Update Success (POST/PUT)
{
"UpdatedFieldsList": {
"updatedField": [
{
"field": "fieldName",
"oldValue": "old",
"newValue": "new"
}
]
}
}
Error Handling
Error Handling
Check HTTP Status
# Capture both body and status code
response=$(curl -sk -w "\n%{http_code}" -u "${ISE_AUTH}" \
"${BASE_URL}/endpoint/nonexistent" \
-H "Accept: application/json")
http_code=$(echo "$response" | tail -1)
body=$(echo "$response" | sed '$d')
if [[ "$http_code" -ge 200 && "$http_code" -lt 300 ]]; then
echo "Success: $body" | jq .
else
echo "Error HTTP $http_code:" >&2
echo "$body" | jq -r '.ERSResponse.messages[0].title // .message // .' >&2
exit 1
fi
Parse ERS Errors
# Extract ERS error message
jq -r '.ERSResponse.messages[0].title // "Unknown error"'
# Full error details
jq '.ERSResponse.messages[]'
Parse OpenAPI Errors
# Extract OpenAPI error
jq -r '.response.message // .message // "Unknown error"'
Retry Logic
# Retry with exponential backoff
retry_request() {
local max_attempts=3
local delay=1
for ((i=1; i<=max_attempts; i++)); do
response=$(curl -sk -w "\n%{http_code}" "$@")
http_code=$(echo "$response" | tail -1)
if [[ "$http_code" -lt 500 ]]; then
echo "$response" | sed '$d'
return 0
fi
echo "Attempt $i failed (HTTP $http_code), retrying in ${delay}s..." >&2
sleep "$delay"
((delay*=2))
done
echo "All attempts failed" >&2
return 1
}
See Also
-
OpenAPI v1 (Policy management)