300-920 · Question #56
Drag and Drop Question Refer to the exhibit. Drag and drop the code on the snippet to add the user with email "[email protected]" as moderator of the space with the identifier "987654321". Answer:
The correct answer is POST; memberships; roomId; personEmail; true. This question tests the ability to construct a curl command for a REST API call by correctly interpreting API documentation and dragging the appropriate method, endpoint, and JSON body parameters.
Question
Exhibit
Answer Area
Drag items
Correct arrangement
- POST
- memberships
- roomId
- personEmail
- true
Explanation
This question tests the ability to construct a curl command for a REST API call by correctly interpreting API documentation and dragging the appropriate method, endpoint, and JSON body parameters.
Approach. To correctly fill the blanks, the test-taker must cross-reference the curl command structure with the API documentation and the question's requirements.
curl -X [blank]: The API documentation states the method isPOST. Therefore, 'POST' should be dragged to this blank.https://api.ciscospark.com/v1/[blank]: The API documentation shows the endpoint path is/v1/memberships. Therefore, 'memberships' should be dragged to this blank.-data-raw '{" [blank] ": "987654321", ...: The question specifies adding a user to a 'space with the identifier "987654321"'. The API documentation listsroomIdas the parameter for the room ID. Therefore, 'roomId' should be dragged to this blank.... "[blank]": "[email protected]", ...: The question specifies adding the user with email "[email protected]". The API documentation listspersonEmailas the parameter for the email address. Therefore, 'personEmail' should be dragged to this blank.... "isModerator": [blank] }': The question specifies adding the user "as moderator". The API documentation showsisModeratoris a boolean. To make the user a moderator, its value must betrue. Therefore, 'true' should be dragged to this blank.
Common mistakes.
- common_mistake. Common mistakes include misplacing the HTTP method (
POST) or the endpoint resource (memberships) in the wrong blanks, not understanding the JSON structure for the request body, or incorrectly assigning values to the parameters. For instance, putting 'personEmail' where 'roomId' should be, or vice-versa, or forgetting that the question requires the user to be a moderator and thus providing a value other than 'true' forisModerator(e.g., omitting it or setting it to false if such options were available). Another mistake would be to confusepersonIDwithpersonEmailifpersonIDwas a draggable option, which it is not in this specific question but is a common conceptual error.
Concept tested. Understanding and constructing RESTful API calls using the curl command-line tool, interpreting API documentation (HTTP methods, endpoints, request body parameters, and data types), and formulating JSON payloads for API requests.
Topics
Community Discussion
No community discussion yet for this question.
