Use this when creating new resources or calling RPCs via RESTCONF.
POST · RESTCONF
RESTCONF POST creates a new child resource under the target URI or invokes an RPC operation, failing if the resource already exists.
1. POST creates a child resource under the target.
2. Fails if it exists (409).
3. Use for creating list entries.
4. Payload is the child node.
5. Also invokes operations (/restconf/operations).
POST parent + child payload → created
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 Verification path Verify boundary
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 create/invoke semantics, server-assigned identity/location, duplicate submission behavior and reading the created resource back.
Step 2 Common mistakes Narrow the fault
- Using POST to update existing data (409 conflict).
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.
- POST creates a child resource.
- Fails if it already exists.
- Also invokes operations.
curl -s --cacert ca.pem -u <u>:<p> -X POST -H 'Content-Type: application/yang-data+json' -d @new-entry.json https://<dev>/restconf/data/<parent-path>— create child- 409 if exists — conflict
- 201 Created — success
ReferenceWhy it matters1 section · depth on demand
What it is
POST creates a child resource (fails if it exists) or invokes an RPC/action.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
A RESTCONF POST creates a new child resource under the target URL. It fails with 409 Conflict if the resource already exists, which makes it a "create only" operation.
curl -s -u admin:pass -X POST \
-H 'Content-Type: application/yang-data+json' -H 'Accept: application/yang-data+json' \
https://10.0.0.1/restconf/data/Cisco-IOS-XE-native:native/interface \
-d '{"Cisco-IOS-XE-native:Loopback": {"name": 100, "description": "automation test"}}'
A successful POST returns 201 Created with a Location header. Because POST is not idempotent, automation that may run twice should use PUT (create or replace) or check existence first.
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 > POST. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc8040 · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For create/invoke semantics, server-assigned identity/location, duplicate submission behavior and reading the created resource back, prefer typed fields and stable IDs over human presentation text.