Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

RESTCONF

Direct answer

RESTCONF is an HTTPS protocol for reading and changing configuration and operational data on network devices, using the structure defined by YANG models and JSON or XML encoding. Security requirements are covered in REST API Security.

When to use this

Use NETCONF for RPC/datastore workflows and RESTCONF for HTTPS resource operations over the same model-driven data.

First 30 seconds

transport/TLS/SSH → authentication/authorization → capabilities/YANG path → RPC/HTTP operation → datastore → device state

Operational verification

transport/TLS/SSH → authentication/authorization → capabilities/YANG path → RPC/HTTP operation → datastore → device state

request accepted → job/task succeeded → target object changed → effective runtime state confirmed → original workload verified → dependency/return-path regression

Local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.

Local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
RESTCONF / YANG HTTP automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformRESTCONF / YANG HTTP automation · Exact syntax, defaults, scale and output fields vary by platform and IOS / IOS XE release.
Key commandshow platform software yang-management process
Scope / prerequisiteUse NETCONF for RPC/datastore workflows and RESTCONF for HTTPS resource operations over the same model-driven data.
What next?3 suggested next steps
Child topics (this level)11
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Read-only Verification Verify boundary

Cisco IOS / IOS XE read-only process inspection, where supported by the referenced platform/release:

show platform software yang-management process

Client-side curl GET, not IOS CLI. The example hostname and CA file are placeholders; --user api-reader prompts for its secret instead of putting a password in the command. Validate that this YANG module/path exists on the target.

curl --include --cacert management-ca.pem --user api-reader --header "Accept: application/yang-data+json" --request GET https://router.example.net/restconf/data/ietf-interfaces:interfaces

Do not add certificate-validation bypass. A locally running process is a prerequisite; it is not proof of a completed RESTCONF transaction.

Step 2 Target-state verification ladder Verify boundary

RESTCONF uses a strict target-state ladder for RESTCONF HTTP transaction and effective datastore/device state: request accepted → job/task succeeded → target object changed → effective runtime state confirmed → original workload verified. Each arrow is a separate limit of what it shows. HTTP 200, RPC accepted, queued task, pipeline green or exit code 0 shows the automation/controller completed its own step under its semantics; it does not by itself show the target consumed the change. Target configuration/state must then be read from the authoritative target interface, and effective runtime/forwarding/enforcement state must be observed separately when the platform has an apply/reconcile/programming stage. Final closure is the original workload from the original context.

Step 3 Verification path Verify boundary

Record device/API endpoint, HTTP request ID, YANG module/revision and resource path; inspect the runtime/control-plane result; then query the addressed YANG data resource and its persisted/operational representation through an independent read path and compare it with the versioned intent. The negative fixture should deliberately exercise risks such as wrong resource URI, PUT/PATCH replacement semantics confusion, stale conditional requests, content-type mismatch and treating 2xx as state convergence, choosing the cases most relevant to HTTP/YANG resource model, supported methods, encoding, errors and read-back; the protocol is not a generic arbitrary REST API. Capture the exact run/request/message/task identity, versioned definition, selected target IDs and pre-state before mutation. If the operation is asynchronous, follow it to a terminal state and then query the owned target through a read path that does not depend on the write response. If repeatability/idempotency is expected, run the same intent again and show that the second run is a no-op or a bounded re-evaluation rather than duplicate mutation. Verification is insufficient if it only shows that syntax parsed, transport accepted a request, a controller queued work, or a workflow ended. For Automation → RESTCONF, the evidence must connect the control-plane result to the addressed YANG data resource and its persisted/operational representation and explain any gap between desired, controller-reported and consumer-visible state. Preserve errors from the earliest failing layer rather than retrying broadly until a later green status hides the original fault.

Step 4 Failure Signatures Narrow the fault
  • TLS failure: validate hostname, trust chain, certificate validity and negotiated support.
  • 401: inspect credentials and the authentication challenge.
  • 403: inspect effective authorization; changing the password is not an authorization repair.
  • 404: inspect the exact root/module/resource and access visibility.
  • 400/415: inspect request syntax, schema and media type.
  • 2xx with an unexpected body or state: inspect the addressed resource and independent device/service state.

Use RESTCONF Troubleshooting for the complete protocol troubleshooting reference.

Step 5 Verification & troubleshooting Narrow the fault

1. Verify service, route, port and certificate/SSH.

2. Authenticate and inspect capabilities/models.

3. Read a narrow resource.

4. Validate/edit with correct datastore and media type.

5. Confirm reply errors and device state.

Step 6 Accepted, succeeded, changed, effective, verified Narrow the fault

When RESTCONF fails, branch on the earliest ladder state that diverges. If the request was rejected, troubleshoot schema/auth/preconditions before job execution. If the job failed, preserve step-level error and partial changes. If the job reports success but target state did not change, inspect wrong target, stale inventory/source-of-truth, provider/controller semantics and asynchronous task completion. If target config changed but effective state did not, inspect reconciliation, reload/restart/programming, dependency and policy enforcement. If effective state is correct but workload still fails, move beyond automation into adjacent network/storage/identity/application dependencies. Retry only after classifying whether the operation is idempotent and whether partial state exists.

Step 7 Where it fails Narrow the fault

Failure analysis for Automation → RESTCONF should follow the path through the components: client → HTTP/TLS → RESTCONF resource mapping → YANG validation → datastore mutation → GET read-back. Common failure classes include wrong resource URI, PUT/PATCH replacement semantics confusion, stale conditional requests, content-type mismatch and treating 2xx as state convergence. A failure at one layer must not be relabeled as another: authentication/authorization differs from target absence, parsing differs from policy/validation rejection, scheduling differs from execution, and controller success differs from consumer-visible convergence. Timeout or connection loss is especially ambiguous because work may continue after the client stops waiting. Before retrying a mutating operation, read current target state using the stable identity device/API endpoint, HTTP request ID, YANG module/revision and resource path; if state is unknown, stop broad retries. Preserve pre-state, exact versioned intent, correlation IDs and the first concrete error. Recovery should repair the earliest failing step, not expand permissions, weaken validation or duplicate the operation to see if it eventually works. When partial success is possible, enumerate changed and unchanged objects explicitly and define whether compensating rollback is safe. This keeps Automation → RESTCONF remediation evidence-driven and prevents a green control-plane status, stale cache or repeated mutation from being mistaken for evidence.

Evidence references

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.

observation · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic RESTCONF Fundamentals

RESTCONF fundamentals: an HTTP-based protocol (RFC 8040) that exposes YANG-modelled configuration and state as URIs under /restconf/data, using GET, POST, PUT, PATCH and DELETE with JSON or XML.

Subtopic RESTCONF over HTTPS

RESTCONF runs over HTTPS, using TLS and normally HTTP basic or token authentication.

Subtopic YANG Data

YANG data in RESTCONF is addressed by the YANG tree path in the URI, such as /data/Cisco-IOS-XE-native:native/hostname, so the YANG model defines which URIs and fields exist.

Subtopic GET

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.

Subtopic POST

RESTCONF POST creates a new child resource under the target URI or invokes an RPC operation, failing if the resource already exists.

Subtopic PUT

RESTCONF PUT creates or fully replaces the target resource with the supplied data, so anything not included is removed.

Subtopic PATCH

RESTCONF PATCH merges the supplied data into the existing resource, changing only the given fields, which is the usual safe way to update configuration.

Subtopic DELETE

RESTCONF DELETE removes the configuration resource at the given URI, such as a loopback interface, returning 204 No Content on success.

Subtopic JSON

RESTCONF JSON encoding uses media type application/yang-data+json, with keys prefixed by the YANG module name, such as "ietf-interfaces:interface".

Subtopic XML

RESTCONF XML encoding uses media type application/yang-data+xml, with namespaces from the YANG modules, matching what NETCONF uses.

Subtopic RESTCONF Troubleshooting

Troubleshoot RESTCONF by checking HTTPS and RESTCONF are enabled, the URI path and module prefix, Accept and Content-Type headers, HTTP status codes and the error body, and user privilege level.

Key points

A GET response demonstrates only the response actually observed for that identity/resource. It does not prove another operation is denied, a write is persisted to startup configuration, or the intended service forwards traffic. REST API Security owns those security-policy proof boundaries; retain the original operation and independent readback as separate checks.

Key checks
  • curl -s --cacert ca.pem -u <u>:<p> -H 'Accept: application/yang-data+json' https://<dev>/restconf/data/ietf-yang-library:modules-state — supported modules
  • RESTCONF base path (/restconf) — discovery
  • HTTP status code handling — errors
ReferenceWhat it is2 sections · depth on demand

Direct Answer

