Cisco Catalyst Center Commands
Overview
Cisco’s network management platform branding has evolved:
| Era | Product | Status |
|---|---|---|
2017-2023 |
DNA Center (DNAC) |
Rebranded to Catalyst Center |
2023+ |
Catalyst Center |
Current platform (same API) |
Legacy |
Prime Infrastructure |
Still in production at many enterprises |
The netapi dnac and netapi prime command groups provide CLI access to these platforms. The DNAC commands work with both DNA Center and Catalyst Center since the API remains compatible.
Prerequisites
DNA Center / Catalyst Center
Commands Reference
| Command | Description |
|---|---|
Device Management |
|
|
List all network devices |
|
Get device details by UUID |
|
Get device by IP address |
|
Get total device count |
|
Get device health summary |
Site Management |
|
|
List all sites |
|
Get site health scores |
Client Management |
|
|
Get client health summary |
|
Get client details by MAC |
Issues & Assurance |
|
|
List network issues |
Templates |
|
|
List configuration templates |
Command Runner |
|
|
Execute CLI commands on devices |
System |
|
|
Check connectivity |
Device Commands
get-devices
List all managed network devices:
netapi dnac get-devices
DNA Center Devices (45) ┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓ ┃ Hostname ┃ IP ┃ Platform ┃ Role ┃ Status ┃ ┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩ │ CORE-SW-01 │ 10.1.1.1 │ C9300-48U │ ACCESS │ Reachable │ │ CORE-SW-02 │ 10.1.1.2 │ C9300-48U │ ACCESS │ Reachable │ │ WLC-01 │ 10.1.1.10 │ C9800-L │ WIRELESS │ Reachable │ │ DIST-SW-01 │ 10.1.1.100 │ C9500-24Y4C │ DISTRIBUTION │ Reachable │ │ EDGE-RTR-01 │ 10.1.1.254 │ ISR4451-X/K9 │ BORDER ROUTER │ Reachable │ └────────────────────┴────────────────┴─────────────────┴───────────────┴───────────┘
Limit results:
netapi dnac get-devices --limit 10
Site Commands
get-sites
List all sites in the hierarchy:
netapi dnac get-sites
DNA Center Sites (8) ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Name ┃ Type ┃ ID ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ Global │ area │ a1b2c3d4-e5f6-7890-... │ │ US-West │ area │ b2c3d4e5-f6a7-8901-... │ │ Los Angeles │ building │ c3d4e5f6-a7b8-9012-... │ │ LA-Floor-1 │ floor │ d4e5f6a7-b8c9-0123-... │ │ LA-Floor-2 │ floor │ e5f6a7b8-c9d0-1234-... │ └──────────────────────┴───────────┴─────────────────────────────┘
get-site-health
View health scores per site:
netapi dnac get-site-health
Site Health ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ ┃ Site ┃ Overall ┃ Network ┃ Clients ┃ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩ │ Los Angeles │ 95 │ 98 │ 92 │ │ San Francisco │ 88 │ 90 │ 85 │ │ Seattle │ 72 │ 75 │ 68 │ └──────────────────┴─────────┴─────────┴─────────┘
Issues & Assurance
get-issues
List network issues:
netapi dnac get-issues
Network Issues (12) ┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┓ ┃ Priority ┃ Name ┃ Category ┃ Status ┃ Device ┃ ┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━┩ │ P1 │ High CPU Utilization │ Device │ active │ CORE-SW-01 │ │ P2 │ AP Radio Channel Changed │ Wireless │ active │ AP-FLOOR-1 │ │ P3 │ Client Authentication Failure │ Client │ active │ WLC-01 │ └──────────┴──────────────────────────────────┴────────────┴──────────┴────────────┘
Filter by priority or status:
# Only P1 issues
netapi dnac get-issues --priority P1
# Only active issues
netapi dnac get-issues --status active
# Both filters
netapi dnac get-issues --priority P1 --status active
Templates
get-templates
List available configuration templates:
netapi dnac get-templates
Templates (15) ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓ ┃ Name ┃ Project ┃ Version ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩ │ VLAN-Provisioning │ LAN-Automation │ 2 │ │ Port-Security │ Security-Baseline │ 3 │ │ SNMP-Config │ Day-N │ 1 │ │ AAA-Template │ Security-Baseline │ 4 │ └──────────────────────────┴───────────────────┴─────────┘
Command Runner
run-commands
Execute CLI commands on devices:
# Single command on single device
netapi dnac run-commands "a1b2c3d4-uuid" "show version"
# Multiple commands on multiple devices
netapi dnac run-commands "uuid1,uuid2,uuid3" "show interfaces,show ip route"
Running commands on 3 device(s)... Task submitted: task-abc123-456-789 Check task status in DNA Center UI
| Command output is retrieved via the DNA Center UI or API task endpoint. The CLI submits the task and returns the task ID. |
Prime Infrastructure
Commands Reference
| Command | Description |
|---|---|
Device Management |
|
|
List managed devices |
|
Get device details |
|
Get total device count |
Alarms |
|
|
List alarms |
|
Acknowledge an alarm |
Compliance |
|
|
List compliance violations |
Configuration |
|
|
List configuration archives |
Jobs |
|
|
List recent jobs |
System |
|
|
Check connectivity |
Device Commands
get-devices
List managed devices:
netapi prime get-devices
Prime Devices (120) ┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓ ┃ Name ┃ IP ┃ Type ┃ Status ┃ ┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩ │ core-sw-01 │ 10.1.1.1 │ Cisco Catalyst 9300 │ REACHABLE │ │ access-sw-01 │ 10.1.2.1 │ Cisco Catalyst 9200 │ REACHABLE │ │ wlc-01 │ 10.1.3.1 │ Cisco 9800 │ REACHABLE │ │ router-01 │ 10.1.4.1 │ Cisco ISR 4451 │ REACHABLE │ └────────────────────┴────────────────┴─────────────────────┴───────────┘
Filter and limit:
# Limit to 20 results
netapi prime get-devices --limit 20
# Filter by device type (Prime filter syntax)
netapi prime get-devices --filter "deviceType=Cisco Catalyst 9300"
Alarm Commands
get-alarms
List alarms:
netapi prime get-alarms
Prime Alarms (25) ┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓ ┃ Severity ┃ Device ┃ Message ┃ Time ┃ ┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩ │ CRITICAL │ core-sw-01 │ Power Supply Failure │ 2026-02-21T09:30 │ │ MAJOR │ access-sw-15 │ High CPU Utilization │ 2026-02-21T09:25 │ │ MINOR │ router-02 │ BGP Neighbor Down │ 2026-02-21T09:20 │ │ WARNING │ wlc-01 │ AP Radio Channel Changed │ 2026-02-21T09:15 │ └───────────┴──────────────────┴───────────────────────────────────────────┴────────────────────┘
Filter by severity:
# Only critical alarms
netapi prime get-alarms --severity CRITICAL
# Only unacknowledged
netapi prime get-alarms --unacknowledged
Compliance Commands
get-violations
List compliance violations:
netapi prime get-violations
Compliance Violations (8) ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓ ┃ Device ┃ Policy ┃ Rule ┃ Severity ┃ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩ │ access-sw-01 │ CIS-Benchmark │ Enable-SSH-Only │ HIGH │ │ access-sw-03 │ CIS-Benchmark │ NTP-Auth-Required │ MEDIUM │ │ router-01 │ Corporate-Standard │ Banner-Required │ LOW │ └──────────────────┴────────────────────┴────────────────────────┴───────────┘
Filter by device:
netapi prime get-violations --device-id 12345
Configuration Commands
get-configs
List configuration archives:
netapi prime get-configs
Config Archives (50) ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓ ┃ Device ┃ Type ┃ Time ┃ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩ │ core-sw-01 │ running-config │ 2026-02-21T06:00 │ │ core-sw-01 │ startup-config │ 2026-02-20T06:00 │ │ access-sw-01 │ running-config │ 2026-02-21T06:00 │ └──────────────────┴────────────────┴────────────────────┘
Job Commands
get-jobs
List recent Prime jobs:
netapi prime get-jobs
Prime Jobs (10) ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓ ┃ ID ┃ Name ┃ Status ┃ Started ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩ │ 12345 │ Config Backup │ COMPLETED │ 2026-02-21T06:00 │ │ 12346 │ Compliance Scan │ RUNNING │ 2026-02-21T09:00 │ │ 12347 │ Discovery │ COMPLETED │ 2026-02-20T22:00 │ └──────────────┴───────────────────────────────┴────────────┴────────────────────┘
Workflows
Daily Health Check
#!/bin/bash
# Morning network health check
dsource d000 dev/network
echo "=== Catalyst Center Health ==="
netapi dnac health
netapi dnac get-device-health
netapi dnac get-issues --priority P1
echo -e "\n=== Prime Alarms ==="
netapi prime get-alarms --severity CRITICAL --unacknowledged
Device Inventory Export
#!/bin/bash
# Export device inventory from both platforms
dsource d000 dev/network
DATE=$(date +%Y%m%d)
mkdir -p /reports/inventory/$DATE
# Catalyst Center devices
netapi dnac get-devices --limit 500 > /reports/inventory/$DATE/dnac-devices.txt
# Prime devices
netapi prime get-devices --limit 500 > /reports/inventory/$DATE/prime-devices.txt
echo "Inventory exported to /reports/inventory/$DATE"
Issue Triage
#!/bin/bash
# Quick issue triage workflow
dsource d000 dev/network
# Check P1 issues first
echo "=== Critical Issues (P1) ==="
netapi dnac get-issues --priority P1 --status active
# Check device with issues
read -p "Enter device IP to investigate: " IP
netapi dnac get-device-by-ip "$IP"
Troubleshooting
Authentication Failed
# Verify environment variables
echo "DNAC_HOST: $DNAC_HOST"
echo "DNAC_USER: $DNAC_USER"
# Test API endpoint directly
curl -k -X POST "https://$DNAC_HOST/dna/system/api/v1/auth/token" \
-H "Content-Type: application/json" \
-u "$DNAC_USER:$DNAC_PASS"
SSL Certificate Errors
Both platforms typically use self-signed certificates. The clients disable SSL verification by default. If you need to use a CA-signed certificate:
# Override in Python code
from netapi.vendors.cisco.dnac import DnacClient
client = DnacClient(
host="catalyst.example.com",
username="admin",
password="secret",
verify_ssl=True
)
API Version Compatibility
DNA Center / Catalyst Center API evolves across versions. The client uses common endpoints that work across 2.x versions. If you encounter compatibility issues:
-
Check your Catalyst Center version: Help > About
-
Verify API documentation matches your version
-
Report issues if core functionality doesn’t work
Migration: Prime to Catalyst Center
If migrating from Prime Infrastructure to Catalyst Center:
-
Device Import: Use Catalyst Center’s discovery or import devices from Prime export
-
Configuration Templates: Recreate templates in Catalyst Center’s Design workflow
-
Compliance: Define new compliance policies in Catalyst Center
-
Alarms/Issues: Catalyst Center uses Assurance for similar functionality
The netapi commands provide a consistent CLI experience across both platforms, simplifying operational workflows during migration.