MCD-LEVEL-1 · Question #211
A shopping API contains a method to look up store details by department To get information for a particular store, web clients will submit requests with a query parameter named department and a URI…
The correct answer is C. Option C. 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
A shopping API contains a method to look up store details by department To get information for a particular store, web clients will submit requests with a query parameter named department and a URI parameter named storeld. What is a valid RAML snippet that supports requests from web clients to get data for a specific storeld and department name? A) B) C) D)
Options
- AOption A
- BOption B
- COption C
- DOption D
How the community answered
(42 responses)- A5% (2)
- B17% (7)
- C71% (30)
- D7% (3)
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.