nerdexam
Cisco

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.

Understanding and Using APIs

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

200-901 question #435 exhibit

Answer Area

Drag items

Y2lsY29zZGFyL3VlY3VlYm9y....Y2lsY29zZGFyL3VlY3VlYm9y....GETY2lsY29zZGFyL3VlY3VlYm9y....DELETEPOST

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.

  1. Identify the 'ACI programmers' Room ID: The first curl command (already complete) queries GET /v1/rooms. Its output clearly shows the 'ACI programmers' room with an id of Y21zY29zcFgyaGV0Lv3Xxx.....
  2. List Memberships for the Room to Find Developer1's Membership ID: The API documentation states that GET https://webexapis.com/v1/memberships lists memberships. To filter by room, a query parameter roomId is used. Thus, the second curl command's HTTP method (the first empty box) should be GET, and the roomId parameter (the second empty box) should be Y21zY29zcFgyaGV0Lv3Xxx..... The output of this command, when filled correctly, shows that 'Developer1' has a membershipId of Y21zY29zcFgyaGV0Lv3wwww.....
  3. Delete Developer1's Membership: The API documentation states that DELETE https://webexapis.com/v1/memberships/{membershipId} deletes a specific membership. Therefore, the third curl command's HTTP method (the third empty box) should be DELETE, and the membershipId in the URL path (the fourth empty box) should be Y21zY29zcFgyaGV0Lv3wwww.....

Following these steps, the correct sequence of drag-and-drop actions is:

  • Drag GET to the first empty box (HTTP method for listing memberships).
  • Drag Y21zY29zcFgyaGV0Lv3Xxx.... to the second empty box (roomId for listing memberships).
  • Drag DELETE to the third empty box (HTTP method for deleting a membership).
  • Drag Y21zY29zcFgyaGV0Lv3wwww.... to the fourth empty box (membershipId for 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 POST instead of GET for listing memberships: POST is used for creating new resources, not for retrieving existing ones.
  • Using GET instead of DELETE for removing a membership: GET is for retrieval, DELETE is for removing a resource.
  • Using personId (e.g., Y21zY29zcFgyaGV0Lv3Vyyy....) instead of membershipId (e.g., Y21zY29zcFgyaGV0Lv3wwww....) for the delete operation: The API documentation clearly shows that DELETE /memberships/{membershipId} requires the specific membership ID, not the ID of the person. A personId identifies a user, while a membershipId identifies 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: The roomId identifies 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

#ACI API#REST API#DELETE Operation#API Automation

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice