Pcornel
Automation · APIs

Path Parameters

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

Back to the Topic

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

BoundaryHealthy evidenceSuspicious evidence
Caller / requestEnvironment/version, identity and exact request contract are attributableHidden defaults, wrong endpoint/version, leaked or mismatched credentials
Server / responseStatus, headers, structured body and request ID are interpreted togetherStatus-only handling, ignored error body, ambiguous async result or unsafe retry
State / proofWrite result is reconciled with resource read-back or acceptance testResponse success treated as final target success without verification
TroubleshootingFirst failed boundary is preserved, changed minimally and retestedBlind 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

Confirmation

Confirm action

Continue?