QuestionQ50

VerifiedDesigning APIs and Connectivity

Northern Trail Outfitters (NTO) provides an API for managing departments, and every department has a unique deptId. The API was built in RAML following MuleSoft best practices.

What is valid RAML for defining a method that updates the details of one specific department?

Explanation

A RAML resource for an individual department uses a URI template parameter, such as /departments/{deptId}, and the patch method is declared beneath that resource. A query parameter does not identify the resource path, and deptId without braces is a literal URI segment. MuleSoft documentation shows resource paths with URI parameters in curly braces and methods nested under the parameterized resource.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!