Typical API lifecycle management consists of 6 phases.
- Plan
- Design
- Develop
- Deploy
- Document
- Deprecate
These six different stages are owned by different teams. If there is no standard guideline, then there will be no common best practices or standards that are followed. This may result in slow development, testing, and customer adaptability.
That’s where the API lifecycle is helpful. It enables developers to follow well-defined procedures, guidelines, and standards. These not only help in developing an API, but also help in testing, deployment, documentation, and retirement of an API.
API Lifecycle Management at Druva
This section explains how we use API lifecycle management at Druva and goes into the details of every step that we follow.
1. Plan
In the planning phase, we identify the operations that the API will perform. Each operation is evaluated with its business use case and how it will benefit the customer. Once such operations are finalized, they are considered for the API design. One should always make sure that the API is resource-centric and facilitates the consumer for basic CRUD operation.
2. Design
The APIs are designed using REST protocol as it has benefits like simplicity, ease of use, scalability, and many more. Along with the protocol, we design the API signature. It’s the API contract and should be easy to understand for customers and be consistent across Druva products. This is the most important phase as it focuses on various aspects of the API, such as architecture, resource naming, specifications, and request and response structures.
3. Develop
Based on the plan, the API is implemented with ease and in tandem with the API design. We made this possible by creating API guidelines that state the exact steps to follow while designing and developing. Application-specific middleware and lib functions help in speeding up the implementation process in turn helping the organization with the quick releases of APIs.
4. Deploy
We developed CI/CD pipelines to test the APIs in various pre-production environments with detailed test scenarios to make them robust. We leveraged Open API Specification 2.0 to achieve a seamless deployment process. This was done by writing a pipeline that will convert the API specification written in Golang into Swagger JSON format containing the deployment specifications. This gave great control to developers by removing additional dependencies on the DevOps team.
5. Documentation
We have well-documented API specifications and guides on the Druva Developer portal. This portal is the best resource for customers who want to get started with API integration. For example, when you generate an authentication token, the portal shows how the request will be integrated with various programming languages. It also provides the functionality to run the API on the portal itself and check the output.
6. Deprecation
This involves continuous support of existing and new features in the APIs that are already available. Backward-compatible and incompatible changes are managed through API versions. These API versions are maintained till their deprecation. Before deprecating an older version of an API, we notify all the consumers of the API regarding the deprecation. Once all consumers migrate to the new version of the API within the defined timeline, the older version of the API is removed from the Druva Developer portal.
Maintaining the lifecycle
A process is good as long as it’s followed. As Druva is in a high-growth phase, the development team is rapidly expanding and getting bigger and more distributed. In such a situation, ensuring that everyone sticks to the guidelines is a challenge.
To overcome this challenge, we ensured that the API lifecycle management process is part of the developer onboarding process. Developers are encouraged to go to the Druva Developer portal and try out the APIs. Introducing the concept early helps new folks be aware of this methodology and they are able to recollect it quicker when they start working on APIs.
We urge you to visit the Druva Developer portal and try out our interactive APIs.