Complete the code to specify the version in the URL path.
GET /api/[1]/usersThe common practice is to include the version as 'v1' in the URL path.
Complete the code to specify the version using a custom header.
GET /users
Headers: Accept: application/json; [1]=v2The 'api-version' header is commonly used to specify API version in headers.
Fix the error in the versioning query parameter.
GET /users?[1]=1
The query parameter 'version' is the most clear and widely used for versioning.
Fill both blanks to complete the header-based versioning example.
GET /users Headers: [1]: application/json Headers: [2]: v3
The 'Accept' header specifies the media type, and 'api-version' specifies the API version.
Fill all three blanks to complete the versioning strategy using media type versioning.
GET /users Headers: Accept: application/vnd.myapp.[1]+json Response Content-Type: application/vnd.myapp.[2]+json API version used: [3]
Media type versioning uses the version in the Accept header and Content-Type. Both should match the version used.
