Pcornel
Automation · Network Automation

API Automation

Cheat sheet · https://pcornel.dk/topic.php?topic=5591

Back to the Topic

Answer

API Automation uses structured device or controller APIs to query and modify network resources through explicit endpoints, schemas, authentication and response semantics.

Remember

  • HTTP 2xx ≠ desired network effect.
  • Valid token ≠ authorization for the requested resource.
  • Schema-valid payload ≠ semantically safe network change.
  • Controller resource success ≠ every managed device converged.

First checks

  • curl -sk -u <u>:<p> -H 'Accept: application/yang-data+json' https://<dev>/restconf/data/ietf-interfaces:interfaces — RESTCONF (lab; verify TLS in prod)
  • Vendor controller APIs (Catalyst Center, Meraki, NSX) — platform APIs
  • API rate limits — throttling

Verify in this order

client → API (YANG-modelled) → device/controller

Where it usually breaks

API success proves the server accepted or processed a request according to its contract; it does not automatically prove downstream device or traffic state.

Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.

API Automation Network Automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Intent / scopeSource revision and exact targets are explicitStale inventory, hidden selector or wrong variables change scope
Management operationTransport/model/payload and per-device response are traceableAuth/capability/parser differences hide partial or wrong execution
Device stateEffective and persistent state are read backAccepted config/API result is mistaken for convergence
Network proofOriginal control/data-plane or service test passesAutomation summary substitutes for actual network acceptance

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5591

Confirmation

Confirm action

Continue?