The ABCs of APIs: Developers Are Migrating to API-Based Workflows
APIs might not be top-of-mind in the C Suite, but maybe they should be. Increasingly, developers are becoming the decision makers about which vendors they want to work with based on the quality of their APIs.
The video workflow and distribution environment is incredibly complex, and the way to build a best-of-breed system or even just gain finer control over tasks—especially when delivering video at scale—is by API. That stands for application programming interface, and APIs are the connective tissue vendors provide to give developers direct control of their products. APIs allow different applications to programmatically communicate and to manipulate and exchange data with each other in an automated fashion. This is essential if you’re connecting a wide array of disparate systems, including content management, encoding, video platform, video player, analytics, customer management, and multiplatform end-user delivery.
Virtually all companies are now providing public APIs, but this wasn’t always the case.
“Yesterday, you might have used an on-prem piece of software for encoding, perceptual quality measurement, or other video manipulation, and in these cases you generally acquired software and had a non-developer operator or IT person set up and operate the software to get the results you needed,” says independent developer Cameron Elliott. “Today, you can sign up for API-based AI classifiers, encoding engines, and quality measurement tools in 15 minutes, and often have meaningful feedback about the applicability of that cloud-based video API service in a day or two.”
“I think most businesses today are migrating to some sort of API-based workflow,” says Igor Oreper, vice president, solutions at Bitmovin, which offers API-based products for developers for encoding, player, and analytics. Whether from Bitmovin or other vendors, APIs provide the ability to mix and match services.
![](http://dzceab466r34n.cloudfront.net/Images/ArticleImages/InlineImages/119571-API-1-ORG.jpg)
APIs offer video publishers the ability to put together the “puzzle pieces” of disparate vendors’ offerings into a functional whole. [Image courtesy of Bitmovin.]
Best-of-Breed
“A lot of the larger media companies today want to be the architect,” says Oreper. They don’t want to necessarily build everything, but APIs have introduced a newfound flexibility. “They want to be able to pick and choose the best-of-breed tools that are necessary for them and stitch them into that workflow or workflows, and [if something doesn’t work] then be able to replace them.”
“Customers are often concerned with stitching together best-of-breed software products into a custom automation workflow. In order for this to happen, these various software products must provide some way to be controlled without the use of a GUI,” says Jon Eagles, senior software engineer at SSIMWAVE. His company has two products accessible via API, SSIMPLUS Live Monitor and SSIMPLUS VOD Monitor, each of which analyze perceptual video quality to select and optimize for the best transcoded content.
“Our customers demand API access to our services because we are often part of a much larger workflow that needs to integrate with disparate tools and technologies,” says Eagles. “Our customers have spent millions of dollars to establish sophisticated video ingestion pipelines and large content management repositories. When they look to use a product like our VOD Monitor for example, they want to be able to feed assets into the system for analysis so they can assess the quality of their assets at various points in their workflow. The only feasible means of interaction that meets the automation demand is through an API.”
So how does this work? “One of the most common ways to achieve this control and support for inter-product communication is [for technology vendors] to expose an API for their product that adheres to common industry standards,” says Eagles.
A RESTful State
The developers I spoke with create RESTful APIs, which stands for REpresentational State Transfer. REST does not follow any specific standards, but rather is an architectural style for web services and provides interoperability between applications.
A REST API uses HTTP as the underlining protocol for exchanging data between sources and can be accessed from any number of programming and scripting languages. “[HTTP] has a concept of resources, so you think about your API in terms of what are the resources that you’re offering,” says Jon Dahl, founder, Mux. “In the Mux Video API, one of the resources is assets, [and] an asset is a video or audio file.” These resources can use the actions built into HTTP like, GET, POST, PUT, and DELETE.
“The Mux Video [API] lets our customers encode and deliver optimized video with just two API calls. All of the hard work of optimizing bitrates, resolutions, encoding, and delivery are handled behind the API,” he says. For power users, Mux has per-title encoding options using machine learning to output an optimized adaptive bitrate (ABR) ladder. “Mux Data tracks quality of experience (QoE) metrics like buffering and load time,” says Dahl. “We have users who use this for things like optimizing delivery across multiple CDNs.
“We monitor over a billion streams a month for our customers in terms of the quality that their users are seeing, like how much rebuffering or startup time, or what kind of errors are they getting,” says Dahl. “I would say re-buffering is probably the number one metric our customers care about, with errors and start-up time coming in second and third. The order really depends on the customer.”
By following REST conventions, any developer should be able to intuitively figure out how to use an API, Dahl says. “A well-designed API doesn’t surprise anyone. It fits what a developer would expect to happen,” he says. Mux also includes the ability to test its API. “In our user interface (UI), you can actually simulate API calls and see what happens when you send an API call and get a response back.”
“REST is stateless and allows us to scale our services to accommodate large, frequent load changes, which are pretty common things when you’re processing video,” says Eagles. A stateless server would likely be designed such that each step in the larger process is an atomistic action that requires no knowledge of the results of the previous steps or the ones to follow.
“Each system action is independent and can be handled by any available server since those contextual details are maintained elsewhere (i.e., typically the client),” Eagles says. The whole concept of cloud infrastructure is built around the benefit of being stateless. When a server is busy, additional ones can be brought online to seamlessly scale.
If this wasn’t the case, scaling would be harder because too much data would be stored. “When we place the onus on the server to maintain the state of each user conversation, the server winds up spending an increasing amount of time storing, retrieving, and managing this state as the population of clients grows,” says Eagles.
“For VOD the RESTful API is actually crucial. When we talk scale, we talk about two main things. One of them is the number of working nodes and the number of servers that can process the jobs, process the videos,” says Eagles. “The other one is how many videos can you process in parallel. We’ve done thousands, and we’re about to do hundreds of thousands within a couple of months.”
![](http://dzceab466r34n.cloudfront.net/Images/ArticleImages/InlineImages/119573-API-2-ORG.jpg)
This diagram shows how SSIMWAVE’s APIs connect pieces of the workflow from encoder to consumer delivery.
APIs in Practice
“The apps that we build are completely dependent on external APIs. That’s literally how we connect and interface with video platforms, analytics platforms, and billing [systems],” says Tom Schaeffer, CEO of Float Left, which builds OTT and TV Everywhere apps for clients. “All of those parts of the ecosystem require a set of APIs that can send and receive information. “Our apps, at least a third of them, are comprised around API integration work,” he says. Other systems hooked up by API also include the player, content management system, DRM, customer management, and server communication. “All of that stuff is all API driven.”
What’s important is being able to offer APIs at the granularity that a developer wants. “Does the API fit the way that I want to build the software, or is it going to make me do something I don’t want to do, either because it does too much or too little?” says Schaeffer.
An API that’s too low-level just does one little thing. Maybe it does it well, but that’s all it does. In this situation, a developer has to build a lot more software on top of it. “I think different abstraction levels are right for different people, but our MUX Video API is really intentionally designed to only do that backend of video streaming and nothing else, because that’s the granularity that a lot of developers want when they’re building video into their applications,” says Dahl.
“There are so many ways to skin a cat with an API,” says Schaeffer. “What we like to see is more endpoints with smaller bits of information that we can use at various times when we need it, rather than getting it all at once and then having to store it temporarily and use it later.”
There are a number of ways to evaluate whether an API is good, aside from granularity, and another obvious one would be based on how it reacts. “What the user would interpret as latency a lot of times really just comes from waiting for the API to respond with information,” he says. While no one interviewed here cited specific metrics, obviously API response time is critical. A slow API can mean the difference between keeping and losing a customer. “It definitely can have an impact on the user experience,” says Schaeffer.
Related Articles
While Facebook signaled that it would change Live API permission rules several months ago, some producers were likely still caught off guard.
02 Aug 2018
Patchwork video workflows happen when companies add different providers to their video workflows, and they can seriously hamper quality and development.
30 Nov 2016
If you're using or currently plan on using a CDN provider with a web service API, here's a look at how to achieve flexibility
07 Sep 2016
Look for broadcasters to begin streaming live video to Facebook, as the social network opened up its API for third-party hardware and software developers.
12 Apr 2016
Brightcove's Zencoder now works with live video events, promising a simple cost-effective solution for publishers.
26 Mar 2013
Companies and Suppliers Mentioned