netapi - Network Automation Library
netapi is a composable network automation library and CLI for interacting with any API — network infrastructure, cloud services, DevOps platforms, or anything with an HTTP endpoint.
23 vendor integrations. 8 auth providers. One consistent interface.
Key Features
| Feature | Description |
|---|---|
Any API |
23 vendor integrations: Cisco ISE, pfSense, GitHub, GitLab, Cloudflare, Keycloak, Vault, Synology, Infoblox, Wazuh, and more |
Universal Auth |
8 auth providers: Basic, Bearer, API Key, OAuth2, mTLS, RESTCONF, vendor-specific |
Atomic Design |
Build complex operations from simple, tested primitives across a 5-layer stack |
Secrets-Aware |
Native dsec integration with Age encryption and environment stratification |
CLI + Library |
Use via |
Quick Start
# Load secrets
dsource d000 dev/network
# ISE: list active sessions
netapi ise mnt sessions
# pfSense: list DNS entries
netapi pfsense dns list
# GitHub: list repos
netapi github repos --org my-org
# Cloudflare: list DNS zones
netapi cloudflare zones
Architecture
The library follows a composable 5-layer stack:
| Layer | Name | Components |
|---|---|---|
5 |
Workflows |
multi-vendor-backup, device-inventory, compliance-audit |
4 |
Vendors |
Cisco ISE, IOS, WLC, pfSense, GitHub, GitLab, Keycloak, Vault, Synology, +13 more |
3 |
Capabilities |
backup, monitoring, provisioning, compliance |
2 |
Protocols |
RESTCONF, NETCONF, gNMI, SSH, SNMP |
1 |
Primitives |
auth (8 providers), http (retry/backoff), parsers, models, config |
Vendor Coverage
| Vendor | Auth | CLI | Client |
|---|---|---|---|
Cisco ISE (ERS, MnT, DataConnect, pxGrid, OpenAPI) |
Basic, mTLS |
|
8 clients |
Cisco WLC / IOS |
Basic, RESTCONF |
|
RESTCONF + SSH |
pfSense |
API Key |
|
65+ methods |
GitHub / GitLab / Gitea |
Bearer (PAT) |
|
REST v3/v4 |
Keycloak |
Bearer (OAuth2) |
|
Admin REST |
HashiCorp Vault |
Bearer |
|
Secrets + PKI |
Synology |
Session (SID) |
|
DSM API |
Infoblox |
Basic |
|
WAPI |
Cloudflare |
Bearer |
|
CDN + DNS |
Wazuh |
Bearer |
|
SIEM REST |
Documentation
| Section | Description |
|---|---|
Authentication, response handling, resilience, API discovery — patterns that work with any API |
|
Universal |
|
Declarative YAML format for adding new API integrations |
|
Step-by-step guide: take any API from discovery to automation |
|
Full command documentation for all 18 vendor CLIs |
|
Common issues and solutions |
Related
-
Layer Stack — Detailed architecture breakdown
-
Security — CA validation and mTLS setup
-
dsec Integration — Secrets management