All topic guides
Automation & CloudAmalgamated guide

Network Automation & APIs

Controllers, REST APIs, JSON payloads, and southbound/northbound interfaces.

How the sources were combined

Panagiss automation contrasts traditional vs controller-based networking. jdepew88 REST APIs and JSON provide payload examples — merged with hands-on Automation Sandbox cross-link.

Overview

Network automation replaces repetitive per-device CLI with programmatic, repeatable changes — scripts, APIs, and templates stored in version control. Controllers centralize policy while devices still forward traffic locally. At CCNA depth you need vocabulary: southbound vs northbound APIs, REST verbs, and how to recognize structured data in JSON, YAML, and XML.

Try hands-on examples in the Automation Sandbox.

Traditional vs controller-based networking

TraditionalAutomated / controller-led
Engineer SSH to each deviceAPI or orchestration tool pushes config
Config drift over timeGit-tracked intended state
Slow at scaleBulk changes in minutes
Copy-paste errorsValidated pipelines
Traditional device-by-device CLI vs controller-based automation.

Traditional device-by-device CLI vs controller-based automation.

Supplementary figure from Panagiss CCNAmd

Automation use cases: initial provisioning, software version control, compliance checks, statistics collection, reporting, and troubleshooting at scale.

Automation risk

A bad script scales mistakes fast. Always test in a lab and validate with show commands after deployment.

Planes of networking

PlaneRoleExamples
Data (forwarding)Forward frames/packets quicklyMAC table lookup, IP routing, ACL apply
ControlBuild tables the data plane usesOSPF, EIGRP, STP, ARP
ManagementConfigure and monitorSSH CLI, HTTPS GUI, SNMP, APIs

In SDN, control plane intelligence can move to a centralized controller. Devices focus on forwarding; the controller programs behavior via southbound APIs.

Northbound vs southbound APIs

DirectionFlowPurposeExamples
SouthboundController → devicesPush config, read stateNETCONF, RESTCONF, SNMP, SSH, OpenFlow
NorthboundApplications → controllerAutomation apps consume network servicesREST APIs on DNA Center, Meraki dashboard API
Exam trap

Southbound = controller talks down to network devices. Northbound = applications talk up to the controller. Direction questions are very common.

Memory trick: South points down the topology diagram toward switches and routers. North points up toward automation apps and business logic.

Data serialization formats

Automation exchanges structured data between systems. Common plain-text encodings:

FormatNotes
JSONLightweight; native to REST; keys in double quotes
YAMLHuman-friendly; common in Ansible playbooks
XMLVerbose; used by NETCONF and many legacy APIs

YANG is a data modeling language (IETF) describing device configuration and operational state — the schema behind NETCONF/RESTCONF payloads.

REST APIs and HTTP verbs

REST (Representational State Transfer) is an architectural style for web services. RESTful APIs typically run over HTTP and map cleanly to CRUD operations:

CRUDHTTP verbTypical action
CreatePOSTAdd new resource (VLAN, policy, user)
ReadGETRetrieve current state
UpdatePUT / PATCHModify existing resource
DeleteDELETERemove resource

REST characteristics (know for exam):

  1. Client/server — front end and back end independent
  2. Stateless — server stores no client session between requests
  3. Cacheable — responses may be cached for performance

Each HTTP request includes a URI (resource path) and verb. Example DNA Center workflow: POST a new security policy, GET to verify, PUT to update a setting, DELETE to remove it.

REST request examples (conceptual)

GET https://dna-center/api/v1/network-device POST https://dna-center/api/v1/template PUT https://dna-center/api/v1/template/{id} DELETE https://dna-center/api/v1/template/{id}

! Headers often include: ! Authorization: Bearer <token> ! Content-Type: application/json

Authentication

REST APIs use tokens or API keys in headers — not passwords in the URL. CCNA tests the concept, not building a full OAuth flow.

JSON structure

JSON (JavaScript Object Notation) is the dominant format for REST payloads. Rules that trip up beginners:

  • Keys and string values use double quotes (not single)
  • Key/value pairs separated by colons
  • Pairs separated by commas — no trailing comma after the last item
  • Booleans are lowercase: true / false
  • null represents empty/absent value

Data types:

TypeSyntaxExample
ObjectCurly braces &#123;&#125;&#123;"hostname": "SW1", "vlan": 10&#125;
ArraySquare brackets []["10.0.0.1", "10.0.0.2"]
StringDouble quotes"Corp-WiFi"
NumberUnquoted24
Booleanlowercasetrue
NestedObjects inside objectsDevice with interface list

JSON device inventory example:

{
  "devices": [
    {
      "hostname": "SW-FLOOR1",
      "mgmt_ip": "10.0.0.11",
      "vlans": [10, 20, 30],
      "enabled": true
    },
    {
      "hostname": "R-BRANCH",
      "mgmt_ip": "10.0.0.1",
      "ospf_enabled": true
    }
  ]
}

Arrays preserve order; objects are unordered collections of key/value pairs. Automation tools parse JSON to loop over devices and apply templates.

YAML basics

