Use it when configuring, checking or troubleshooting REST in APIs.
REST
Resource-oriented HTTP API design using standard method semantics, representations and stateless request context.
1. REST: resources identified by URLs, manipulated with HTTP methods, stateless requests.
2. JSON representations.
3. Use proper status codes.
4. HATEOAS rarely used in practice.
5. Consistent naming.
resource URL + method → representation
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 → URI/version → method semantics → representation → stateless request context → response → resource read-back
Healthy evidence: resource identity, method semantics, representations and status behavior are consistent across calls and environments.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: RPC-style side effects hidden behind GET, inconsistent identifiers, undocumented session dependence or response semantics that vary by endpoint.
A resource-style URL shows only naming; REST behavior depends on the interaction semantics and documented contract.
Step 3 Common mistakes Narrow the fault
- Using verbs in URLs (
/getDevices) instead of resources and methods. - Returning 200 with an error message in the body.
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.
- HTTP API ≠ REST automatically; an API can use HTTP while ignoring resource and method semantics.
- REST statelessness ≠ no server-side state; it means each request carries the context needed for that interaction.
- Resource URI ≠ database row; resources are interface abstractions and may aggregate or compute state.
- RESTful naming ≠ correct behavior; cache, idempotency, status and representation semantics still matter.
curl -sS https://<api>/v1/devices | jq '.[0]'— resource collectioncurl -sS https://<api>/v1/devices/<id>— single resource- Resource naming (nouns, plural) — design
ReferenceWhat it is1 section · depth on demand
Core model
Resource-oriented HTTP API design using standard method semantics, representations and stateless request context.
ReferenceWhy it matters1 section · depth on demand
In depth
REST is an architectural style for web APIs: resources are identified by URLs, manipulated with standard HTTP methods, and represented as JSON (sometimes XML). Each request carries everything the server needs (stateless), which makes REST APIs simple to call from any language and easy to cache and scale.
| REST idea | In practice |
|---|---|
| Resource | /api/dcim/devices/42/ |
| Collection | /api/dcim/devices/ |
| Method = action | GET read, POST create, PUT/PATCH update, DELETE remove |
| Status code = outcome | 200, 201, 204, 400, 401, 404, 409, 429 |
| Representation | JSON body |
curl -s -H "Authorization: Token $NB_TOKEN" -H 'Accept: application/json' \
'https://netbox.example.com/api/dcim/devices/?site=oslo&limit=5' | jq '.results[].name'
Most network platforms — NetBox, Catalyst Center, Meraki, SD-WAN Manager, cloud providers — expose REST APIs, so the same skills transfer across all of them.
ReferenceImportant terms & boundaries1 section · depth on demand
What this shows and what it does not
A resource-style URL shows only naming; REST behavior depends on the interaction semantics and documented contract.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: API token in the API_TOKEN environment variable.
curl -sS \
-H "Authorization: Bearer $API_TOKEN" \
-H "Accept: application/json" \
"https://api.example.com/v1/devices?limit=50&cursor=$CURSOR"Expected output
curl -sS -o /dev/null -w "%{http_code} %{content_type}\n" -H "Authorization: Bearer $API_TOKEN" https://api.example.com/v1/devices?limit=1Expected state: The API answers 200 with a JSON content type.
200 application/json; charset=utf-8401 means the token is missing or invalid, 403 that it lacks permission, 429 that you are rate limited. Follow the next cursor until it is empty to read the full collection. Illustrative authored output: field layout matches the tool, values will differ in your environment.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
REST API boundary map
Fast request/delivery, trust, processing and verification boundaries for REST.
| 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 |