Network Automation Fundamentals: APIs, Data Formats, and Controller-Based Networking

Manually configuring devices one command at a time through the CLI does not scale to modern networks with hundreds or thousands of devices, driving the shift toward programmatic automation. This article explains the difference between traditional CLI management and API-driven automation, covers the JSON and YAML data formats used throughout network automation tooling, and introduces controller-based networking as the architectural shift underlying modern automated networks.

Network AutomationREST APIJSON and YAML

~6 min read · Updated Sep 10, 2026

Why Manual CLI Configuration Does Not Scale

Every configuration example throughout this series so far has relied on typing commands directly into the CLI, discussed earlier in this series. This approach works well for a handful of devices, but becomes impractical and error-prone at the scale of a modern data center or large enterprise network with hundreds or thousands of devices — manually repeating the same configuration change across a thousand switches is slow, tedious, and highly susceptible to typos and inconsistency between devices.

The Shift from CLI to API-Driven Management

Rather than a human typing commands meant to be read by another human, API (Application Programming Interface)-driven management allows software to configure and query network devices programmatically, using structured requests and responses instead of human-readable command-line text.

Traditional CLI approach:
A human manually types:
  interface gigabitethernet 0/1
  description Uplink to Core
  no shutdown
-- Not easily parsed or generated by software
-- without fragile text-pattern matching

API-driven approach:
A script sends a structured request:
  PUT /interfaces/GigabitEthernet0-1
  {"description": "Uplink to Core", "enabled": true}
-- Easily generated, validated, and parsed by
-- software, without any ambiguity about meaning

This structured approach allows the same configuration change to be applied consistently and reliably across thousands of devices simultaneously through a script, rather than manually repeating the same CLI sequence device by device.

REST APIs: The Dominant Modern Approach

Most modern network devices and controllers expose a REST (Representational State Transfer) API, which uses standard HTTP methods to perform operations, discussed earlier in this series regarding HTTP as an application-layer protocol.

Common REST API operations, mapped to HTTP methods:

GET     - retrieve information (e.g., current
          interface configuration)
POST    - create a new resource
PUT     - update/replace an existing resource
DELETE  - remove a resource

Example request retrieving interface status:
GET https://device-ip/restconf/data/interfaces

Example response (simplified):
{
  "interfaces": {
    "interface": [
      {"name": "GigabitEthernet0/1", "enabled": true}
    ]
  }
}

This mirrors the CRUD (Create, Read, Update, Delete) pattern found throughout software development generally, making network automation approachable for programmers coming from other software backgrounds without needing to learn an entirely unfamiliar paradigm.

JSON: The Common Language of API Responses

JSON (JavaScript Object Notation) is the most common data format used in API requests and responses, structuring data as nested key-value pairs that are both human-readable and easily parsed by nearly every programming language.

Example JSON representing a switch interface:
{
  "interface": "GigabitEthernet1/0/1",
  "vlan": 10,
  "status": "up",
  "speed": 1000,
  "duplex": "full"
}

Key characteristics:
- Curly braces {} define an object
- Square brackets [] define a list/array
- Keys and string values are wrapped in quotes
- Nesting represents hierarchical relationships

YAML: A More Human-Readable Alternative

