Skip to content

CiscoDevNet/cisco-ios-xe-openapi-swagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

439 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cisco IOS XE OpenAPI/Swagger Documentation

IOS XE Version OpenAPI GitHub Pages Modules

Comprehensive OpenAPI 3.0 / Swagger documentation for Cisco IOS XE RESTCONF APIs across multiple releases (17.9.x, 17.12.x, 17.15.x, 17.18.1, 26.1.1). The site defaults to the newest release (26.1.1) with 988 OpenAPI specs, 82,856 paths, and 792 tree files. See the API growth across releases view for per-release counts.

View Live Documentation Getting Started Guide

Deep-Path Specifications

Tree-based generators produce full-depth RESTCONF paths from resolved YANG trees. All 9 model types covered (counts shown for the default 26.1.1 release):

  • Operational: 216 specs, 22,144 paths (GET-only read endpoints)
  • Configuration: 41 specs, 2,559 paths, 10,083 ops (full CRUD)
  • Native Config: 409 specs, 50,716 paths, 202,864 ops (full depth CRUD)
  • OpenConfig: 43 specs, 778 paths, 2,904 ops (vendor-neutral)
  • IETF: 22 specs, 505 paths, 1,664 ops (mixed CRUD + RPC)
  • MIB: 148 specs, 4,272 paths (GET-only deep paths)
  • RPC: 57 specs, 302 RPCs (POST to /operations/)
  • Events: 43 specs, 910 paths (notifications + data endpoints)
  • Other: 9 specs, 670 paths, 1,534 ops (full CRUD)

Key Features:

  • Comprehensive Docs - Getting started guide with 15+ examples
  • 53 Logical Categories - Organized by network engineer workflows
  • 100% Accountability - Every YANG module mapped and documented
  • 792 Tree Files - Searchable YANG tree visualizations

Read Project Summary for full details on enhancements.

Quick Stats (default release: 26.1.1)

Metric Count Description
OpenAPI Specs 988 Deep-path specs across all 9 models
API Paths 82,856 RESTCONF endpoints from resolved YANG trees
Operations 246,677 Total API operations
Tracked Modules 1,469 All tracked units (YANG + MIB + native config bundles)
Modules with specs 971 66.1% coverage
Tree Files 792 YANG/MIB visualizations
Model Types 9 Categories
Releases covered 5 17.9.x → 26.1.1

For the per-release growth curve (specs/paths/operations across all 5 releases), see yang-accountability-compare.html on the live site or version-stats.json in this repo.

Model Categories

Primary Models (Categorized & Organized)

Native Configuration (409 specs, 50,716 paths, 202,864 operations)

Full CLI-equivalent configuration organized by network domain.

  • Categories: Top-level leafs, containers, IP, IPv6, Router, Crypto, AAA, Line, VRF, Platform & System, Protocols, Security & Access, Switching L2, QoS, Monitor, License, Service, Other, App & Services, L2 Discovery, Routing & Multicast, Security Services, Platform & Diagnostics, WAN & Legacy, Industrial & IoT, Misc Extensions
  • Operations: GET, PUT, PATCH, DELETE with complete YANG examples
  • Browse Native Config APIs →

Operational Data (216 specs, 22,144 paths)

Real-time device state and statistics. Read-only GET operations.

  • Categories: interfaces, routing, platform, memory, qos, wireless, vpn, security, switching, environment, processes, sdwan, mpls, services, other
  • Browse Operational APIs →

Events (43 specs, 910 paths)

Event notification modules for YANG-Push telemetry and SNMP trap visualization.

  • YANG Events: 40 Cisco-IOS-XE event modules
  • MIB Notifications: 88 SNMP trap modules (view-only in Swagger)
  • Browse Events APIs →

RPC Operations (57 specs, 302 RPCs)

Remote procedure calls for device actions and commands.

  • Cisco RPCs: 51 modules for device operations
  • IETF/Tailf: 7 modules (ietf-event-notifications, tailf-netconf-extensions, tailf-netconf-query, and others)
  • Browse RPC APIs →

