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
Please enter at least three characters to search
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

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

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

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

  • Revolutionizing Financial Monitoring: Building a Team Dashboard With OpenObserve
  • Unlocking the Benefits of a Private API in AWS API Gateway
  • APIs for Logistics Orchestration: Designing for Compliance, Exceptions, and Edge Cases
  • Building Data Pipelines With Jira API

Trending

  • Subtitles: The Good, the Bad, and the Resource-Heavy
  • Scaling Mobile App Performance: How We Cut Screen Load Time From 8s to 2s
  • Artificial Intelligence, Real Consequences: Balancing Good vs Evil AI [Infographic]
  • Kubeflow: Driving Scalable and Intelligent Machine Learning Systems
  1. DZone
  2. Data Engineering
  3. Databases
  4. API Lifecycle in Anypoint Platform

API Lifecycle in Anypoint Platform

In this article, we go over a tutorial on how to work with the newer versions of Mule's Anypoint Platform to develop an API from beginning to end.

By 
Anupam Gogoi user avatar
Anupam Gogoi
·
Feb. 09, 18 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
12.1K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

With the release of Mule 4 came some major changes in the API Development process. The previous process of API development has changed with the introduction of the Design Center. If you want to know how it used, you can follow this link. Here, in this article, I am going to write briefly on how to design and deploy an API. 

The Roadmap

Below is a simple roadmap of API development:


In the following sections, I will explain every block of the above diagram.

Design Center

The API is born in the Design Center. Here you create and mock the API specification in RAML. Here is a snapshot of the process:

Anypoint IDE

After designing the API, you can either copy it to your Anypoint IDE project or you can import it directly to your Anypoint IDE project. Then you can implement the specifications.

Runtime Manager

Once the implementation of the API specification is complete, deploy the application in Cloudhub either through the IDE or manually. 

Exchange 

Now go back to the Design Center. Update the baseUri to the actual implementation URI of the application. The actual implementation URI can be retrieved from the previous step. Finally, publish the API to Exchange. Here is a screenshot,

Image title

In the Exchange, you can add necessary documentation for the API. Once you are done with the documentation you can publish it by clicking the Publish button as shown below:

Now if the API is an Experience API you might want it to be publicly visible. For that, you can add this portal to Public Portal by clicking the Share button. Note that the Share button appears only after you publish the API.

Once the portal is published to the Public Portal you can view the public portal. Here is how to do it:

At this point, everything is up and running and you are practically done. The assets of your organization are visible under your organization name. For mocking, I put the organization name as Amazon. Here you can see that our asset (RAML) is available as a REST API as well as a Connector. (It's a new feature)

API Manager

Now let's say, for example, that you want to manage the API and apply security policies, SLA layers, etc. For doing this you have to use the API Manager. The below screenshot shows how you can import an existing API from the Exchange.

Once you save the configurations you can see the below information (ID, Name, and Version). It's really important when you use the API Autodiscovery operations. 

The next step is to create a proxy. A proxy is a very simple application that is deployed in the runtime. It has a single flow with an HTTP component calling the actual application. Proxy is required to apply security policies, SLA tiers, etc. An API is registered as active only when it has a proxy deployed and running in the runtime. 

After deploying the Proxy, you can see that the status of the API is Active:

Wrapping Up

Now, at this point, everything is looking pretty good. Let's check our Exchange and try out our API:

Check the base URI. It's still pointing to the actual application that was deployed in the runtime. We have to change it to point to the proxy URI. So, we go to the Design Center, edit the RAML, and modify the baseUri. After that, we simply publish a new version of the asset to the Exchange. Now, if we go to Exchange and test the API we can see the correct URI.

Conclusion

In this article, I have described how to follow a simple roadmap to create and manage APIs. There are a lot of other important things that I did not cover in detail here. For that please wait for my next articles. 

Cheers!

API

Opinions expressed by DZone contributors are their own.

Related

  • Revolutionizing Financial Monitoring: Building a Team Dashboard With OpenObserve
  • Unlocking the Benefits of a Private API in AWS API Gateway
  • APIs for Logistics Orchestration: Designing for Compliance, Exceptions, and Edge Cases
  • Building Data Pipelines With Jira API

Partner Resources

×

Comments
Oops! Something Went Wrong

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:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!