RESTCONF is the HTTPS protocol for accessing YANG-defined configuration and operational data. This Automation Topic owns protocol behavior and operational examples; REST API Security owns the security control requirements.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

What it is

NETCONF and RESTCONF expose YANG-modeled configuration and operational data through structured, machine-oriented interfaces.

API automation crosses client serialization/authentication, transport, endpoint routing/validation, policy, request acceptance and often an asynchronous worker/reconciler. HTTP 2xx or a job ID shows acceptance at one step, not that the target resource changed. Completion status still must be followed by target read-back and workload verification. Trace this Topic using stable identifiers through request accepted → job/task execution → target object change → effective read-back → original workload verification. At each boundary, compare the value that the responsible component actually exposes with the value the next consumer receives; note timers, counters, state transitions and scope such as interface, namespace, VRF, tenant, host, guest, identity, device or resource where applicable. If the upstream state is healthy, move to the next independently observable boundary instead of repeating the same configuration check. Close with Correlate request/job IDs, require terminal success, GET/read the target state independently, confirm the runtime consumed the change, then run the original workload. and state what the evidence does not show.

ReferenceWhy it matters1 section · depth on demand

When to use it

Use NETCONF for RPC/datastore workflows and RESTCONF for HTTPS resource operations over the same model-driven data.

ReferenceHow it works1 section · depth on demand

Technical Mechanics

Follow RESTCONF Fundamentals and YANG Data for protocol/YANG structure. GET retrieves data; POST can create a resource or invoke an operation, PUT can create or replace, PATCH edits and DELETE removes the target resource. A POST operation can have effects beyond a datastore edit. Follow the existing method children for request paths, media types, status codes and failure interpretation.

Use HTTPS and REST API Security for transport/authentication policy. A generic REST endpoint is not automatically RESTCONF: confirm the RESTCONF root, advertised modules and supported capabilities.

ReferenceImportant terms & boundaries5 sections · depth on demand

Key operational limits

  • NETCONF commonly uses SSH/TCP 830 and XML RPCs
  • RESTCONF uses HTTPS, HTTP methods and JSON/XML representations
  • Capability/model discovery precedes path or payload construction
  • Running, candidate and startup semantics depend on server capabilities
  • Transport success does not show authorization, valid YANG paths or transaction success.
  • For RESTCONF, verify the local state before inferring downstream or end-to-end success.

Proof Boundaries

A GET response demonstrates only the response actually observed for that identity/resource. It does not prove another operation is denied, a write is persisted to startup configuration, or the intended service forwards traffic. REST API Security owns those security-policy proof boundaries; retain the original operation and independent readback as separate checks.

Mechanics

Automation → RESTCONF is owned at runtime by the RESTCONF HTTP server backed by a YANG-modeled datastore. Its durable intent is method, resource URI, media type, conditional headers and YANG-valid payload; the stable identity contract is device/API endpoint, HTTP request ID, YANG module/revision and resource path. The consumer-visible target is the addressed YANG data resource and its persisted/operational representation. The operating invariants are that URI and namespace identity are correct, media type and method semantics match RFC 8040, validation errors remain visible, and target state is re-read independently. Do not collapse parser/API acceptance, controller completion and target-evidence of the actual state into one green status. 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. This matters because automation can return success while a later reconciler, worker, transport, target subsystem or consumer still fails. The reference should preserve object identity across every layer, distinguish desired state from observed state, and prefer machine-readable IDs/revisions over mutable labels. The linked authority for bounded mechanics is RFC 8040 — RESTCONF Protocol; documentation support is separate from observed lab/production Evidence. For Automation → RESTCONF, the practical question is not merely whether a tool ran, but whether the exact intended object was selected, the correct semantic contract was applied, and the final state can be reproduced and independently observed.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

In depth

RESTCONF (RFC 8040) maps YANG-modelled data on a device to HTTPS URLs, so standard HTTP methods read and change configuration and state. A resource path follows the model: module name, containers and list keys.

MethodRESTCONF meaning
GETRead config and/or state (?content=config)
POSTCreate a child resource
PUTCreate or replace the target resource
PATCHMerge changes into the target
DELETERemove the resource
curl -s -u admin:$PW -H 'Accept: application/yang-data+json' \
  'https://r1/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1'

List keys containing slashes must be URL-encoded (GigabitEthernet1%2F0%2F1). Unlike NETCONF, RESTCONF has no candidate datastore or explicit locking — each request is applied on its own.

