ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 234 - MCD - Level 1 discussion

Report
Export

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)

A.
Option A
Answers
A.
Option A
B.
Option B
Answers
B.
Option B
C.
Option C
Answers
C.
Option C
D.
Option D
Answers
D.
Option D
Suggested answer: C

Explanation:

Lets revise few concepts RAML which can help us to find the answer of this question.

URI Parameters

Lets have a look at below example.

/foos:

/{id}:

/name/{name}:

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 thebaseUrideclaration. The added lines represent the resources/foos/{id}and/foos/name/{name}.

Query Parameters

Now we'll define a way to query thefooscollection using query parameters. Note that query parameters are defined using the same syntax that we used above for data types:

/foos:

get:

description: List all Foos matching query criteria, if provided;

otherwise list all Foos

queryParameters:

name?: string

ownerName?: string

Based on the above information , below is the only option which definesstoreidas uri parameter anddepartmentas query parameter.

/{storeId}:

get:

queryParameter:

department:

asked 18/09/2024
Rehan r
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first