フリー問題

Salesforce Certified MuleSoft Developer のフリー問題 7 / 20 問目

問題文

A support API already exposes /tickets. The team now needs an operation that creates a new comment underneath an existing ticket. Which method and resource combination follows REST conventions?

選択肢

  1. PATCH to /tickets/{ticketId} with the comment text in the body, because adding a comment changes the ticket and PATCH expresses a partial change to an existing resource without requiring a new resource to be defined.
  2. POST to /tickets/{ticketId}/comments, because the comment is a new subordinate resource created under a known ticket.
  3. PUT to /tickets/{ticketId}/comments, because PUT is the method used for writes, and creating a comment writes data into the collection.
  4. POST to /comments with the ticket number as a query parameter.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。