Automation · APIs
Path Parameters
Cheat sheet · https://pcornel.dk/topic.php?topic=5304
Answer
Resource identifiers embedded in the URL path and resolved by routing rules before the operation executes.
Remember
- Path value present ≠ resource identity correct; environment, tenant or parent resource may change meaning.
- Encoded slash or reserved character ≠ ordinary identifier data; route decoding can split or reject it.
- Route match ≠ resource exists; routing and data lookup are separate boundaries.
- Human-readable name ≠ stable identifier; rename or case rules can change resolution.
First checks
curl -sS '<api>/v1/sites/<site-id>/devices/<id>'— path parameters- ID vs name usage — stability
- Encoding of path segments — special chars
Verify in this order
URL path segments → resource
Where it usually breaks
A matched route proves only URL routing; it does not prove the path identifier resolves to the intended resource.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Path Parameters API boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Caller / request | Environment/version, identity and exact request contract are attributable | Hidden defaults, wrong endpoint/version, leaked or mismatched credentials |
| Server / response | Status, headers, structured body and request ID are interpreted together | Status-only handling, ignored error body, ambiguous async result or unsafe retry |
| State / proof | Write result is reconciled with resource read-back or acceptance test | Response success treated as final target success without verification |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5304