Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Automation & Programmability

Direct answer

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.

When to use this

Use it as the entry point when automating configuration or data collection, or when a script, playbook or API call fails.

First 30 seconds

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.

Operational verification

source of truth → data validated → API or tool authenticated → change applied idempotently → state read back → matches intent

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Scope / prerequisiteUse it as the entry point when automating configuration or data collection, or when a script, playbook or API call fail…
What next?3 suggested next steps
Child topics (this level)5
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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.

Key checks
  • 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

Programmability separates data representation/model from transport and authorization. JSON/YAML encode data, YANG describes structured network data, REST/RESTCONF/API calls carry requests, and authentication/authorization control whether an operation is accepted.

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

LayerExamples
Data modelsYANG (IETF, OpenConfig, vendor models)
EncodingsXML, JSON, YAML
ProtocolsNETCONF, RESTCONF, gNMI, controller REST APIs
Tools and librariesPython (ncclient, requests), Ansible, Terraform
PracticesSource of truth, version control, CI, testing

Why structured interfaces are safer than the CLI

CLI scriptingModel-driven interfaces
Output formats change between releasesSchemas define the data
Errors are text to be recognisedStructured errors (rpc-error, HTTP status)
No transactionsLocks, candidate datastore, rollback-on-error (where supported)
Hard to validate before applyingtest-only and validation capabilities

NETCONF edit options (RFC 6241)

OptionValues
operation attributemerge (default), replace, create, delete, remove
default-operationmerge, replace, none
test-optiontest-then-set, set, test-only
error-optionstop-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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Confirmation

Confirm action

Continue?