Complete the code to specify the API version in the URL path.
GET /api/[1]/usersThe standard way to version REST APIs is to include the version in the URL path, such as /api/v1/.
Complete the code to specify the API version using a custom HTTP header.
X-API-Version: [1]When using headers for versioning, a short version string like v1 is common and clear.
Fix the error in the versioning strategy by choosing the correct versioning method.
API versioning is done by [1] the API endpoint URL.Embedding the version in the URL is a clear and scalable way to version APIs.
Fill both blanks to complete the API versioning strategy using query parameters.
GET /users?[1]=[2]
Using a query parameter like version=1 is a common way to version APIs via query strings.
Fill all three blanks to complete the code for content negotiation versioning using the Accept header.
Accept: application/[1].v[2]+[3]
Content negotiation uses the Accept header with media types like application/json.v2+jsonapi to specify version and format.