Pcornel
Automation · RESTCONF

XML

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

Back to the Topic

Answer

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

Remember

  • application/yang-data+xml.
  • Namespaces from YANG modules.
  • Same as NETCONF payloads.

First checks

  • curl ... -H 'Accept: application/yang-data+xml' | xmllint --format - — XML response
  • Namespaces per module — xmlns
  • Same structure as NETCONF content — reuse

Verify in this order

YANG → XML with namespaces

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=5626

Confirmation

Confirm action

Continue?