ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 73 - MCPA - Level 1 discussion

Report
Export

An API client calls one method from an existing API implementation. The API implementation is later updated. What change to the API implementation would require the API client's invocation logic to also be updated?

A.
When the data type of the response is changed for the method called by the API client
Answers
A.
When the data type of the response is changed for the method called by the API client
B.
When a new method is added to the resource used by the API client
Answers
B.
When a new method is added to the resource used by the API client
C.
When a new required field is added to the method called by the API client
Answers
C.
When a new required field is added to the method called by the API client
D.
When a child method is added to the method called by the API client
Answers
D.
When a child method is added to the method called by the API client
Suggested answer: A, B, C, D

Explanation:

Answer: When a new required field is added to the method called by the API client *****************************************

>> Generally, the logic on API clients need to be updated when the API contract breaks.

>> When a new method or a child method is added to an API , the API client does not break as it can still continue to use its existing method. So these two options are out.

>> We are left for two more where "datatype of the response if changed" and "a new required field is added".

>> Changing the datatype of the response does break the API contract. However, the question is insisting on the "invocation" logic and not about the response handling logic. The API client can still invoke the API successfully and receive the response but the response will have a different datatype for some field.

>> Adding a new required field will break the API's invocation contract. When adding a new required field, the API contract breaks the RAML or API spec agreement that the API client/API consumer and API provider has between them. So this requires the API client invocation logic to also be updated.

asked 18/09/2024
Calvin Bolico
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first