Pcornel
Automation · APIs

Query Parameters

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

Back to the Topic

Answer

URL query components used for filtering, sorting, projection, search and pagination without changing the route identity.

Remember

  • Query parameter accepted ≠ filter applied as intended; unknown parameters may be ignored silently.
  • Empty result ≠ no matching data; encoding, authorization, pagination or filter syntax may be wrong.
  • Repeated parameter ≠ one universal meaning; APIs may treat repeats as list, last-value-wins or error.
  • Client-side encoded string ≠ server-decoded value assumed; reserved characters can change interpretation.

First checks

  • curl -sS --get --data-urlencode 'q=name:core' '<api>/v1/items' — encoded query
  • Filtering/sorting parameters — server-side
  • URL encoding of values — correctness

Verify in this order

URL ? key=value → server filters

Where it usually breaks

A syntactically valid query string proves only what was transmitted; server defaults, ignored parameters and authorization can change the returned set.

Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.

Query 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=5303

Confirmation

Confirm action

Continue?