BETA

Skip links

  • Skip to primary navigation
  • Skip to content
  • Skip to footer
Queensland government logo Queensland government logo
Sign in Sign out
Sign in
  • Profile summary
  • Sign out
Department of Education Department of Education Developer Portal
  • Home
  • Tags
  • Chat
  • New
    APIs
  • Help
  • Contact us
  • Dark mode
  • Home
  • Tags
  • Chat
  • New
    APIs
  • Help
  • Contact us
  • My profile
  • Dark mode

API versioning

Jeny Amatya Government Popular Admin
by Jeny Amatya
30 January 2024
Last updated 30 May 2025
API
API

What is API versioning?

API versioning is the process of managing and tracking changes to an API. It involves communicating those changes to the API’s consumers.

What are the benefits of API versioning?

API versioning enables the API producers to iterate in a way that minimises breaking changes to the consumers and also provides a framework to communicate these changes effectively to consumers. This transparent strategy builds trust and then strengthens an organisation’s reputation, hence boosting the API’s adoption and retention rates.

When should you version an API?

One should version the API whenever there is a ‘breaking change’. A breaking change is the type of change that will require the consumers to modify their codebase in order to continue using the API. Some of these can involve changes to an API’s input and output data structures, success and error feedback and security mechanisms. Some common examples of breaking changes are:

  • Renaming a property or endpoint
  • Turning an optional parameter into a required parameter
  • Modifying a data format or type
  • Modifying a property’s characteristics

What are some types of API versioning?

  • URL versioning
    • The version number is included in the URL of the API endpoint.
    • Example: https://test-api.com/v1/items
  • Query parameter versioning
    • The version number is included as a query parameter in the API request.
    • Example: https://test-api.com/items?version=v1
  • Header versioning
    • The version number is passed as a header in the API request, which decouples the API version from the URL structure.
  • Consumer-based versioning
    • The consumer chooses the appropriate version based on their needs. The version that exists at the time of the consumer’s first call is stored with the consumer’s information. Every future call is then executed against the same version, unless the consumer explicitly modifies the configuration.

How do you version an API?

  1. Choose a versioning strategy
  2. Confirm if the new version is necessary
  3. Update the API documentation
  4. Gradually deploy the new version
  5. Deprecate the old version

What are some best practices for API versioning?

  • Design with extensibility in mind
  • Know your consumers
  • Include a versioning policy in your terms of service
  • Decouple implementation versioning and contract versioning
  • Test thoroughly
  • Plan for deprecation

Reference

https://www.postman.com/api-platform/api-versioning/

Powered by Link to AI chat
  • Copyright
  • Disclaimer
  • Privacy
  • Right to information
  • Accessibility
  • Jobs in Queensland Government
  • Other languages

© The State of Queensland (Department of Education) 2025

Queensland Government