Use it when configuring, checking or troubleshooting Path Parameters in APIs.
Path Parameters
Resource identifiers embedded in the URL path and resolved by routing rules before the operation executes.
1. Path parameters identify resources.
2. Prefer stable IDs over names.
3. Encode special characters.
4. Validate IDs before calls.
5. Handle 404.
URL path segments → resource
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
resource identity → path segment encoding → route match → resource lookup → operation → canonical ID/read-back
Healthy evidence: stable identifiers are used, segments are encoded correctly and route/resource lookup failures remain distinguishable.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: raw interpolation, ambiguous names, tenant context omitted or route mismatch diagnosed as missing data.
A matched route shows only URL routing, but it does not show the path identifier resolves to the intended resource.
Step 3 Common mistakes Narrow the fault
- Hard-coding IDs that differ between environments.
- Forgetting the trailing slash some APIs require.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- 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.
curl -sS '<api>/v1/sites/<site-id>/devices/<id>'— path parameters- ID vs name usage — stability
- Encoding of path segments — special chars
ReferenceWhat it is1 section · depth on demand
Core model
Resource identifiers embedded in the URL path and resolved by routing rules before the operation executes.
ReferenceWhy it matters1 section · depth on demand
What it is
Path parameters identify a specific resource in the URL: /api/dcim/devices/42/. Look up the ID first instead of guessing it.
ReferenceImportant terms & boundaries3 sections · depth on demand
What this shows and what it does not
A matched route shows only URL routing, but it does not show the path identifier resolves to the intended resource.
In depth
Path parameters identify a specific resource inside the URL path, such as the device ID in /api/dcim/devices/42/ or the interface name in RESTCONF. They differ from query parameters, which filter or modify a request.
GET /api/dcim/devices/{id}/
PATCH /api/ipam/prefixes/{id}/
GET /restconf/data/ietf-interfaces:interfaces/interface={name}
from urllib.parse import quote
name = "GigabitEthernet1/0/1"
url = f"{base}/restconf/data/ietf-interfaces:interfaces/interface={quote(name, safe='')}"
Encode path parameters — slashes, spaces and special characters in names otherwise change the path. Many APIs use numeric IDs in paths; look up the ID by name first (query parameter) and then address the resource by ID.
Example
GET /api/dcim/devices/?name=sw01 -> id 42
PATCH /api/dcim/devices/42/
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in APIs > Path Parameters. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc9110 · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Path Parameters API boundary map
Fast request/delivery, trust, processing and verification boundaries for Path Parameters.
| 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 |