YAML (YAML Ain't Markup Language) represents the same kind of structured data as JSON, but using indentation rather than braces and brackets, making it noticeably easier for humans to read and write by hand — YAML is the standard format for automation tool configuration files, such as Ansible playbooks.

The same interface data represented in YAML:

interface: GigabitEthernet1/0/1
vlan: 10
status: up
speed: 1000
duplex: full

-- Indentation (spaces, never tabs) defines the
-- structure instead of explicit braces and brackets

JSON and YAML represent the exact same underlying data structures and can be programmatically converted between each other — the choice between them is largely about which format is being consumed by a particular tool, with YAML generally preferred for files humans write and edit directly, and JSON generally preferred for data exchanged between systems.

Ansible: Declarative Configuration Management

Ansible is among the most widely used network automation tools, using YAML-formatted Playbooks to describe the desired end state of a device's configuration, rather than the step-by-step commands needed to reach it.

Simplified example Ansible playbook:

- name: Configure interface description
  hosts: switches
  tasks:
    - name: Set interface description
      ios_config:
        lines:
          - description Uplink to Core
        parents: interface GigabitEthernet0/1

This Declarative approach — describing what the end state should look like rather than the exact sequence of commands to get there — is a fundamental shift in thinking compared to the imperative, step-by-step CLI configuration covered throughout this series, and Ansible (or similar tools) determines the specific commands needed on each device to reach that described state.

Controller-Based Networking: A Deeper Architectural Shift

Beyond simply automating configuration of individually managed devices, Controller-Based Networking introduces a centralized system that manages an entire fleet of devices as a single logical entity, similar in spirit to the centralized WLC architecture discussed earlier in this series regarding wireless networks, but extended to wired infrastructure as well.

Traditional model: each device individually
  configured and managed, whether via CLI or API

Controller-based model: a central controller
  (such as Cisco DNA Center or Cisco ACI) maintains
  the desired network-wide configuration and policy,
  automatically pushing appropriate configuration
  to each managed device, and continuously monitoring
  for and correcting configuration drift

This architectural shift mirrors the same underlying pattern seen throughout networking evolution: replacing distributed, individually managed intelligence with centralized management and policy, a pattern already familiar from the WLC-based wireless architecture discussed earlier in this series, now extended to the entire network fabric.

Why Automation Fluency Is Becoming a Core Networking Skill

Network automation does not replace the fundamental networking concepts covered throughout the rest of this series — understanding OSPF, VLANs, and ACLs remains essential, since automation tools ultimately configure exactly these same underlying technologies. What automation changes is how that configuration gets applied at scale: fluency with APIs, JSON/YAML data formats, and tools like Ansible has become an increasingly expected skill for network engineers working in modern, large-scale environments, complementing rather than replacing traditional CLI expertise.

Written & researched by Dr. Shahin Siami

Related Articles

Wireless LAN Fundamentals: Standards, Architecture, and Basic Configuration

Wireless networking introduces an entirely different physical medium than the cabled Ethernet covered earlier in this series, along with its own terminology, architecture, and security considerations. This article explains the evolution of 802.11 wireless standards, covers the centralized wireless architecture built around wireless LAN controllers, and walks through configuring a basic wireless network with proper security.

Continue

Quality of Service Fundamentals: Classifying and Prioritizing Network Traffic

Not all network traffic is equally sensitive to delay, and treating a voice call the same as a large file download during periods of congestion produces a poor experience for both. This article explains why QoS matters, covers the classification and marking of traffic using CoS and DSCP, walks through queuing strategies that determine which traffic is serviced first, and covers the essential configuration for applying QoS policies on a Cisco device.

Continue

Layer 2 Attack Mitigation: DHCP Snooping and Dynamic ARP Inspection

The MAC-learning and ARP mechanisms that make Ethernet networks function are also fundamentally trusting, creating openings for attacks that redirect or intercept traffic without ever touching a firewall. This article explains how a rogue DHCP server or ARP spoofing attack works, and covers how DHCP Snooping and Dynamic ARP Inspection work together to close these Layer 2 vulnerabilities.

Continue

Network Security Fundamentals: Device Hardening and Port Security

Before layering on advanced security features, every network device needs basic hardening to prevent unauthorized access and protect against common Layer 2 attacks. This article covers securing device management access with strong authentication, encrypting stored passwords, and configuring port security to restrict which devices can connect to a switch port.

Continue

IPv6 Fundamentals: Addressing for the Next Generation of the Internet

IPv4's limited address space made a successor protocol inevitable, and IPv6 provides an address space so vast that address exhaustion is no longer a practical concern. This article explains the structure of an IPv6 address, the shorthand notation rules used to write it compactly, the different IPv6 address types, and the essential commands for configuring and verifying IPv6 on a Cisco device.

Continue

OSPF Fundamentals: Link-State Routing Explained

OSPF is the most widely deployed interior routing protocol in enterprise networks, using a fundamentally different approach than simply exchanging routing tables between neighbors. This article explains what a link-state protocol actually is, how OSPF routers become neighbors and build a shared topology database, how the cost metric determines the best path, and the essential commands for configuring and verifying single-area OSPF.

Continue