Home Back

How AI Is Guiding The Future Of API Development

Forbes 2024/7/1

Andre Sluczka is the Founder & CEO of Jetic. He has 15+ years of experience building scalable enterprise integration platforms.

Microsoft predicted in 2020 that 100 million new apps would be created yearly, leading us to develop more applications in five years than during the last 40 years. This prediction was based on low-code and no-code software capabilities. Since then, LLMs have drastically improved, and the number of apps developed yearly will increase.

That’s why companies need a robust strategy to connect these applications, and API is the tool of choice. Traditionally, designing, documenting and implementing APIs has been time-consuming and technically complex. However, I believe LLMs can streamline API development. In this article, I will explore actionable advice that can simplify tasks such as data extraction, documentation generation and code scaffolding using LLMs.

Jumpstarting API Design

Before implementing an API, we must analyze complex business requirements. What actions need to be performed, what data needs to be exposed and what data governance criteria need to be taken into consideration are points to consider. LLMs can help analyze requirement specifications and identify use-case scenarios and workflow patterns, creating a first draft of the initial API design.

Practitioners can feed technical specifications and business expectations into the model to allow the associated LLM to create a high-level proposal of your API based on common patterns it has identified. The more information you add to the LLM over time, the better the results will be. This does not eliminate the need to understand the technical requirements. Still, it will help jumpstart the API design, handing you and your team the foundation to discuss and align on the technical specifications.

Code Scaffolding And API Generation

The concept of code scaffolding is not new. For example, while AI can automatically generate API endpoints based on the data model in different languages, LLMs take it a step further. By analyzing API specifications created using the same model, those designs can be pushed back into LLMs to generate skeleton applications that incorporate defined routes and connect to underlying data sources. Instead of manually implementing the logic to validate input data, connect to subsystems, handle errors, authentication and authorization, these tools can help avoid repetitive tasks and streamline development. This foundational work allows developers to focus on refining the business logic, handling business-related exceptions and edge cases or making the code more efficient for scaling purposes.

Automating Data Mapping With AI

Data mapping is a time-consuming task that is prone to mistakes. For instance, developers typically face complex JSON or proprietary XML structures with nested arrays—with data structures counting hundreds of nodes—when building an API to expose health record data, complex banking information, as found in FinTech or other highly regulated industries.

Developers can use LLM-powered tools to simplify this by automatically pre-populating data mappings. By analyzing the technical design specifications of all involved systems, the repetitive task of mapping data fields can be avoided. This automation speeds up the process and ensures error-free data mappings.

Simplifying Complex Data Formats

Over time, LLMs will learn and become experts in industry-specific, complex data formats such as the legacy Electronic Data Interchange (EDI) for supply-chain integrations around the work, HL7, which is commonly used in healthcare, SWIFT in the banking industry or any other non-public specific industry segment requirements.

The LLM’s ability to process diverse, internally facing data formats also allows it to contribute to a canonical data format, a requirement often wished for by the business but never delivered by IT due to its complexity in different data elements, nuances and relationships. LLM can easily analyze many formats and propose a common data language to be used organization-wide. Companies can use AI to quickly decompose documents and transform them into a more modern or widely adopted format, helping with data governance and data integrity.

From Data Models To API Documentation

A critical step of an API lifecycle that is often overlooked is its documentation. AI tools can automatically generate and draft the initial API specifications based on open standards such as OpenAPI specs using existing data models.

Documentation is often neglected by developers due to time constraints, becoming out of sync with the code and reality, rendering the initial effort useless. AI, alongside LLM, can automatically revise and update the documentation and point out inconsistencies. Good documentation makes API endpoints more easily accessible to consumers and easier for developers to update and maintain.

Train Your Team And Model

LLMs are very powerful, but like any tool, there is a learning curve to make the most of it. Companies should provide training and documentation to ensure their teams know the best practices to achieve optimal results. And because LLMs can be trained using your dataset, companies can train their models specifically based on company data, code, documentation and guidelines, ensuring that the results are better aligned with the company standards.

Limitations

While LLMs offer significant API design and development potential, they also have several limitations. AI-driven approaches rely heavily on the quality and diversity of training data, which may not always capture the full spectrum of real-world use cases or edge scenarios. This can lead to failures in API design proposals, the generated mappings, or their implementation. Typically, AI needs help understanding complex business requirements and delivering precise code, which could result in API designs and implementations that do not fully meet the needs of end users.

Conclusion

As the application landscape proliferates, companies must be increasingly comfortable creating and consuming APIs. LLMs can play a pivotal role in the engineering team's handling of scale by offering tools that expedite the development process and enhance accessibility and accuracy. Companies use an average of 230 applications, which soars to thousands for very large organizations. With AI's help, companies can keep pace with their growing application usage.

Forbes Technology Council is an invitation-only community for world-class CIOs, CTOs and technology executives. Do I qualify?

People are also reading