MCPA-LEVEL-1 practice question 8 of 15

The implementation of a Process API must change. What is a valid approach that minimizes the impact of this change on API clients?

Full set: 95 questions
Answer options
A: Update the RAML definition of the current Process API and notify API client developers by sending them links to the updated RAML definition
B: Postpone changes until API consumers acknowledge they are ready to migrate to a new Process API or API version
C: Implement required changes to the Process API implementation so that whenever possible, the Process API's RAML definition remains unchanged Correct answer
D: Implement the Process API changes in a new API implementation, and have the old API implementation return an HTTP status code 301 - Moved Permanently to inform API clients they should be calling the new API implementation
Correct Answer:
C. Implement required changes to the Process API implementation so that whenever possible, the Process API's RAML definition remains unchanged
Explanation

The core principle of contract-first API design, central to MuleSoft's API-led connectivity, is the decoupling of the API's interface (the contract, defined in RAML) from its backend implementation. By changing only the implementation while keeping the RAML definition stable, the contract with the API clients remains unbroken. This ensures that consuming applications are not impacted by backend logic or orchestration changes, as the endpoints, request/response structures, and data types they rely on do not change. This approach directly achieves the goal of minimizing impact on API clients and promotes agility.

Why Incorrect

A. Updating the RAML definition changes the API's contract. This forces all API clients to update their code to conform to the new contract, which maximizes, rather than minimizes, the impact.
B. This is a logistical and business strategy, not a technical one. It is often impractical to get universal acknowledgment from all consumers and can lead to indefinite delays for necessary changes.
D. Using an HTTP 301 redirect forces clients to change the endpoint they are calling. Not all HTTP clients handle redirects automatically, especially for methods other than GET, thus requiring code changes and creating impact.

References

1. MuleSoft Documentation, "Manage an API Version": In the section discussing non-breaking changes, the documentation states, "You can make some changes to an API without creating a new version. For example, you can change the implementation of an API without changing its contract." This directly supports the principle of changing the implementation behind a stable contract.

Source: MuleSoft Docs > API Manager > API Versioning > Manage an API Version.

2. MuleSoft Whitepaper, "API-led connectivity": This foundational paper explains how APIs abstract complexity. It states, "Process APIs... provide a means of composing data and orchestrating multiple System APIs... without being tightly coupled to the source systems from which the data is being obtained." This decoupling allows the orchestration (implementation) to change without affecting the consumers that rely on the Process API's stable contract.

Source: MuleSoft "API-led connectivity" Whitepaper, Page 6, "The three layers of API-led connectivity".

3. MuleSoft Training Material, "Anypoint Platform Development: Fundamentals": The course emphasizes that an API specification (RAML/OAS) is a contract between the API provider and its consumers. A key benefit highlighted is that the implementation can be modified or even completely replaced as long as it continues to adhere to the published contract, ensuring no disruption to consumers.

Source: Anypoint Platform Development: Fundamentals (Mule 4) Student Manual, Module 2: "Designing APIs".

Scroll to Top