Apidog

All-in-one Collaborative API Development Platform

API Design

API Documentation

API Debugging

API Mocking

API Automated Testing

Apidog Tutorial: Managing API Versioning in Apidog

In practice, teams may need to provide multiple versions of the API to external users, such as the latest version, stable version, or long-term support version.

David Demir

David Demir

Updated on December 5, 2024

Open APIs are a crucial tool for technical teams to share services and data with users. As businesses grow and technology evolves, APIs need to be updated regularly. These updates are typically designed to meet new market demands, improve existing features, add new functionality, or address security vulnerabilities.

As multiple versions of an API are often required to run simultaneously, teams need to manage these versions effectively. Some users may need the latest version to access new features, while others might prefer the stability and familiarity of older versions.

API Versioning Made Simple: A Beginner’s Guide
API versioning is vital for managing changes in software development, ensuring compatibility and client stability. This guide covers key concepts, implementation strategies, and tools to streamline the process, making your API development more effective and future-proof.

To meet these varying needs, teams often provide multiple API versions, such as the latest, stable, or long-term support versions. This helps ensure compatibility and stability for different user groups, minimizing the disruption caused by upgrades for users relying on older versions.

Apidog’s API Version feature is designed to make managing multiple versions easier. It allows teams to create, manage, and maintain different API versions, ensuring that each version operates independently and is clearly distinct from others.

button

Step-by-Step Guide to Create API Versions

Step 1: Creating an API Version

Create API versions - Apidog Docs
Create API versions - Apidog Docs

Once you enter your project, go to the branch switcher above the project folder and select API Versions to see all versions in the current project. Click on New API Version to create a new version. Name the version and select the initial content.

Creating an API Version

After saving, the system will automatically switch to the new version, allowing you to edit the resources for that version without affecting the original version.

API Version 2.0

Step 2: Publishing API Versions in Documentation

Publish API versions - Apidog Docs
Publish API versions - Apidog Docs

Once the API version is created, navigate to the "Share Docs -> Publish Doc Sites" section in the project.

publish doc sites at Apidog

Click on Edit to choose which API version to publish. You can specify the version’s source, display version numbers, set running environments, and configure the slug.

editting new API versions at Apidog
đź’ˇ
The slug serves as a unique identifier for a specific API version that follows the public access address. For instance, in the URL https://example.Apidog.cn/2-0-0, 2-0-0 is the Slug, allowing external users to directly access that specific version of the API. This ensures that each API version has a unique and clear access path.

You can also reorder the published versions. The first version in the list will be the default version, displayed to users accessing the project without specifying a version.

Edit Release Version

After completing these settings, click on Publish. The project will be marked as Published and users can access the API documentation via the documentation link, where they can switch between different versions.

API version order
View difference version's content

Step 3: Quick Sharing of Endpoints in API Versions

Quick share - Apidog Docs
Quick share - Apidog Docs

In addition to publishing API versions, you can also share specific endpoints from any version of the API.

quick share API endpoints at Apidog

To do this, create a sharing link, select the API version, and choose the endpoints you want to share.

selecting API versioning scope for sharing

Once the sharing link is generated, users can view the selected endpoints for that version of the API.

Latest version content

Step 4: Deleting API Versions

To delete an API version, go to "Project Settings -> API Versions" in the main branch.

Delet API version

Once deleted, the public documentation will no longer include that version, and any sharing links associated with that version will become invalid. This ensures that users can no longer access content from the deleted version through those links.

Invalid API version

FAQs of API Versioning

1. What is the difference between API versions and sprint branches?

API Versions: Mainly used for external publication. It’s best to create a new version when major changes that are incompatible with the old version are made. API versions include a full set of endpoints.

Sprint Branches: Used for internal team development. A new branch is created for each iteration, and it is merged into the main branch once completed. Sprint branches typically only contain new or modified endpoints.

2. Does the API version feature support all types of projects?

Currently, the feature only supports HTTP projects.

3. Who can create and modify API versions?

Project administrators and project editors can create and modify API versions.

4. Who can publish or delete API versions?

Only project administrators can publish or delete API versions.

5. Will changes to one API version affect another?

No. Each API version operates independently, so changes to resources in one version won’t impact other versions.

6. Are there plans to support more features, such as multilingual support?

Yes, we are actively working on features such as multilingual support and cross-branch/version pulls. These will be added in future versions to improve the management of API documentation.

7. What about enhancements for sprint branches?

There are ongoing upgrades to sprint branch features, including the ability to copy resources from other branches, pick resources from other branches, branch merge reviews, and branch locking. These enhancements will be available in upcoming updates.

Conclusion

Apidog’s API versioning feature makes it easy for teams to create, manage, and maintain multiple versions of their APIs. This ensures that older versions remain stable while new features are introduced. Whether you’re managing a single API or multiple versions for different user groups, Apidog streamlines the process, ensuring compatibility and minimizing disruption for users.

What Are the Best Practices for Managing API Versions?
Learn the best practices for API versioning to keep your integrations smooth and future-proof. From semantic versioning to deprecation strategies, ensure your APIs are reliable and backward-compatible. Download Apidog for free to simplify your API management.
button
Integrating HashiCorp Vault with Apidog: Secure API Keys, Tokens and moreTutorials

Integrating HashiCorp Vault with Apidog: Secure API Keys, Tokens and more

Discover how to securely integrate HashiCorp Vault with Apidog. Learn to manage API secrets dynamically, automate workflows, and enhance security practices with this powerful combination. Follow the step-by-step guide to streamline your API development and testing.

Oliver Kingsley

December 23, 2024

GitHub Copilot Free: How to Get Started?Tutorials

GitHub Copilot Free: How to Get Started?

Discover how to start using GitHub Copilot Free, the AI-powered coding assistant. This guide covers setup steps for popular IDEs like VS Code and JetBrains, helping you unlock productivity with intelligent code suggestions and completions—at no cost!

Oliver Kingsley

December 19, 2024

How to Use ModHeader Chrome Extension for Optimizing API RequestsTutorials

How to Use ModHeader Chrome Extension for Optimizing API Requests

Learn practical tips and best practices for effective API testing using ModHeader Chrome Extension in this comprehensive guide.

Emmanuel Mumba

December 19, 2024