Standard Models (Original Structure)

Configuration (41 specs, 2,559 paths)

Device configuration with full CRUD operations.

OpenConfig (43 specs, 778 paths)

Vendor-neutral network configuration standards.

IETF Standards (22 specs, 505 paths)

RFC-compliant IETF YANG models.

MIB Translations (148 specs, 4,272 paths)

SNMP MIB modules with YANG tree visualizations.

Other Models (9 specs, 670 paths)

Standalone and vendor-specific modules.

Recent Improvements

  • Realistic write-operation examples — Every POST/PUT/PATCH body across the spec set ships with a complete, RFC 7951–compliant payload. No more empty {} placeholders. See scripts/enrich_v2_specs.py and the CHANGELOG.
  • Deep-link URLs — Sharing a search result, module, or spec URL now opens the right view. Hash patterns: #search=<q>, #module=<name>, #spec=<model>/<name>.
  • CSP-hardened frontend — All inline JS extracted to external files; script-src 'self' cdn.jsdelivr.net.
  • Live-device validation scriptscripts/validate_examples_c9kv.py verifies examples against a real Catalyst 9000V (or any IOS XE 17.18.1+ device).

Quick Start

View Online

Visit https://ciscodevnet.github.io/cisco-ios-xe-openapi-swagger/

Test Locally

# Clone repository
git clone https://github.com/CiscoDevNet/cisco-ios-xe-openapi-swagger.git
cd cisco-ios-xe-openapi-swagger

# Start local server
python -m http.server 8000

# Open browser to http://localhost:8000

Use the OpenAPI Specs

# Download a specific spec (replace 26.1.1 with the release you want)
curl -O https://ciscodevnet.github.io/cisco-ios-xe-openapi-swagger/releases/26.1.1/swagger-oper-model/api/Cisco-IOS-XE-interfaces-oper.json

# Generate Python client
openapi-generator-cli generate -i Cisco-IOS-XE-interfaces-oper.json -g python -o ./python-client

API Examples

Python RESTCONF Example

import requests
from requests.auth import HTTPBasicAuth

base_url = "https://sandbox-iosxe-latest-1.cisco.com/restconf"
auth = HTTPBasicAuth('developer', 'C1sco12345')

# Get interface statistics
response = requests.get(
    f"{base_url}/data/Cisco-IOS-XE-interfaces-oper:interfaces",
    headers={"Accept": "application/yang-data+json"},
    auth=auth,
    verify=False
)
print(response.json())

Development

Prerequisites

  • Python 3.8+
  • pyang (pip install pyang)

Regenerate Specifications

cd generators

# Run all generators
python generate_oper_openapi_v2.py
python generate_rpc_openapi_v2.py
python generate_cfg_openapi_v2.py
python generate_openconfig_openapi_v2.py
python generate_ietf_openapi_v2.py
python generate_mib_openapi_v2.py
python generate_events_openapi.py
python generate_native_openapi_v2.py
python generate_other_openapi_v2.py

# Validate quality
cd ..
python scripts/validate_quality.py

# Generate accountability report
python scripts/analyze_yang_accountability.py

Project Structure

iosxe-1718-yang-swagger/
├── index.html                          # Main landing page
├── swagger-oper-model/                 # Operational (205 specs)
├── swagger-rpc-model/                  # RPC (59 specs)
├── swagger-cfg-model/                  # Config (39 specs)
├── swagger-openconfig-model/           # OpenConfig (57 specs)
├── swagger-ietf-model/                 # IETF (19 specs)
├── swagger-mib-model/                  # MIB (149 specs)
├── swagger-events-model/               # Events (38 specs)
├── swagger-native-config-model/        # Native (81 specs)
├── swagger-other-model/                # Other (9 specs)
├── generators/                         # Python YANG parsers
├── scripts/                            # Validation/analysis tools
└── references/17181-YANG-modules/      # 848 YANG sources

Documentation

Resources

Contact


Last Updated: March 2026 | IOS XE Version: 17.18.1 | OpenAPI: 3.0.0

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages