OpenAPI Should Be a Key Part of Any Organizational Development Strategy
Eight years after Marc Andreessen wrote that “software is eating the world,” organizations of all kinds have come to realize their very survival depends on how well they integrate technology into their businesses. Because of the ubiquitous nature of software and technology in daily life, consumers have high expectations of the business applications they interact with. In response to that, these applications have undergone explosive growth and their supporting systems have become increasingly complex.
Today, a single web or mobile transaction, such as purchasing a product or registering with an application, cross an average of 35 different technology systems or components, compared to 22 only five years ago. With such complexity, APIs have transitioned over the past decade from relative obscurity to become the digital glue that empowers developers to create new software applications, partnerships and even new businesses.
Becoming an API producer can offer huge dividends in terms of growth and revenue. For businesses that have truly embraced an API-first strategy, they have created a new go-to-market channel that generates substantial revenues from referrals and usage fees.
Take Stripe and Twilio, for example. Here you have two companies that epitomize what it means to be API-driven. With Stripe, its vision was to simplify e-commerce payment processing — a task nearly every company needs to perform — and it started building out its APIs to fulfill that goal. Last year, more than 80% of Americans made a purchase using Stripe in some form and the firm is valued at $22.5 billion today. In the case of Twilio, it started in 2008 with just a simple API for making phone calls. Now it provides a comprehensive cloud communications platform-as-a-service (CPaaS) where developers can easily integrate voice, video and instant messaging functionality into its web and mobile applications. Last year, Twillio boasted $1 billion total revenue for the year, up 63% from 2017.
Salesforce is another great example of the importance of an API-first strategy. Last year it made $13 billion in revenue and it is widely estimated that 50-60% of that number came from API calls. So important is the API strategy that they doubled down on it by acquiring MuleSoft a year ago for a whopping $6.5 billion. Salesforce expects its acquisition to accelerate its growth and produce far greater financial returns by embedding Mulesoft’s API/data integration capabilities into the Salesforce platform, thereby helping to solve for its customers’ escalating data integration needs. So far the signs are very good.
On the other side of the coin, consuming APIs can also be hugely beneficial. There are many technical and operational advantages to be gained, chief among them being:
- Decoupling of systems: Decoupling your applications makes them more resilient — it becomes easier to maintain code and update your application components independently of one another.
- Removal of data silos: API specifications such as REST have made it easier than ever to open the door to data that was previously hard to access.
- Avoidance of vendor lock-in: Leveraging APIs in your application can lead to more flexible software, where swapping one email marketing service for another, for example, will result in minimal disruption to your codebase.
- Adherence to best practices: APIs are the ideal springboard for introducing modularity, hiding complexity through abstraction and creating a much sought after separation of concerns.
There are many clear and obvious benefits but, for many companies, the main driver for an API-driven strategy is reducing development effort and time-to-market. Developers today realize that much of the functionality they need to build into an application is redundant and already exists elsewhere. They have learned not to expend precious time and resources on reinventing the wheel but instead to rely on cost-effective APIs from third-party platforms.
Some popular examples include:
- Inbound/outbound email: Mailgun, SendGrid, etc
- Payment processing: PayPal, Stripe
- Mapping: Google Maps API
- Voice/Video/IM: Twilio
- Storage: Amazon S3
- Monitoring & Analytics: Datadog, Dynatrace and Splunk
Leveraging APIs frees up developers to focus on delivering the unique functionality of their applications and more quickly and less expensively bringing that ever-important initial product to market. There are many examples of companies who have adopted this approach and reaped the rewards. One such example is Instacart, founded in 2012 and now valued at $2 billion thanks to its rapid innovation. Had Instacart been founded five years earlier it could have been an entirely different story, due to the time and expense of writing 100% of the functionality the company eventually went to market with.
Choosing an API Specification
Once a company has decided to adopt an API-driven strategy, they will need to treat its APIs like crown jewels in order to succeed. To that end, its APIs should be:
- Easy to use: A suitable API specification should cater for self-service consumption — allowing developers to inspect API operations and test how the API responds before writing any code.
- Fully documented: Documentation should be auto-generated based on the API definition and cover the entirety of the API, listing all methods, parameters and responses. Good documentation for humans is vital so that developers can understand the business logic that calls the API.
- Well defined: Your API contract should be the foundation upon which you build an application. By following an API-first approach, you allow teams to start interacting sooner in the development process.
- Language-agnostic: The specification should have no language preference and should eliminate barriers by working across any language with minimal instruction.
The OpenAPI Specification
A great solution for all of the above is the OpenAPI Specification (OAS). Formerly known as Swagger, OpenAPI was founded by SmartBear, Google, IBM and Microsoft — among others — and has quickly become the largest framework today for designing, building, documenting and consuming RESTful APIs. The OpenAPI specification is language and platform agnostic and, largely because of this, has been widely adopted by API-driven companies such as Atlassian, MuleSoft, Netflix and PayPal.
Crucially, OpenAPI makes creating and using APIs a walk in the park for developers. The framework provides great tools to not only generate client and server code but also allows for auto-generation of both human and machine-readable documentation. Some of these tools include:
- Swagger Editor: An open source editor that helps developers quickly get started with OpenAPI-based APIs.
- SwaggerUI: An intuitive tool that allows for inspection and testing of an API without requiring any of the implementation logic in place.
- Swagger Codegen: An auto-generator of server stubs and client SDKs that allows developers to focus solely on business logic implementation.
Good design is one of the first steps to any successful software project. OpenAPI enforces an API-First (aka Contract First) approach to building your APIs. Once you have established your contract, you develop the logic to support those interactions. Internal development can take place behind the API contract without interfering with the efforts of those who plan to use it.
Finally, while OpenAPI helps to reduce development time and effort, an even greater benefit is that it also promotes openness and transparency. Many companies decide to publish their OAS API profiles to Github, allowing developers to import these files into interactive REST clients, such as Postman or Insomnia. By embracing this ethos of transparency, companies like Stripe and Adyen, for example, have shown that the payoff can be huge in terms of increased adoption of their products or services.
Looking to the Future
As the API-economy continues to grow in size, what does the future hold?
One growing trend in the movie, television and entertainment space is the growing use of “Hypermedia APIs.” These APIs deliver rich data — graphics, audio, video and plain text — in a non-linear fashion. The API consumer is presented with hyperlinks with which they can navigate the data, similar to how someone surfs the web. This establishes a much more meaningful and interactive experience for API consumers. As a live example, take TVMaze, from which you can browse its entire schedule by show, episode or cast.
Another area of interest is machine learning. It pervades our daily lives — from the photos on our phones to how our email is filtered — and is set to become even more important and widespread. However, not every enterprise is capable of implementing AI or machine learning from scratch and so there will be a growing reliance on API-driven third-party solutions. This is reflected by the explosion in machine learning services such as IBM Watson, TensorFlow and various Google Cloud APIs, and represents both new possibilities and business opportunities.
As consumers, the emergence of new interconnected device categories — e.g., home automation, wearables, smart cars — underlines the growing importance of APIs in our daily lives.
From a business point of view, APIs represent an attractive opportunity for companies. As the API economy’s precipitous growth suggests, companies that get it right will benefit handsomely from either developing new revenue streams or greatly reducing development costs and time-to-market for their products and services.
Underpinning all of this is the technical consideration that must be made in terms of API implementation. As we have explored in this article, the OpenAPI specification has become the de facto standard among the world’s biggest and most profitable API-driven companies. By adopting OpenAPI, companies will win the hearts and minds of developers and, depending on their business model, will either enjoy reduced development costs or potentially see a translation into increased revenue and growth.
Feature image via Pixabay.