REST API Authorization
Cheat sheet · https://pcornel.dk/topic.php?topic=1549
Answer
Authorization controls the requested API operation and target data/resource after identity is established.
Remember
A username privilege label or permission on one YANG representation does not prove all equivalent representations are restricted.
First checks
Call an operation the identity should be allowed → 200 or 204. Call one it should not be allowed → 403. Read the role or scope assigned to the identity; on IOS XE, RESTCONF users need privilege 15 unless access-control rules grant less.
Verify in this order
identity known → role or scope looked up → operation and target resource checked → 403 when not allowed → per-object check where it applies → decision logged
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1549