Pcornel
Automation · RESTCONF

POST

Cheat sheet · https://pcornel.dk/topic.php?topic=5621

Back to the Topic

Answer

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

Remember

  • POST creates a child resource.
  • Fails if it already exists.
  • Also invokes operations.

First checks

  • 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

Verify in this order

POST parent + child payload → created

Where it usually breaks

Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5621

Confirmation

Confirm action

Continue?