Use this when reading configuration and state through RESTCONF.
GET · RESTCONF
RESTCONF GET retrieves configuration and state data at a URI, such as /restconf/data/ietf-interfaces:interfaces, with Accept: application/yang-data+json for JSON output.
1. GET reads config/state.
2. content parameter selects config/nonconfig.
3. Handle 404 (node absent).
4. Use for verification.
5. Paginate large lists if supported.
GET path → data
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Effective-state and workload closure Verify boundary
Correlate request/job IDs, require terminal success, GET/read the target state independently, confirm the runtime consumed the change, then run the original workload.
Step 2 Common mistakes Narrow the fault
- Not using
depthorfieldson large reads.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Accept: application/yang-data+json.
- URIs follow the YANG tree.
- 404 means wrong path or no data.
curl -s --cacert ca.pem -u <u>:<p> -H 'Accept: application/yang-data+json' https://<dev>/restconf/data/<path>— read- ?content=config|nonconfig — config vs state
- 404 for missing node — handling
ReferenceWhy it matters1 section · depth on demand
In depth
A RESTCONF GET reads configuration and state data from a device as JSON or XML, using a URL that follows the YANG model's structure.
curl -s -u admin:pass -H 'Accept: application/yang-data+json' \
https://10.0.0.1/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1
Useful query parameters:
| Parameter | Effect |
|---|---|
content=config / nonconfig / all | Configuration, state or both |
depth=N | Limit nesting depth |
fields=name;enabled | Return selected fields |
Keys in URLs are encoded (GigabitEthernet1%2F0%2F1 for GigabitEthernet1/0/1). A 404 usually means the path, module prefix or key is wrong rather than the object being missing.
ReferenceImportant terms & boundaries2 sections · depth on demand
Known-good, transitional and broken reference
GET — comparative operational reference for RESTCONF → GET. What it does not show: request acceptance or job success does not show target change, effective state or workload recovery Next check: move one step toward the original workload using Correlate request/job IDs, require terminal success, GET/read the target state independently, confirm the runtime consumed the change, then run the original workload.
Mechanics
Follow the chain of components client → HTTP/TLS → RESTCONF resource mapping → YANG validation → datastore mutation → GET read-back and record which layer currently owns truth.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in RESTCONF > GET. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc8040 · confidence 94%