# Query parameters versus URI parameters

*MuleSoft Developer Study Guide · Designing APIs · Last updated October 28, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer/designing-apis/query-parameters-versus-uri-parameters*

When a value belongs in the path as a URI parameter, in the query string as a query parameter, or in a header, how RAML 1.0 declares `uriParameters` and `queryParameters`, which mistakes API Designer flags, and how APIkit strict validation treats undeclared query parameters.

- Certification: Salesforce MuleSoft Developer
- Exam section: Designing APIs
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer

**Official exam objective:**

> Identify when and how to define query parameters vs URI parameters.

## What the exam expects

- Decide whether a value is a URI parameter (it identifies one resource), a query parameter (an optional filter on a list) or a header (credentials such as `client_id` and `client_secret`).
- Declare `uriParameters` on the resource and `queryParameters` under the method in RAML 1.0, with `type`, `required` and `example`.
- Match a request URL to a specification, and spot what API Designer flags: unused URI parameters and URI parameter values containing `/`.
- Reject undeclared query parameters at runtime with APIkit's Query Parameters Strict Validations.
- Key terms: **URI parameter** (a `{name}` placeholder in a resource path, filled with a value); **query parameter** (a name/value pair after `?`); **`uriParameters`** (RAML node on a resource that describes its placeholders); **`queryParameters`** (RAML node on a method that describes its query string); **strict validation** (APIkit setting that accepts only declared query parameters or headers).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Identifier | URI parameter in the path, as in `/flights/{ID}` (required string) | [Master API Calls with REST Clients and MuleSoft](https://trailhead.salesforce.com/content/learn/modules/application-networks-and-api-led-connectivity-in-mulesoft/perform-api-calls) |
| Optional filter | Query parameter, as in `destination` on `GET /flights` | [Master API Calls with REST Clients and MuleSoft](https://trailhead.salesforce.com/content/learn/modules/application-networks-and-api-led-connectivity-in-mulesoft/perform-api-calls) |
| Client credentials | Headers by default and recommended; query parameters pose security risks | [Client ID Enforcement Policy](https://docs.mulesoft.com/mule-gateway/policies-included-client-id-enforcement) |
| `uriParameters` | Declared on the resource whose path holds `{name}` | [Common Problems Found in RAML 1.0 API Specifications](https://docs.mulesoft.com/design-center/design-common-problems-raml-10) |
| `queryParameters` | Declared under the method, with `type`, `required`, `example` | [Building, Implementing, and Testing a REST API](https://docs.mulesoft.com/apikit/latest/apikit-4-implement-rest-api) |
| Unused declared URI parameter | Warning: unused uri parameter | [Common Problems Found in RAML 1.0 API Specifications](https://docs.mulesoft.com/design-center/design-common-problems-raml-10) |
| `/` in a URI parameter value | Error: must not contain '/' character | [Common Problems Found in RAML 1.0 API Specifications](https://docs.mulesoft.com/design-center/design-common-problems-raml-10) |
| Reject undeclared query parameters | `queryParamsStrictValidation="true"` on `apikit:config` | [Validating Query Parameters and Headers](https://docs.mulesoft.com/apikit/latest/validate-4-task) |
| `disableValidations="true"` | Turns off query parameter and header validation to minimize latency | [Validating Query Parameters and Headers](https://docs.mulesoft.com/apikit/latest/validate-4-task) |

## Check yourself

- Why does the API Console's default Mocking Service return a success response even when `client_secret` is missing?
- Which RAML node declares the `id` query parameter in the APIkit tutorial, and is it required?
- Why does an APIkit Router that validates query parameters still not reject a call with a missing credential?
- When the mocking service Try it form takes query parameters, in what form do you enter them?

## Sources

- [Master API Calls with REST Clients and MuleSoft](https://trailhead.salesforce.com/content/learn/modules/application-networks-and-api-led-connectivity-in-mulesoft/perform-api-calls)
- [Examine APIs and Web Services](https://trailhead.salesforce.com/content/learn/modules/application-networks-and-api-led-connectivity-in-mulesoft/examine-apis-and-web-services)
- [Common Problems Found in RAML 1.0 API Specifications](https://docs.mulesoft.com/design-center/design-common-problems-raml-10)
- [Building, Implementing, and Testing a REST API](https://docs.mulesoft.com/apikit/latest/apikit-4-implement-rest-api)
- [Validating Query Parameters and Headers](https://docs.mulesoft.com/apikit/latest/validate-4-task)
- [APIkit for REST Scaffolding Reference](https://docs.mulesoft.com/apikit/latest/apikit-4-scaffolding-reference)
- [Client ID Enforcement Policy](https://docs.mulesoft.com/mule-gateway/policies-included-client-id-enforcement)
- [Simulate API Calls with the Mocking Service](https://docs.mulesoft.com/design-center/design-mocking-service)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 6 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer pack (USD $19): https://www.certifyforce.com/practice-exams
