Change certified API to use the v2 API endpoints #13827
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Done
This change updates the certified component to use the new public v2 API our team has already created, instead of the old v1 API. For the v2 API we are using a new REST API framework, which allows us to make the new endpoints significantly more flexible and modular. After finishing all migrations from the old v1 API and ensuring no external users make use of them, we will start with the deprecation of these endpoints.
API client change
As part of this change, we are also slightly modifying the terminology used in the API endpoints. Namely, we are starting to deprecate the use of the
model
keyword in the endpoints, replacing it withconfiguration
which is what the Certification team currently uses in the business works. Similarly, themake
keyword is replaced with thevendor
keyword, as this is what reflects the data represented in this field. To minimize the effect of the migration of the API endpoints, we tried to keep the endpoints as backwards-compatible as possible and decided to not change the response structure.The following seven APIs have been updated and replaces with v2:
Backend views change
Some of the views are slightly modified to reflect for the new response structure of the APIs. Few common changes appearing in the views:
count
field, instead ofmeta.total_count
field in the v1 APIresults
field, instead of theobjects
in the v1 APIpagination=limitoffset
query parameter, which is put in use in the api client.QA
Issue / Card
This change fixes C3-614
Screenshots
The design of the website hasn't changed.
Help
QA steps - Commit guidelines