Use it as the entry point when automating configuration or data collection, or when a script, playbook or API call fails.
Automation & Programmability
Network automation and programmability replace manual CLI work with code and APIs: Python scripts, structured data (JSON, YAML, XML), model-driven APIs (NETCONF, RESTCONF with YANG), controller APIs (Catalyst Center, SD-WAN Manager), configuration management tools (Ansible, Terraform) and AI-assisted operations.
1. Which interface fails: script, API, controller or tool?
2. Reach and authenticate: curl -i to the API — 401/403 means credentials or permissions.
3. Request valid? 400 → check the JSON body against the model.
4. Dry run (Ansible --check, Terraform plan) shows the expected change only?
5. After the change, read back state through the API and compare with intent.
source of truth → data validated → API or tool authenticated → change applied idempotently → state read back → matches intent
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Troubleshooting approach Narrow the fault
Validate endpoint/method → auth → authorization → payload/schema → HTTP status/body → read back resulting state → compare against intended configuration.
Path: Networking → Automation & Programmability. Local intent: Controllers, APIs, JSON, automation, AI/ML concepts and configuration management.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
JSON structures, REST methods and API fundamentals.
Subtopic Automation & ControllersController-based networking, Ansible/Terraform concepts and automation.
Subtopic AI/ML in Network OperationsGenerative/predictive AI and machine-learning concepts in network operations.
Subtopic Controller-Based ArchitectureTraditional vs controller-based networks, overlay/underlay/fabric and northbound/southbound APIs.
Subtopic Configuration Management ToolsCapabilities of automation/configuration management mechanisms such as Ansible and Terraform.
Automation is only as good as its inputs: a source of truth, validated data, idempotent changes (running twice gives the same result), a dry run first and read-back verification after. Prefer APIs and structured data over screen-scraping CLI output.
curl -sk -u <user>:<pw> -H 'Accept: application/yang-data+json' https://<device>/restconf/data/ietf-interfaces:interfaces— RESTCONF read.curl -i— HTTP status code and headers (200 OK, 201 Created, 204 No Content, 400, 401, 403, 404).python3 -m json.tool < file.json/jq . file.json— JSON valid and readable.show netconf-yang status/show platform software yang-management process— device API agents running.show ip http server status— HTTPS server for RESTCONF.
ReferenceWhat it is1 section · depth on demand
What it is
Automation turns repeatable operational intent into reviewed, testable code or declarative state. Good infrastructure automation validates prerequisites, handles current state safely, records results and verifies the intended outcome instead of assuming every run starts from a blank system.
ReferenceHow it works2 sections · depth on demand
How it works
Mechanism, scope & boundaries
API-based network automation has four distinct layers: transport/session, identity/authorization, resource/method semantics and structured data/model validation. JSON is a representation format; it is not the API, model or guarantee that the requested network state is valid.
ReferenceImportant terms & boundaries2 sections · depth on demand
Important terms and limits
Key terms: endpoint/resource, HTTP method, status code, header, payload, JSON, YANG, RESTCONF, authentication, authorization, idempotency and schema/model.
In depth
Programmability: structured interfaces instead of screen scraping
Network programmability replaces CLI text parsing with structured data and well-defined operations. NETCONF (RFC 6241) shows the model. It has four layers: secure transport (SSH or TLS), messages (<rpc> and <rpc-reply>), operations, and content (data modelled in YANG). Its operations include get, get-config, edit-config, copy-config, lock and unlock. The running datastore always exists, and candidate and startup datastores are optional capabilities.
Programmability building blocks
| Layer | Examples |
|---|---|
| Data models | YANG (IETF, OpenConfig, vendor models) |
| Encodings | XML, JSON, YAML |
| Protocols | NETCONF, RESTCONF, gNMI, controller REST APIs |
| Tools and libraries | Python (ncclient, requests), Ansible, Terraform |
| Practices | Source of truth, version control, CI, testing |
Why structured interfaces are safer than the CLI
| CLI scripting | Model-driven interfaces |
|---|---|
| Output formats change between releases | Schemas define the data |
| Errors are text to be recognised | Structured errors (rpc-error, HTTP status) |
| No transactions | Locks, candidate datastore, rollback-on-error (where supported) |
| Hard to validate before applying | test-only and validation capabilities |
NETCONF edit options (RFC 6241)
| Option | Values |
|---|---|
operation attribute | merge (default), replace, create, delete, remove |
default-operation | merge, replace, none |
test-option | test-then-set, set, test-only |
error-option | stop-on-error, continue-on-error, rollback-on-error |
R1(config)# netconf-yang
R1(config)# restconf
dev$ ssh -s netadmin@10.255.0.1 -p 830 netconf
dev$ python3 - <<'PY'
from ncclient import manager
with manager.connect(host="10.255.0.1", port=830, username="netadmin",
password="<password>", hostkey_verify=False) as m:
print([c for c in m.server_capabilities if "ietf-interfaces" in c])
PY
Programmability topics in this reference
NETCONF, RESTCONF and YANG describe device-level interfaces. The controller API topics cover Catalyst Center and SD-WAN Manager. The Python and data format topics cover the tools used to work with all of them.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation & Programmability. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%