-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
297 lines (295 loc) · 19.8 KB
/
Copy pathindex.html
File metadata and controls
297 lines (295 loc) · 19.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.clarity.ms; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self' https://*.clarity.ms;">
<title>Cisco IOS-XE 26.1.1 - Configuration APIs</title>
<link rel="stylesheet" href="../assets/vendor/swagger-ui-5.31.0/swagger-ui.css" integrity="sha384-KX9Rx9vM1AmUNAn07bPAiZhFD4C8jdNgG6f5MRNvR+EfAxs2PmMFtUUazui7ryZQ" crossorigin="anonymous">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #fafafa; }
.header { background: linear-gradient(135deg, #00BCD4 0%, #00838F 100%); color: white; padding: 20px 40px; }
.header h1 { font-size: 24px; margin-bottom: 6px; }
.header p { opacity: 0.9; font-size: 13px; }
.header .badge { display: inline-block; background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 12px; font-size: 12px; margin-left: 8px; }
.nav-bar { background: #1b1b1b; padding: 8px 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.nav-bar a { color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 4px; font-size: 13px; transition: background 0.2s; }
.nav-bar a:hover { background: #333; }
.nav-bar a.active { background: #00838F; }
.container { display: flex; min-height: calc(100vh - 120px); }
.sidebar { width: 340px; background: white; border-right: 1px solid #e0e0e0; overflow-y: auto; flex-shrink: 0; }
.sidebar-header { padding: 14px 20px; background: #f5f5f5; border-bottom: 1px solid #e0e0e0; }
.search-box { padding: 10px 16px; border-bottom: 1px solid #e0e0e0; }
.search-box input { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.search-box input:focus { outline: none; border-color: #00BCD4; }
.stats-bar { display: flex; gap: 20px; padding: 10px 16px; background: #f8f9fa; border-bottom: 1px solid #e0e0e0; }
.stat { text-align: center; }
.stat-value { font-size: 20px; font-weight: bold; color: #00838F; }
.stat-label { font-size: 11px; color: #666; }
.module-list { list-style: none; }
.module-list li { border-bottom: 1px solid #f0f0f0; }
.module-list a { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; color: #333; text-decoration: none; font-size: 12px; transition: background 0.15s; }
.module-list a:hover { background: #e0f7fa; }
.module-list a.selected { background: #e0f7fa; border-left: 3px solid #00838F; }
.module-list .path-count { color: #999; font-size: 11px; white-space: nowrap; }
/* Recursive YANG container tree (shared with native viewer) */
.tree-row { display: flex; align-items: center; padding: 4px 12px 4px 4px; font-size: 12px; color: #333; cursor: pointer; user-select: none; border-bottom: 1px solid #f5f5f5; gap: 4px; }
.tree-row:hover { background: #e0f7fa; }
.tree-row.selected { background: #e0f7fa; border-left: 3px solid #00838F; }
.tree-row code { font-family: 'Consolas','Monaco','Courier New',monospace; font-size: 12px; background: transparent; padding: 0; color: #00695C; }
.tree-row .tree-arrow { display: inline-block; width: 12px; flex: 0 0 12px; color: #00838F; font-size: 9px; transition: transform 0.15s; }
.tree-row.collapsed .tree-arrow { transform: rotate(-90deg); }
.tree-arrow-empty { visibility: hidden; }
.tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-label[data-module], .tree-label[onclick] { cursor: pointer; }
.tree-label .leaf-spec { color: #999; font-size: 10px; margin-left: 6px; font-style: italic; }
.tree-row .path-count { color: #00838F; font-size: 10px; background: #e0f7fa; border-radius: 8px; padding: 0 6px; min-width: 22px; text-align: center; }
.tree-children.collapsed { display: none; }
.swagger-container { flex: 1; overflow-y: auto; }
.main-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.info-box { padding: 24px; margin: 24px; background: #e0f7fa; border-radius: 8px; }
.info-box h3 { color: #006064; margin-bottom: 12px; }
.info-box p { color: #333; line-height: 1.7; font-size: 14px; }
.download-bar { display: none; padding: 8px 20px; background: #e0f7fa; border-bottom: 1px solid #e0e0e0; align-items: center; gap: 12px; }
.download-bar button { padding: 6px 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; background: #00838F; color: white; }
.search-info { padding: 6px 16px; font-size: 11px; color: #666; background: #f9f9f9; border-bottom: 1px solid #e0e0e0; display: none; }
</style>
<link rel="stylesheet" href="../assets/css/site.css">
<link rel="stylesheet" href="../assets/css/viewer.css">
<link rel="stylesheet" href="../assets/css/components.css">
<script src="../assets/js/site-chrome.js" defer></script>
<script src="../assets/js/viewer-enhancements.js" defer></script>
<!-- BEGIN seo-meta (managed by scripts/inject_seo_meta.py) -->
<meta name="description" content="Browse RESTCONF configuration APIs for Cisco IOS-XE. Browse, search, and deep-link to any RESTCONF endpoint.">
<meta name="keywords" content="Cisco IOS-XE, YANG, OpenAPI, RESTCONF, NETCONF, network automation, model-driven telemetry, programmability, swagger">
<meta name="author" content="Cisco DevNet">
<meta name="theme-color" content="#1565c0" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0a0d12" media="(prefers-color-scheme: dark)">
<link rel="canonical" href="https://ciscodevnet.github.io/cisco-ios-xe-openapi-swagger/swagger-cfg-model/">
<link rel="icon" type="image/svg+xml" href="../assets/icons/favicon.svg">
<link rel="alternate icon" type="image/x-icon" href="../assets/icons/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="../assets/icons/apple-touch-icon.png">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Cisco IOS-XE OpenAPI & YANG Docs">
<meta property="og:title" content="Cisco IOS-XE 26.1.1 - Configuration APIs">
<meta property="og:description" content="Browse RESTCONF configuration APIs for Cisco IOS-XE. Browse, search, and deep-link to any RESTCONF endpoint.">
<meta property="og:url" content="https://ciscodevnet.github.io/cisco-ios-xe-openapi-swagger/swagger-cfg-model/">
<meta property="og:image" content="https://ciscodevnet.github.io/cisco-ios-xe-openapi-swagger/assets/icons/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Cisco IOS-XE 26.1.1 - Configuration APIs">
<meta name="twitter:description" content="Browse RESTCONF configuration APIs for Cisco IOS-XE. Browse, search, and deep-link to any RESTCONF endpoint.">
<meta name="twitter:image" content="https://ciscodevnet.github.io/cisco-ios-xe-openapi-swagger/assets/icons/og-image.png">
<!-- END seo-meta -->
<!-- BEGIN pwa (managed by scripts/inject_pwa.py) -->
<link rel="manifest" href="../site.webmanifest">
<script src="../assets/js/sw-register.js" defer></script>
<!-- END pwa -->
</head>
<body>
<div class="header">
<h1>Cisco IOS-XE <span class="header-version">26.1.1</span> - Configuration APIs</h1>
<p id="headerStats">Loading...</p>
</div>
<nav class="nav-bar">
<a href="../index.html">Home</a>
<a href="../swagger-oper-model/index.html">Operational</a>
<a href="../swagger-cfg-model/index.html" class="active">Config</a>
<a href="../swagger-native-config-model/index.html">Native</a>
<a href="../swagger-openconfig-model/index.html">OpenConfig</a>
<a href="../swagger-rpc-model/index.html">RPC</a>
<a href="../swagger-ietf-model/index.html">IETF</a>
<a href="../swagger-mib-model/index.html">MIB</a>
<a href="../telemetry.html?tab=notifications">Notifications</a>
<a href="../swagger-other-model/index.html">Other</a>
<a href="../yang-trees/" style="margin-left: auto; background: #4CAF50;">Tree Browser</a>
</nav>
<div class="container">
<aside class="sidebar">
<div class="sidebar-header"><h3>Configuration Specs</h3></div>
<div class="search-box"><input type="text" id="searchBox" placeholder="Search modules..." oninput="filterModules()"></div>
<div class="search-info" id="searchInfo"></div>
<div class="stats-bar">
<div class="stat"><div class="stat-value" id="totalSpecs">—</div><div class="stat-label">Specs</div></div>
<div class="stat"><div class="stat-value" id="totalPaths">—</div><div class="stat-label">Paths</div></div>
<div class="stat"><div class="stat-value" id="totalOps">—</div><div class="stat-label">Operations</div></div>
</div>
<div id="sidebarContent">Loading...</div>
</aside>
<main class="main-content">
<div class="info-box" id="welcomeBox">
<h3>Configuration API</h3>
<p>Full CRUD (GET/PUT/PATCH/DELETE) endpoints generated from resolved YANG tree files.</p>
<p style="margin-top: 10px;">Select a module from the sidebar.</p>
</div>
<div class="download-bar" id="downloadBar">
<button onclick="downloadSpec()">Download JSON</button>
<span id="downloadLabel" style="color:#666;font-size:12px;"></span>
<a id="treeLink" href="#" target="_blank" rel="noopener noreferrer" style="display:none; padding: 6px 14px; border-radius: 4px; font-size: 12px; background: #4CAF50; color: white; text-decoration: none; font-weight: 500;">View YANG Tree</a>
<button type="button" class="btn copy-share-btn" onclick="window.__DeepLink && window.__DeepLink.copyShareLink(this)" title="Copy a shareable link that opens this exact spec / operation / release">Copy Share Link</button>
</div>
<div id="platformBadges" class="platform-badges" style="display:none;margin:6px 0 10px 0;padding:6px 10px;background:#fafafa;border:1px solid #e0e0e0;border-radius:4px;"></div>
<div id="swagger-ui" class="swagger-container"></div>
</main>
</div>
<script src="../assets/vendor/swagger-ui-5.31.0/swagger-ui-bundle.js" integrity="sha384-cxafBeQ+zYROeFafGFxtFbnp1ICqeS9mG7+f0WWSHzhnrUvwg9Za5CCw6wgrHA7K" crossorigin="anonymous"></script>
<script src="../assets/vendor/swagger-ui-5.31.0/swagger-ui-standalone-preset.js" integrity="sha384-6DNyIQAo3wcTAtOv9yarCKSm1Vhxwkg5ZHgsQ9Y4gD1NuzRgK4+HmCyRbEKkpJ66" crossorigin="anonymous"></script>
<script src="../deeplink.js"></script>
<script src="../yang-tree-sidebar.js"></script>
<script src="../assets/js/platform-support.js"></script>
<script src="paths-search.js"></script>
<script>
function escapeHtml(s) { return s.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,'''); }
// === version-aware api base (added by patch_viewers_version_aware.py) ===
// Default version + allow-list are baked from releases/index.json at
// patch time. Re-run scripts/patch_viewers_version_aware.py after editing
// releases/index.json to refresh these.
var __IOSXE_DEFAULT_VER__ = '26.1.1';
var __IOSXE_ALLOWED_VERS__ = ["26.1.1", "17.18.1", "17.15.x", "17.12.x", "17.9.x"];
function __activeVer() {
// Priority: ?ver= query > #ver= hash > localStorage > parent window.
// Always returns a valid version from the allow-list (falls back to
// __IOSXE_DEFAULT_VER__ for unknown/missing input).
var raw = null;
try {
var qs = new URLSearchParams(location.search);
if (qs.get('ver')) raw = qs.get('ver');
if (!raw) {
var hm = location.hash.match(/[#&]ver=([^&]+)/);
if (hm) raw = decodeURIComponent(hm[1]);
}
if (!raw) raw = localStorage.getItem('iosxe-active-version');
} catch (_) {}
if (!raw && window.parent && window.parent !== window
&& window.parent.__IOSXE_ACTIVE_VERSION__) {
raw = window.parent.__IOSXE_ACTIVE_VERSION__;
}
if (!raw) raw = window.__IOSXE_ACTIVE_VERSION__;
if (raw && __IOSXE_ALLOWED_VERS__.indexOf(raw) >= 0) return raw;
return __IOSXE_DEFAULT_VER__;
}
function __apiBase() {
var ver = __activeVer();
var m = location.pathname.match(/\/(swagger-[^/]+-model)\//);
var cat = m ? m[1] : '';
return '../releases/' + encodeURIComponent(ver) + '/' + cat + '/api';
}
function __treeBase() {
var ver = __activeVer();
return '../releases/' + encodeURIComponent(ver) + '/yang-trees';
}
// Expose for mib-metadata side card and other consumers.
window.__IOSXE_ACTIVE_VERSION__ = __activeVer();
// Update any element flagged with `.header-version` so the viewer's
// visible header reflects the active release instead of the static
// fallback baked in at HTML build time.
(function () {
function applyHeaderVersion() {
try {
var v = __activeVer();
document.querySelectorAll('.header-version').forEach(function (el) {
el.textContent = v;
});
// Also keep the browser tab title in sync.
if (document.title) {
document.title = document.title.replace(
/Cisco IOS-XE [0-9.x]+/, 'Cisco IOS-XE ' + v);
}
} catch (_) {}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', applyHeaderVersion);
} else {
applyHeaderVersion();
}
})();
// === end version-aware api base ===
let allModules = [], currentModule = null, containerTree = null;
async function init() {
const resp = await fetch(__apiBase() + '/manifest.json');
const m = await resp.json();
document.getElementById('totalSpecs').textContent = m.total_modules;
document.getElementById('totalPaths').textContent = m.total_paths.toLocaleString();
document.getElementById('totalOps').textContent = m.total_operations.toLocaleString();
document.getElementById('headerStats').textContent = `${m.total_paths.toLocaleString()} paths, ${m.total_operations.toLocaleString()} ops across ${m.total_modules} modules`;
const fetches = m.modules.map(async fname => {
try {
const r = await fetch(`${__apiBase()}/${fname}.json`); const spec = await r.json();
const paths = spec.paths || {};
const pathList = Object.keys(paths);
const opOrder = ['get','put','patch','post','delete'];
const pathOps = {};
for (const p of pathList) {
const ops = paths[p] || {};
for (const mth of opOrder) {
if (ops[mth] && ops[mth].operationId) { pathOps[p] = ops[mth].operationId; break; }
}
}
return { fname, title: (spec.info.title||fname).replace('Cisco IOS-XE Configuration - ',''), paths: pathList.length, pathList, pathOps };
} catch(e) { if (typeof window.__showViewerToast === "function") { window.__showViewerToast("Failed to load spec: " + fname + " (" + (e && e.message || "network error") + ")", "warning"); } return { fname, title: fname, paths: 0, pathList: [], pathOps: {} }; }
});
allModules = (await Promise.all(fetches)).sort((a,b) => a.title.localeCompare(b.title));
containerTree = YangTreeSidebar.build(allModules);
renderSidebar();
checkHash();
}
function renderSidebar(filter='') {
const host = document.getElementById('sidebarContent');
const r = YangTreeSidebar.render(containerTree, host, {
filter: filter,
currentModule: currentModule,
collapseAllByDefault: true,
storageKey: 'cfg',
onLoad: loadSpec,
});
const info = document.getElementById('searchInfo');
if (filter && filter.trim()) {
info.textContent = `${r.visibleTops} top containers, ${r.matched} nodes match`;
info.style.display = 'block';
} else {
info.style.display = 'none';
}
}
function filterModules() { renderSidebar(document.getElementById('searchBox').value); }
function loadSpec(fname, el, opId) {
const sameSpec = (currentModule === fname);
currentModule = fname;
document.getElementById('welcomeBox').style.display = 'none';
document.getElementById('downloadBar').style.display = 'flex';
document.getElementById('downloadLabel').textContent = fname + '.json';
document.querySelectorAll('.module-list a, .tree-row').forEach(a => a.classList.remove('selected'));
if (el) el.classList.add('selected');
if (el && el.classList.contains('tree-label')) {
const row = el.closest('.tree-row');
if (row) row.classList.add('selected');
}
if (window.__DeepLink) {
if (opId) { window.__DeepLink.setSpecOp(fname, opId); }
else { window.__DeepLink.setSpec(fname); }
} else {
window.location.hash = '#spec=' + fname + (opId ? '&op=' + encodeURIComponent(opId) : '');
}
if (!sameSpec) {
SwaggerUIBundle({ url: `${__apiBase()}/${fname}.json`, dom_id: '#swagger-ui', presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset], layout: 'StandaloneLayout', deepLinking: false, filter: true });
} else if (opId && window.__DeepLink && window.__DeepLink.tryExpandOp) {
window.__DeepLink.tryExpandOp(opId);
}
const treeLink = document.getElementById('treeLink');
if (treeLink) {
const treeUrl = __treeBase() + '/' + fname + '.html';
treeLink.href = treeUrl;
treeLink.style.display = 'none';
fetch(treeUrl, { method: 'HEAD' }).then(r => {
treeLink.style.display = r.ok ? 'inline-block' : 'none';
}).catch(() => { treeLink.style.display = 'none'; });
}
if (window.__PlatformSupport) { window.__PlatformSupport.renderBadges(document.getElementById("platformBadges"), fname); }
}
function downloadSpec() { if (!currentModule) return; const a = document.createElement('a'); a.href = `${__apiBase()}/${currentModule}.json`; a.download = currentModule+'.json'; document.body.appendChild(a); a.click(); document.body.removeChild(a); }
function checkHash() { const p = (window.__DeepLink && window.__DeepLink.parseHash()) || (function () { var h = decodeURIComponent(window.location.hash || '').replace(/^#/, ''); var o = {}; h.split('&').forEach(function (s) { var i = s.indexOf('='); if (i > 0) o[s.substring(0, i)] = s.substring(i + 1); }); return o; })(); if (p.spec && allModules.find(m => m.fname === p.spec)) { if (currentModule !== p.spec) loadSpec(p.spec, document.querySelector(`[data-module="${CSS.escape(p.spec)}"]`), p.op); else if (p.op && window.__DeepLink) window.__DeepLink.tryExpandOp(p.op); } }
window.addEventListener('hashchange', checkHash); init();
</script>
</body>
</html>