MULESOFT-DEVELOPER-I practice question 17 of 30
What should this endpoint return? http://dev.acme.com/api/patients?name=John&surname=Bell
Full set: 235 questionsThe URL http://dev.acme.com/api/patients?name=John&surname=Bell is making a GET request to the /api/patients endpoint with two query parameters: name=John and surname=Bell. In standard REST API conventions, multiple query parameters separated by an ampersand (&) are treated as a conjunctive filter, meaning an "AND" condition. The API should interpret this request as a search for patients where the name attribute is "John" AND the surname attribute is "Bell".
A. This is incorrect as it only considers the name parameter and ignores the surname parameter provided in the request.
B. This is incorrect as it only considers the surname parameter and ignores the name parameter.
C. This implies a disjunctive ("OR") condition. The & separator in a URL query string universally signifies an "AND" condition for filtering resources.
1. MuleSoft Documentation, "HTTP Listener Connector". In the "Accessing Query Parameters" section, it shows that query parameters are available in the attributes.queryParams object. A Mule flow would typically use these multiple parameters to build a combined filter (e.g., in a database WHERE clause like WHERE name = :name AND surname = :surname).
2. IETF, "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax", Section 3.4. The standard defines the query component of a URI, where & is a common, though not formally standardized, delimiter for key-value pairs that represent a set of conditions. The conventional implementation in web frameworks and APIs is to treat them as AND conditions.
Keep practicing
Take the free MULESOFT-DEVELOPER-I practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other MULESOFT-DEVELOPER-I practice questions
- Question 1How many Mule applications can run on a CloudHub worker?
- Question 4What does C4E stands for in MuleSoft recommended IT operating model?
- Question 15A flow needs to combine and return data from two different data sources. It contains a Da…
- Question 16What of the below is not a feature of API Notebooks?
- Question 18An API has been created in Design Center. What is the next step to make the API discovera…
- Question 21Mule application contains ActiveMQ JMS dependency. Mule application was compiled and run …
