Domain 2 of 12 · 8% of the official blueprint

Designing APIs practice lesson

Design resource-oriented order operations with defensible HTTP methods, parameters and responses.

What the published objective requires

  • Select REST methods and resource paths
  • Place identifiers, filters and controls in the correct parameter location
  • Define responses that communicate the operation outcome

The misconception to eliminate

Encoding verbs in URLs—/getOrder or /createCustomer—then ignoring HTTP semantics.

Practice allocation: 5 of 60 questions in our whole-question mock blueprint.

Decision rules

Retrieve these without looking before attempting the question.

Rule 1

Nouns identify resources; HTTP methods express the operation.

Rule 2

Path parameters identify a resource or required hierarchy; query parameters filter, sort or paginate a collection.

Rule 3

GET is safe; PUT and DELETE are idempotent by definition; POST is not automatically idempotent.

Rule 4

Use 201 plus Location for creation, 204 for a successful response with no representation, and 4xx for client-correctable failures.

Worked Northstar scenario

Scenario

A client creates an order, then retrieves only orders created after a timestamp.

Reasoning

Use POST /orders and return 201 with Location: /orders/{id}. Use GET /orders?createdAfter=... for the optional collection filter.

Free practice question

Which request retrieves page 3 of the orders collection without inventing a new resource?

  1. GET /orders/page/3
  2. GET /orders?page=3
  3. POST /orders/getPage
  4. PATCH /orders?page=3
Reveal answer and reasoning

Answer: B. Pagination is a view over a collection and belongs in query parameters.

The complete program contains five guided drills for this domain, an 80% mastery gate, saved progress and a separate 60-question timed mock.

Get Domain Mastery

Hands-on proof preview

Write the order contract

Specify the smallest coherent contract for order creation and retrieval.

  1. Define /orders and /orders/{orderId} resources.
  2. Assign POST, GET and PATCH without action words in paths.
  3. Add createdAfter and limit as query parameters.
  4. Verify that every success and client failure has a deliberate status code.

Evidence to keep: A RAML or OAS fragment with two resources, three methods and explicit 201, 400, 404 and 409 responses.

Primary sources

Questions about this domain

How much of the MuleSoft Developer exam is Designing APIs?

Salesforce publishes a weight of 8% for this domain. In a 60-question practice allocation, that is represented here by 5 questions.

Is this Designing APIs question from the real exam?

No. It is original independent practice material written only from public exam objectives and product documentation.