NetAuto Academy

APIs and REST for Network Engineers

What Is an API? HTTP for Network Engineers

Intermediate11 min read

What you'll learn

  • The HTTP client/server request-response model
  • Why this is a new transport, not a replacement for SSH/CLI automation
  • Where RESTCONF fits as a real, standardized network-specific example
  • That this module extends the same automation lineage, one transport later
🎓 Teach This Lesson

Listen to a guided explanation of this lesson.

Spoken narration isn't supported in this browser.

A new transport, not a new idea

Every automation tool this curriculum has built — Netmiko, Ansible — assumes a device that speaks CLI over SSH. That assumption is still completely valid; nothing in this module retires it. But a large and growing share of real infrastructure — cloud-managed switches, SD-WAN controllers, DNA Center, Meraki, ACI, and RESTCONF-enabled IOS-XE devices — exposes its primary programmatic interface as an HTTP API, not a CLI. This module is about that second transport.

  1. Clientyour Python script
  2. HTTP requesta method, a URL, sometimes a body
  3. APIthe controller or device's HTTP interface
  4. HTTP responsea status code, headers, and usually a JSON body

That's the entire model: a client sends a request, a server sends back a response. No persistent session the way an SSH connection is one — each request stands alone.

Quick checkConcept check
What are the two participants in the HTTP model this lesson describes?

Positioned against what you already know

CLI / SSH (Netmiko, Ansible)
  1. One persistent SSH sessionconnect, run commands, disconnect
  2. Output is textmeant for a human terminal
  3. The device itself is the target
HTTP API (this module)
  1. Independent requestsno persistent session
  2. Output is usually JSONmeant for a program
  3. A controller often sits in front of many devices

Both are real, both are current

This isn't a story of one replacing the other. A classic Cisco IOS switch you SSH into is automated exactly as well with Netmiko or Ansible as it ever was. A cloud-managed platform that only exposes an HTTP API needs this module's skills instead — because there's no CLI to SSH into at all. Which tool you reach for depends on what the target actually offers, not on which is newer.

Quick checkMyth check
Does this module mean SSH/CLI automation (Netmiko, Ansible) is now outdated?

Where RESTCONF fits

One real, standardized example is worth naming now, even though it isn't this module's main path: RESTCONF (RFC 8040) is an HTTP-based API that many Cisco IOS-XE devices and other platforms expose directly — the same request/response model this lesson just described, applied straight to a network device instead of a general-purpose controller. This module's main path uses a simpler, easier-to-practice API shape throughout; RESTCONF reappears briefly in the capstone (Lesson 7) as a concrete, real network example — not as a second curriculum to learn alongside this one.

Quick checkConcept check
What is RESTCONF, in one sentence?

What this module actually builds

  1. Python automationPhase 2.6
  2. Netmiko (SSH)Phase 2.7
  3. Reliable AutomationPhase 2.8
  4. Jinja2 configuration templatesPhase 2.9
  5. Ansible orchestrationPhase 3.0
  6. REST API automationthis module

Every one of those modules taught a way to reach a device or a config outcome. This one adds a transport for the systems where SSH was never an option to begin with — the same lineage, one more tool in it.

Quick checkScenario
A team manages both classic Cisco IOS switches (SSH-reachable) and a cloud-managed SD-WAN platform (HTTP API only, no CLI). Which combination of tools from this curriculum fits both?

Key takeaways

  • HTTP's client/server model: a client sends a request (method + URL, sometimes a body), a server sends back a response (status code + usually JSON) — no persistent session, unlike SSH.
  • This is a new transport for systems that expose an HTTP API, not a replacement for SSH/CLI automation on systems that expose a CLI.
  • RESTCONF (RFC 8040) is a real, standardized example of this exact model applied to network devices — named now, developed further only in the capstone, never a second curriculum inside this module.
  • This module continues the same lineage from Phase 2.6 through Phase 3.0 — one more transport, not a reset.