ReferenceConfiguration & state2 sections · depth on demand

Cisco Configuration

State-changing service-enablement fragment for a supported IOS / IOS XE device with an already reviewed AAA/NACM policy, restricted management exposure and trusted HTTPS identity:

restconf
ip http secure-server

These two commands are not a complete secure configuration. Follow REST API Security and the named Cisco release documentation for authentication, source restrictions, certificates and authorization. Do not replace an existing AAA policy or create unrestricted privilege-15 automation accounts to make a test succeed.

Lifecycle

Manage Automation → RESTCONF as versioned automation. Pin or record implementation/schema/API versions when behavior can drift, and keep environment-specific identifiers/secrets outside reusable logic where possible. Before promotion, resolve selectors against a bounded inventory and fail closed on ambiguous identity. Changes to defaults, API/schema versions, scheduler/timezone behavior, parser coercion, runner/controller versions, transport capabilities or trust scope are semantic changes even when syntax still parses. Preserve the previous reviewed intent so rollback is a known transition rather than reconstruction from memory. Keep runtime artifacts, caches, logs and transient execution state separate from persistent intent. Secrets belong in the platform's intended secret store and must not be copied into generated examples, logs or audit output. A fresh noninteractive execution should be reproducible from source-controlled intent plus documented prerequisites, and retirement/expiry rules should prevent stale Automation → RESTCONF automation from continuing indefinitely.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docRESTCONF / YANG HTTP automation current

Authoritative/upstream documentation reviewed for bounded claims in RESTCONF. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc8040 · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Embedded reference data

Quick lookup tables

Automation → RESTCONF · operational reference

Context-specific ownership, verification, output and failure-boundary lookup for Automation → RESTCONF.

LayerAutomation → RESTCONF operational reference
Runtime/ownershipRESTCONF / YANG HTTP automation · the RESTCONF HTTP server backed by a YANG-modeled datastore
Persistent intentmethod, resource URI, media type, conditional headers and YANG-valid payload
Topic-specific focusHTTP/YANG resource model, supported methods, encoding, errors and read-back; the protocol is not a generic arbitrary REST API
VerificationRun one bounded Automation → RESTCONF fixture in a non-production scope. Record device/API endpoint, HTTP request ID, YANG module/revision and resource path; inspect the runtime/control-plane result; then query the addressed YANG data resource and its persisted/operational representation through an independent read path and compare it with the versioned intent.
Expected interpretationThe bounded fixture resolves only the intended identity, exercises HTTP/YANG resource model, supported methods, encoding, errors and read-back; the protocol is not a generic arbitrary REST API, reaches an unambiguous terminal result, and the independent read-back of the addressed YANG data resource and its persisted/operational representation matches the reviewed intent without unintended extra change.
Recovery boundaryRepair the earliest failing layer in client → HTTP/TLS → RESTCONF resource mapping → YANG validation → datastore mutation → GET read-back; read current target state before any mutating retry.
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Expected Output

Illustrative output — protocol shape only, not a device capture:

HTTP/1.1 200 OK
Content-Type: application/yang-data+json

For this GET, inspect the actual YANG response body and intended interface/resource as well as the status. Exact headers, data and module availability depend on the server. No successful device response was collected.

Output interpretation

Output for Automation → RESTCONF should be structured so another operator can reconstruct selection, decision, execution and final effect. Capture at minimum HTTP method, URI, status, ETag/Last-Modified when available, module/revision, resource path, error-tag/path, response body and read-back body. Add timestamps, attempt numbers, implementation/schema versions and correlation identifiers when available. Report accepted/queued/running/completed/verified as distinct states when the technology is asynchronous; do not map every non-error return to 'success'. For collections or parallel work, retain per-item/per-target results so partial success remains visible. Redact credentials, tokens and sensitive payloads while keeping stable references that allow the authoritative execution record to be retrieved. A summary should state which object was selected, which revision/rule/config made the decision, what mutation or no-op occurred, and what independent read-back showed afterward. For HTTP/YANG resource model, supported methods, encoding, errors and read-back; the protocol is not a generic arbitrary REST API, prefer typed fields and stable IDs over human presentation text. Keep raw protocol/tool errors or durable links to them because normalized summaries can remove the exact error class/path needed for diagnosis. The expected-output contract in this release is semantic documentation, not a claim that a real environment produced a particular sample.

Confirmation

Confirm action

Continue?