API Automation
Cheat sheet · https://pcornel.dk/topic.php?topic=5591
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
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / scope | Source revision and exact targets are explicit | Stale inventory, hidden selector or wrong variables change scope |
| Management operation | Transport/model/payload and per-device response are traceable | Auth/capability/parser differences hide partial or wrong execution |
| Device state | Effective and persistent state are read back | Accepted config/API result is mistaken for convergence |
| Network proof | Original control/data-plane or service test passes | Automation 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