MCD-LEVEL-1 · Question #196
A shopping API contains a method to look up store details by department. To get the information for a particular store, web clients will submit requests with a query parameter named department and…
The correct answer is D. 1. /{storeId}: 2. get: 3. queryParameter: 4. department. Lets revise few concepts RAML which can help us to find the answer of this question. Lets have a look at below example. Here, the braces { } around property names define URI parameters. They represent placeholders in each URI and do not reference root-level RAML file properties…
Question
Options
- A
- /department: 2. get: 3. uriParameter: 4. storeId:
- B
- get: 2. uriParameter: 3. {storeId}: 4. queryParameter: 5. department:
- C
- get: 2. queryParameter: 3. department: 4. uriParameter: 5. {storeId}:
- D
- /{storeId}: 2. get: 3. queryParameter: 4. department:
How the community answered
(46 responses)- A11% (5)
- B2% (1)
- C4% (2)
- D83% (38)
Explanation
Lets revise few concepts RAML which can help us to find the answer of this question. Lets have a look at below example. Here, the braces { } around property names define URI parameters. They represent placeholders in each URI and do not reference root-level RAML file properties as we saw above in the baseUri declaration. The added lines represent the resources /foos/{id} and /foos/name/{name}. Query Parameters Now we'll define a way to query the foos collection using query parameters. Note that query parameters are defined using the same syntax that we used above for data types: description: List all Foos matching query criteria, if provided; otherwise list all Foos queryParameters: ownerName?: string Based on the above information , below is the only option which defines storeid as uri parameter and department as query parameter.
Topics
Community Discussion
No community discussion yet for this question.