The ABCs of APIs: Developers Are Migrating to API-Based Workflows
“A perfect example of this is search. Search can be, depending on how it’s implemented, a great experience or it can be terrible,” says Schaeffer. “You are basically sending in some information to the database and saying ‘Find this title.’ Depending on the size of the library, it can take a long time to return those results. Sometimes we want to have search results happening as someone is typing in or keying in the search query. That requires a very fast API response.”
The Benefit of Server-Side APIs
“Without an API, we could handle simple use cases, however, as most of our clients are large content owners with complex video workflows, offering an API is a more attractive option,” says Pierre-Louis Théron, cofounder and CEO of Streamroot. He feels providing this approach gives his company a competitive advantage, and he sees a growing use of APIs as content owners seek greater flexibility. The company has one API that controls business logic for delivery and another that offers detailed analytics.
“Our Properties API is server-side; each new viewer using a platform with Streamroot video delivery technology first pings the Streamroot backend,” he says. Streamroot provides a distributed delivery solution that multisources content using both CDNs and mesh networks to deliver content to meet capacity demands.
“We return a unique configuration, and for content owners, this brings two unique functionalities. First, their configuration is applied on all platforms at the same time. But more importantly, everything is applied in real time, in just a few seconds,” says Théron. This means broadcasters can support all their platforms without users needing to do any updates. New configurations are immediately implemented across all devices.
The company’s Data API tracks a variety of traffic and quality metrics, enabling content owners to integrate relevant data into their existing analytics workflows. “Right now broadcasters are using perhaps 20 or 30 different vendors from encoding, CDN, packaging, video player, quality of service (QoS) analytics ... this is a huge ecosystem,” he says. By providing this data, it means operations staff have one less dashboard to open when they’re troubleshooting a problem and can use third-party QoS tools from Nice People at Work, Conviva, or Akamai.
To Théron, the biggest benefit of delivering services via API is that their customers don’t have to ask Streamroot to make every single change or supply data. “I think that’s a big difference compared to a few years ago where most of technology was a kind of a black box,” he says. “When everything is accessible by API, the developer team inside the broadcaster has much more liberty to understand, control, or modify the way the technology’s working. [They can] implement new configurations and understand more how it’s working, because they can gather the information themselves.”
The Self-Serve Model
Companies are always looking for that self-serve customer they don’t have to spend a lot on to service, and API usage easily falls into this category. Most companies put their APIs online with a trial account and offer product documentation. When they’re lucky, developers go online, set up an account, and help themselves to figure out if the API matches their needs. It’s a very egalitarian way of approaching things, and in order for this to work well, the API needs to be easy to understand and have good documentation.
“There is a big difference between software that was designed around APIs and software where the APIs came as an afterthought. When APIs are an afterthought, they are often incomplete and poorly designed,” says Dahl. “How much time has been put into documentation is a pretty good indicator of how good an API is going to be. If the documentation is really good, helpful, comprehensive, and accurate, then I think you can trust the API a little more.”
The other side to this is that developers working with the APIs need to be skilled. “In my experience the quality of the video devs on the other side really matters. I mean, we work with customers who require no help at all. They’ll literally just ask us for the documentation and then they go away and a week later we’re seeing usage,” says Oreper.
The Mux Video API allows for monitoring events within a video workflow.
What’s Not API-Friendly?
Looking at the value chain beginning-to-end, there are parts that are not API-friendly, like live video capture. At a live venue there’s physical infrastructure that has to be used to get content into a camera. Everything up to this point is hardware-driven.
Previously, encoding vendors provided an appliance and users figured out how to interact with it. Usually that meant configuring jobs manually, using templates and watch folders, possibly having to create different templates for different jobs, says Oreper. “There’s still a lot of legacy VOD syndicators that don’t implement API-based workflows,” he says. “You can use multiple hardware-based vendors for your entire workflow and never touch an API. You set everything up by UI. It just becomes harder to manage and much more complicated,” he says.
However, for one-off content processing or people who cannot build automated systems with APIs, the appliance-based workflow has its place. “Traditional on-prem operator-based workflows are probably not going anyway,” says Elliott. “Say, for example, you need to do a one-time re-encode of 20 terabytes of video to a new output format. You would probably use your existing non-API-based desktop encoding workflow to get it done.”
“If you have to support lots of different workflows—VOD, different live inputs—it just gets progressively more difficult to use the legacy deployment model without APIs,” says Oreper. “The reason APIs are so important is things are pretty complex and there’s a million little switches and levers you can pull in order to get the kind of output that you want. To be able to automate the pulling and pushing of those levers and switches is really important because you can implement everything to work programmatically.”
Streamroot’s Properties API gives users the ability to toggle on and off particular rules and settings.
Bring Your ‘A’ Game to Your APIs
As vendors see a growing use of APIs, this not only provides vendors with a competitive advantage, it significantly reduces the time content owners need to deploy software. It’s a bit hard to argue with faster time to market, self-service tools, the ability to build best-of-breed systems, and the flexibility to both try or switch systems as needed. The change this approach is bringing to the video ecosystem is fairly significant.
“In the case where you are building software systems that will be running continuously as part of an internal business operation, or service offering, by using best-of-breed video APIs, you can build workflows that are impossible to create by trying to glue together on-prem software or in-rack solutions,” says Elliott. Others echo this thought.
“By building on top of APIs, our customers cut out months of initial development time, and they don’t have to worry about long-term upgrades and maintenance,” says Dahl. “Anyone selling software B2B today without APIs is doing it wrong, and either needs to rethink their model or risk becoming irrelevant or replaced.”
The most interesting thing is that the API approach has made it much easier for companies to switch out one product for another. Previously, the effort and cost to switch were often too steep to consider. Now it is much easier, and the only cost is a small integration cost. “For most API products today, there’s some sort of replacement available,” says Dahl. “So let’s say you are using Stripe for payment processing, you’re committing your business to that API. But if you really wanted to, you could switch to Braintree.” While this example is for ecommerce, the same could be said for almost every aspect of the video ecosystem.
The advice to take away from this article is that your best PR may not come through your marketing department, but via your API. Developers are choosing APIs that work for their needs, says Elliott, and they can be quick to change if they don’t like your product. For vendors, it makes sense to bring your “A” game to your API delivery, otherwise you may find your customers have given you a thumbs down and moved on to another vendor.
[This article appears in the November/December 2018 issue of Streaming Media Magazine as "The ABCs of APIs."]
While Facebook signaled that it would change Live API permission rules several months ago, some producers were likely still caught off guard.
Patchwork video workflows happen when companies add different providers to their video workflows, and they can seriously hamper quality and development.
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
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.
Brightcove's Zencoder now works with live video events, promising a simple cost-effective solution for publishers.
Companies and Suppliers Mentioned