MULESOFT-PLATFORM-ARCHITECT-I practice question 8 of 25

An API implementation is updated. When must the RAML definition of the API also be updated?

Full set: 152 questions

Domain Delivering and Managing APIs

Answer options
A: When the API implementation changes the structure of the request or response messages Correct answer
B: When the API implementation changes from interacting with a legacy backend system deployed on-premises to a modern, cloud-based (SaaS) system
C: When the API implementation is migrated from an older to a newer version of the Mule runtime
D: When the API implementation is optimized to improve its average response time
Correct Answer:
A. When the API implementation changes the structure of the request or response messages
Explanation

The RAML definition is the API's contract, specifying its interface for consumers. This contract includes resource paths, methods, and the precise structure of request and response messages (e.g., headers, query parameters, and body schemas). When the implementation changes the structure of these messages, it alters the contract. To ensure consumers are aware of the new contract and to prevent breaking their applications, the RAML definition must be updated. Changes internal to the implementation, such as the backend system, runtime version, or performance optimizations, do not affect the external contract and thus do not require a RAML update.

Why Incorrect

B: Changing the backend system is an implementation detail that should be abstracted from the API consumer; the contract remains unchanged. C: Migrating the Mule runtime is a platform-level change that does not alter the API's defined interface or message structures. D: Performance optimization is a non-functional, internal improvement that does not change the API's contract with its consumers.

References

1. MuleSoft Documentation, "About API specifications": "An API specification is a document that describes what an API does, how the API performs, and what results to expect when using the API. The specification defines the resources, methods, parameters, and responses that the API supports. This specification is the contract between the API provider and the API consumer." This establishes that the specification (RAML) is the contract.

Source: MuleSoft Docs > Anypoint Platform > API Manager > "About API specifications".

2. MuleSoft Documentation, "API-Led Connectivity": "The core principle of API-led connectivity is that each API is designed to play a specific role... This approach defines what each API should expose and abstracts away the details of the underlying system." This supports the idea that changes to the underlying system (like in option B) are implementation details that should not affect the API's exposed contract.

Source: MuleSoft Docs > "Fundamental Concepts" > "API-Led Connectivity".

3. MuleSoft Whitepaper, "The Symphony of API-led Connectivity": "The interface is separated from the implementation, allowing them to be changed independently. As long as the interface remains consistent, the implementation of the application can be changed... without impacting the consumer." This directly refutes options B, C, and D, while reinforcing that a change to the interface (message structure, as in option A) is the event that requires a contract update.

Source: MuleSoft Whitepaper, "The Symphony of API-led Connectivity", Page 5, "Decoupling".

Scroll to Top