DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Designing a Java Connector for Software Integrations
  • Vibe Coding With GitHub Copilot: Optimizing API Performance in Fintech Microservices
  • Revolutionizing Financial Monitoring: Building a Team Dashboard With OpenObserve
  • Unlocking the Benefits of a Private API in AWS API Gateway

Trending

  • Unlocking AI Coding Assistants: Generate Unit Tests
  • Scaling DevOps With NGINX Caching: Reducing Latency and Backend Load
  • Medallion Architecture: Efficient Batch and Stream Processing Data Pipelines With Azure Databricks and Delta Lake
  • Teradata Performance and Skew Prevention Tips
  1. DZone
  2. Data Engineering
  3. Databases
  4. API and Asset Versions

API and Asset Versions

Want to learn more about versioning your APIs? Check out this post on how to make use of the API and Asset versions of the Anypoint platform.

By 
Anupam Gogoi user avatar
Anupam Gogoi
·
Jul. 14, 18 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
13.8K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

With the latest version of Anypoint Platform (Version 2), some new concepts have been introduced regarding the versioning of APIs. Here in this article, I will try to make use of them. The official documentation of Mulesoft does not talk too much about this aspect. Through this article, I would like to create an open discussion about the versioning of APIs.

Versioning of API

The versioning of an API is a complex topic. In this post, I will provide a simple use case scenario that discusses the features provided by Anypoint Platform (Titan).

API Version

Please have a look at this article regarding version nomenclature. When an API (RAML) specification definition is done (Design Center), it will be published to Exchange as shown below:

Image title

In this case, the API version is the major version of our API. And, the Asset version is the minor version. For the same major version, we can have multiple minor versions (Asset versions).

Note:

Major: Increment major version when incompatible changes are made in the API.

Minor: When additional features are added to the API in a backward-compatible manner.

Example

Let's suppose we have a simple API:

Image title

We have published the API. Let's say:

Major (API version) Minor (Asset version)
v1 1.0.0

After a while, let's suppose that we need to add one more operation and the API must be backward compatible.

Image title

So, we will publish a new Asset version.

MAJOR (API version) MINOR (Asset version)
v1

1.0.1


So, When Do we Change the API Version?

Now, let's suppose that we have to change the URI of a resource.

Image title

Now, we will change the major version of the API.

MAJOR (API version) MINOR (Asset version)
v2

1.0.0


Deployment in Runtime

This is another critical point for handling different versions of APIs. Should we create a separate Mule application for each version change (minor and major)? There is not a definitive explanation in Mule documentation. So, from my point of view, it (should be) is a good idea to not publish multiple applications for minor changes. This is because you will consume a lot of vcores. Here is the idea in a pictorial view:

Image title

You will need to develop all minor changes in one single application and deploy them. Otherwise, you will create a separate Mule project and deploy it.

Suggested Project Structure

Here is a sample structure of the project. It's subject to change according to your requirements.

Image title

See — it's quite doable.

API Manager

Note that, in the same project, we have multiple API (asset versions). To manage them, we can simply add multiple API autodiscovery configurations.

Conclusion

In this article, I tried to make use of the API and Asset versions of the Anypoint Platform (2). We still expect some better usage recommended by Mulesoft. 

API

Opinions expressed by DZone contributors are their own.

Related

  • Designing a Java Connector for Software Integrations
  • Vibe Coding With GitHub Copilot: Optimizing API Performance in Fintech Microservices
  • Revolutionizing Financial Monitoring: Building a Team Dashboard With OpenObserve
  • Unlocking the Benefits of a Private API in AWS API Gateway

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: