netapi: Features & Installation
1. Key Features
1.1. ISE Operations
# DataConnect queries
netapi ise dc query "SELECT * FROM RADIUS_AUTHENTICATIONS WHERE..."
# MnT session management
netapi ise mnt sessions
netapi ise mnt coa <mac-address>
# ERS endpoint management
netapi ise ers endpoints list
netapi ise ers create-dacl <name> <content>
netapi ise ers create-authz-profile <name> <dacl>
1.2. IOS Operations
# Execute commands
netapi ios exec "show access-session interface gi1/0/1 details"
# Configuration changes
netapi ios config "interface gi1/0/1" "description Test"
1.3. Unified Exception Hierarchy
All vendor errors inherit from NetapiError, enabling single-catch error handling across 18 vendors.
| Exception | Purpose |
|---|---|
|
Base class — catches all netapi errors |
|
Vendor API returned an error response |
|
Authentication or authorization failure |
|
Unable to reach vendor endpoint |
|
Requested resource does not exist |
|
Vendor rate limit exceeded |
|
Request exceeded configured timeout |
2. Installation
# Base installation
pip install netapi
# With Cisco ISE support
pip install netapi[ise]
# With all extras
pip install netapi[all]
# Development (includes linting, testing, type-checking)
pip install netapi[full]