200-901 · Question #435
Drag and Drop Question Refer to the exhibit. Drag and drop the code from the bottom onto the box where the code is missing to delete Developer1 from the ACI programmers' meeting room. Not all…
The correct answer is DELETE; Y2lsY29zZGFyL3VlY3VlYm9y. This question assesses the ability to interpret REST API documentation and apply the correct HTTP methods and resource identifiers to list and delete a specific membership using curl commands.
Question
Drag and Drop Question Refer to the exhibit. Drag and drop the code from the bottom onto the box where the code is missing to delete Developer1 from the ACI programmers' meeting room. Not all options are used. Answer:
Exhibit
Answer Area
Drag items
Correct arrangement
- DELETE
- Y2lsY29zZGFyL3VlY3VlYm9y....
Explanation
This question assesses the ability to interpret REST API documentation and apply the correct HTTP methods and resource identifiers to list and delete a specific membership using curl commands.
Approach. The objective is to delete Developer1's membership from the 'ACI programmers' meeting room.
- Identify the 'ACI programmers' Room ID: The first
curlcommand (already complete) queriesGET /v1/rooms. Its output clearly shows the 'ACI programmers' room with anidofY21zY29zcFgyaGV0Lv3Xxx..... - List Memberships for the Room to Find Developer1's Membership ID: The API documentation states that
GET https://webexapis.com/v1/membershipslists memberships. To filter by room, a query parameterroomIdis used. Thus, the secondcurlcommand's HTTP method (the first empty box) should beGET, and theroomIdparameter (the second empty box) should beY21zY29zcFgyaGV0Lv3Xxx..... The output of this command, when filled correctly, shows that 'Developer1' has amembershipIdofY21zY29zcFgyaGV0Lv3wwww..... - Delete Developer1's Membership: The API documentation states that
DELETE https://webexapis.com/v1/memberships/{membershipId}deletes a specific membership. Therefore, the thirdcurlcommand's HTTP method (the third empty box) should beDELETE, and themembershipIdin the URL path (the fourth empty box) should beY21zY29zcFgyaGV0Lv3wwww.....
Following these steps, the correct sequence of drag-and-drop actions is:
- Drag
GETto the first empty box (HTTP method for listing memberships). - Drag
Y21zY29zcFgyaGV0Lv3Xxx....to the second empty box (roomIdfor listing memberships). - Drag
DELETEto the third empty box (HTTP method for deleting a membership). - Drag
Y21zY29zcFgyaGV0Lv3wwww....to the fourth empty box (membershipIdfor deleting Developer1).
Common mistakes.
- common_mistake. Common mistakes include misinterpreting the HTTP methods or using the wrong type of ID for the specified API endpoint. For instance:
- Using
POSTinstead ofGETfor listing memberships:POSTis used for creating new resources, not for retrieving existing ones. - Using
GETinstead ofDELETEfor removing a membership:GETis for retrieval,DELETEis for removing a resource. - Using
personId(e.g.,Y21zY29zcFgyaGV0Lv3Vyyy....) instead ofmembershipId(e.g.,Y21zY29zcFgyaGV0Lv3wwww....) for the delete operation: The API documentation clearly shows thatDELETE /memberships/{membershipId}requires the specific membership ID, not the ID of the person. ApersonIdidentifies a user, while amembershipIdidentifies a user's specific association with a room. Deleting a person is different from deleting a person's membership in a particular room. - Using
roomId(e.g.,Y21zY29zcFgyaGV0Lv3Xxx....) for the delete operation: TheroomIdidentifies the room itself, not a specific membership within it that needs to be deleted via the/memberships/{membershipId}endpoint.
Concept tested. This question tests fundamental concepts of RESTful API design and interaction, including understanding HTTP methods (GET for retrieval, DELETE for removal), proper interpretation of API endpoint paths and query parameters, differentiating between various resource identifiers (e.g., roomId, personId, membershipId), and tracing information through API responses to complete a multi-step operation.
Topics
Community Discussion
No community discussion yet for this question.
