According to Vivek Gupta, vice president of product management at the enterprise application management platform provider AnyPresence, API creation needs to be simple. Gupta, who has a background as a mobile software engineer, believes that as APIs become increasingly critical to updating old, outdated business processes, it's essential that those APIs are easy to create and use.
"API creation should not be rocket science; it should be easy enough to create APIs easily and quickly," Gupta said. "APIs are the starting point of your digital transformation, and that starting point should not be a roadblock."
To illustrate how developers can simplify the creation and use of these APIs, Gupta said there are six key aspects of API creation that developers must consider to accelerate their API production.
Think about the connectivity aspect
The first key area to think about, Gupta said, is how APIs will connect to your databases, legacy services and other critical parts of your enterprise systems. Being able to integrate easily with these core systems helps ensure developers aren't bogged down thinking about integration and connectivity issues. Then developers can focus solely on creating their APIs and services.
To support connectivity, Gupta said developers should look for API creation tools that provide an automated "connectivity layer" that takes the pain out of integration with pre-existing core systems -- something that will figure out the "magic" of that connectivity for you.
Flexibility for a developer to define and control APIs
The next aspect to be considered, Gupta said, is providing developers the flexibility to map out the entire lifecycle of the API. Developers should be able to see not only the code and initial framework, but also the final product, and to have control over things like the user interface and look of the applications.
"As a developer, you should be able to control how the applications look and feel," Gupta said. "Developers should have access to the API definition framework and everything in between."
Gupta said that providing a tool that allows developers to "see" what the final product will look like and how it will function can help them ensure that when they send APIs for production, they are providing a completely packaged application, not just a raw set of code that may or may not function properly.
Gupta stressed developer workflow as the next area to focus on. "It makes my life easier to know which part of my code goes where," he said, adding that it's important to find a tool that provides a step-by-step workflow that dictates logic.
"APIs are nothing new," he said. "But as a developer you want to understand the workflow. There will always be complexity, new logic, rules, etc."
To avoid unwanted surprises, Gupta said developers need to have a standard, integrated workflow in place that is simple, effective and outlines everything from initial production to the ultimate endpoint. He said finding a tool that provides an easily readable and usable graphic interface that lays out that workflow can help.
How RESTful APIs can help
When it comes to accelerating API creation, Vivek Gupta made it clear that using RESTful APIs can help developers address some of the critical aspects mentioned in this tip. For example:
- Connectivity: RESTful APIs often contain a connectivity layer that automates integration with core data systems and other resources.
- Workflow: Part of the benefits of using RESTful APIs is that they often have a clear endpoint workflow that developers can see right out of the box, making it easy to keep track of things.
- Testing: RESTful APIs are often equipped with the ability to test during production, streamlining debugging and error remediation efforts.
- Documentation and logging: RESTful APIs will often programmatically create Swagger documentation as the developer writes the code, taking the burden off developers and making APIs easy to consume.
The next aspect to consider, Gupta said, is the testing aspect. He pointed out that every time the testing team finds a new issue in a release, the more it costs to send it back and fix.
Gupta said that developers should be able to test their APIs without making the APIs public. Real-time testing is essential, he said, to provide developers the flexibility to not only find important issues upfront, but avoid the cycle of releases being returned from the testing team and accelerate the API creation process. You should be able to accomplish this testing without new tools, stand-up servers or virtual machines.
According to Gupta, API development teams, IT teams and app development teams are often scattered and disparate.
"You don't expect them to work together," Gupta, who believes that separation between teams can drastically hinder API creation efforts, said. But rather than force these teams to interact more, Gupta suggested that the answer may lie in making developers less resource-dependent.
For instance, Gupta illustrated, developers may need to get access to SQL systems from the IT department. That request takes time, and it is never certain if the request will be approved. The answer to this, Gupta said, is to have APIs that can run without IT resource dependencies. Developers should be able to completely simulate the API's planned environment and endpoint without connecting to a data source.
Gupta gave an example where a customer of his, in an effort to recruit talent, wanted to host a hackathon using the customer's own APIs. However, the customer did not want to expose the "real" API or any true security protocols during the hackathon, so they decided to create a mockup of the API environment to use during the event. In less than a week, the development team had a working environment built for the API that did not expose connections to any real data sources. According to Gupta, having this kind of power can allow much faster production of APIs and rapid application development.
Gupta also stressed the importance of documentation when creating APIs. Although a developer may feel comfortable and familiar with an API, he can never assume that the consumer will be. This requires adhering to standard documentation that can be accessed easily by all consumers to avoid any confusion down the line.
To this effect, Gupta recommended that developers find tools that allow documentation to be created automatically and stored in a commonly used framework like Swagger. This way, developers don't have to worry about taking time to create documentation separately and can focus solely on creating their APIs.
Finally, Gupta stressed that after an API is released for use, logging is critical.
"If you take a lifecycle of your API, how is your API doing?" he asked. "Is there traffic flow? Are there errors?" Gupta said that real-time logging is required to capture an accurate picture of how your API is performing.
He added that the development team should have their own logging methods, and that whatever system they use for monitoring the API should integrate with any logging tools that the developers or their API consumers' respective companies may have in place. This way the API developer can keep track of not only how the API performs in general, but how it interacts with and performs in each unique environment it resides in. To achieve this, Gupta said, it's wise to find a tool that provides real-time logging and also allows for seamless integration with other important logging tools.
Access our homemade guide to API integration and management
Test your knowledge on working with API code with our quiz
Find five tips for handling changes to your APIs