Your company provides a recommendation engine for retail customers. You are providing retail customers with an API where they can submit a user ID and the API returns a list of recommendations for that user. You are responsible for the API lifecycle and want to ensure stability for your customers in case the API makes backward-incompatible changes. You want to follow Google-recommended practices. What should you do?
A. Create a distribution list of all customers to inform them of an upcoming backward-incompatible change at least once a month before replacing the old API with the new API.
B. Create an automated process to generate API documentation, and update the public API documentation as part of the CI/CD process when deploying an update to the API.
C. Use a versioning strategy for the APIs that increases the version number on every backward-incompatible change.
D. Use a versioning strategy for the APIs that adds the suffix to the current API version number on every backward-incompatible change. Use the current version number for the new API.
Disclaimer
This is a practice question. There is no guarantee of coming this question in the certification exam.
Answer
C
Explanation
A. Create a distribution list of all customers to inform them of an upcoming backward-incompatible change at least once a month before replacing the old API with the new API.
(Increased operational overhead, and doesn’t follow best practice.)
B. Create an automated process to generate API documentation, and update the public API documentation as part of the CI/CD process when deploying an update to the API.
(This will not help in backward-incompatible changes.)
C. Use a versioning strategy for the APIs that increases the version number on every backward-incompatible change.
(https://cloud.google.com/apis/design/versioning
All Google API interfaces must provide a major version number, which is encoded at the end of the protobuf package, and included as the first part of the URI path for REST APIs. If an API introduces a breaking change, such as removing or renaming a field, it must increment its API version number to ensure that existing user code does not suddenly break.)
D. Use a versioning strategy for the APIs that adds the suffix to the current API version number on every backward-incompatible change. Use the current version number for the new API.
(Ruled out.)