YAML (YAML Ain't Markup Language) is a human-readable format for configuration files. Ansible playbooks and inventory files are written in YAML — you do not need to author complex playbooks for CCNA, but you must recognize valid structure when you see it on the exam.

Core rules:

  • Indentation defines structure — use spaces (typically 2); tabs are invalid in strict YAML
  • Key: value pairs on one line (hostname: SW1)
  • Lists use a leading dash and space (- 10.0.0.1)
  • Strings usually need no quotes unless they contain special characters
  • true / false and numbers work like JSON booleans and integers
YAML conceptSyntaxMeaning
Mapping (object)Indented keys under a parentNested dictionary
Sequence (list)Lines starting with -Ordered list of items
ScalarPlain text after :String, number, or boolean

Ansible inventory example (recognize the shape):

all:
  children:
    switches:
      hosts:
        SW-FLOOR1:
          ansible_host: 10.0.0.11
        SW-FLOOR2:
          ansible_host: 10.0.0.12
    routers:
      hosts:
        R-BRANCH:
          ansible_host: 10.0.0.1

Minimal playbook fragment:

---
- name: Configure NTP on routers
  hosts: routers
  tasks:
    - name: Set NTP server
      ios_config:
        lines:
          - ntp server 10.1.1.1
Exam trap

Wrong indentation in YAML changes meaning — a task pushed under the wrong parent key may never run. Compare indentation columns when reading a snippet.

Same data, three formats (recognition drill):

FormatExample for VLAN 10 named SALES
JSON&#123;"vlan-id": 10, "name": "SALES"&#125;
YAMLvlan-id: 10 then indented name: SALES on the next line
XML&lt;vlan&gt;&lt;id&gt;10&lt;/id&gt;&lt;name&gt;SALES&lt;/name&gt;&lt;/vlan&gt;

XML basics

XML (eXtensible Markup Language) is a tag-based, hierarchical format. It is more verbose than JSON or YAML but maps cleanly to schemas — important for NETCONF, where requests and replies are XML RPCs described by DTDs or schemas.

Core rules (recognize, don't memorize every attribute):

  • Every element has opening and closing tags: &lt;hostname&gt;SW1&lt;/hostname&gt;
  • Elements nest to show hierarchy (like indented YAML)
  • Attributes sit inside the opening tag: &lt;interface name="GigabitEthernet0/1"&gt;
  • One root element wraps the whole document
  • Case-sensitive tag names
XML pieceExampleRole
Element&lt;vlan&gt;...&lt;/vlan&gt;Named container
Child element&lt;id&gt;10&lt;/id&gt;Value inside parent
Attribute&lt;rpc message-id="101"&gt;Metadata on a tag

NETCONF-style RPC (simplified — recognize the envelope):

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get-config>
    <source>
      <running/>
    </source>
  </get-config>
</rpc>

jdepew88 REST APIs notes: NETCONF clients send an RPC in XML over a secure session; the server replies in XML. Both sides agree on syntax limits via XML schemas — that is why XML persists in network device APIs even when northbound REST prefers JSON.

Which format when?

JSON — REST APIs (DNA Center, Meraki). YAML — Ansible playbooks and inventory. XML — NETCONF southbound RPCs. RESTCONF — JSON or XML (JSON is more common on modern controllers).

NETCONF and RESTCONF (awareness)

ProtocolTransportData formatCCNA depth
NETCONFSSH (mandatory)XML RPCsDevice configuration API; RFC 6241
RESTCONFHTTPJSON or XMLRESTful access to YANG datastores; RFC 8040

NETCONF layers: secure transport → messages → operations → content (YANG models).

SNMP remains relevant for monitoring and traps, but NETCONF/RESTCONF improve structured configuration compared to SNMP SET operations.

Configuration management tools

ToolModelCCNA note
AnsibleAgentless; SSH/API; YAML playbooksWeek 10 overview
Puppet / ChefAgent or agentless patternsKnow names and purpose
Python scriptsCustom automationOften calls REST or NETCONF

Infrastructure as Code (IaC): Store playbooks, templates, and inventory in Git — review, rollback, and audit like application code.

Automation workflow (step-by-step)

Goal: ensure NTP is configured on 20 routers.

  1. Inventory — YAML/JSON list of device IPs and credentials (vault-encrypted)
  2. Template — Jinja template: ntp server &#123;&#123; ntp_ip &#125;&#125;
  3. Tool — Ansible playbook loops inventory and pushes config
  4. Validateshow ntp status on sample devices
  5. Version control — commit playbook to Git

You won't build a full CI/CD pipeline on the CCNA exam — but you will recognize the pattern and vocabulary.

Practice on this site

The Automation Sandbox covers:

  • Northbound vs southbound direction
  • REST verb to CRUD mapping
  • JSON, YAML, and XML syntax recognition
  • Ansible and Terraform awareness quizzes
CLI still matters

Automation complements — does not replace — CLI troubleshooting. CCNA expects you to read show output and verify changes.

Exam checklist

  • Define southbound vs northbound and give one example each
  • Map HTTP GET/POST/PUT/DELETE to CRUD
  • Identify valid vs invalid JSON (quotes, trailing commas, booleans)
  • Recognize YAML — indentation, key: value, list items with -
  • Recognize XML — nested tags, opening/closing pairs, NETCONF RPC envelope
  • Match format to tool: JSON (REST), YAML (Ansible), XML (NETCONF)
  • Explain why controllers help at scale without removing distributed forwarding

Related lessons on this site

Continue in this domain

Automation & Cloud · guide 1 of 2

Sources & further reading

jdepew88 CCNA Notes (markdown)

Additional references

This page is an amalgamated study guide synthesized from the markdown sources above, cross-checked against Cisco's official CCNA exam topics. Verify scope before your exam date.