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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • The Permission Was Valid. The Action Was Not Authorized.
  • Why AI Agents Need a Shared Enterprise Ontology
  • Adding Graph Retrieval to a RAG Pipeline With Python
  • Why 200 OK Is the Most Dangerous Lie in Enterprise Integration

Trending

  • Running a Self-Hosted WAF in Production: Practical Lessons From SafeLine
  • The SDLC After AI
  • Build a Voice Assistant With Gemini Live API
  • Testing Java and Spring Applications With Kotlin: Low-Risk to Adoption

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Jul. 14, 18 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
14.4K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • The Permission Was Valid. The Action Was Not Authorized.
  • Why AI Agents Need a Shared Enterprise Ontology
  • Adding Graph Retrieval to a RAG Pipeline With Python
  • Why 200 OK Is the Most Dangerous Lie in Enterprise Integration

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

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 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook