Like any other product, APIs have their life cycle, and in this article, we will be explaining the different phases and the tools that can be used to support each stage.

Figure 1 – Shows the full API life cycle (DZone, 2017)

The API life cycle can be broken down into three main stages:

Design

In the first stage, the developers will start defining how the API will look like by designing the interface and setting the different behaviors. The definition of the API is based on the requirements coming from the business. Four steps need to be followed to produce the API specification:

  • Design. According to the requirements, the specification of the API is written.
  • Simulate. Add some example data and mock the service.
  • Feedback. From the mocking service, it is possible to get feedback from the consumer and adjust if it is needed.
  • Validate. The consumers of the API can validate it and provide further changes, and the cycle starts again. Once it’s ready, the API can move to the next stage.

Some several tools and languages can be used for the specification. Apiary is one of the most used platforms for designing and mocking APIs. It uses API blueprint as the language to write the definition. Here is the link: https://apiary.io

In case you are looking for a fully integrated platform, the MuleSoft Anypoint platform is the option. It is possible to follow the entire API life cycle. The designer allows you to write the spec using RAML and then can be used in the studio to develop the API. Here is the link: https://anypoint.mulesoft.com

Implementation

Once the API specification is complete, we can move to the next phase where we are going to build the API. One advantage of using MuleSoft is that it is possible to import the RAML specification into the Anypoint Studio and by using the API Kit, the system will generate all the flows for you so you can add the implementation.

For testing the Anypoint studio provides MUnit, is a unit testing framework for MuleSoft applications that allows the developers to design and execute the different testings cases. Also, MUnit can be easily integrated with a CI/CD environment.

The tool for the implementation is the Anypoint Studio and here is the link: https://www.mulesoft.com/lp/dl/studio

There are more tools available in the market, such as Oracle Cloud Integration Services, but it does not provide the ability to create an API from the Apiary definition. Here is the link to the documentation: https://docs.oracle.com/en/cloud/paas/integration-cloud/index.html

Management

Once the API was build and tested, it has to be deployed to a controlled environment where it can be secure and monitor.

DevOps is vital in this process; the deployment of APIs should be automated and simplified until the click of a button. It is crucial to have a lightweight platform that is suitable for CI/CD (Arnny, 2017).

Another fundamental part of the management is the governance and security. It is critical to follow best practices available in the market to secure all the APIs by applying policies and monitoring the traffic. It is possible to perform these actions in the MuleSoft Anypoint Platform.

References

Arnny, Y (2017) MuleSoft API Lifecycle Management [Online] Available at: https://dzone.com/articles/mulesoft-api-management-life-cycle (Accessed: 10 March 2020)

Leave a Reply

Your email address will not be published. Required fields are marked *