New RESTful Live Streaming API for Broadcasters and Developers

API for Broadcasters and Developers

Here at Dacast, we’re proud to officially announce that version 2 of our Live Streaming API is available. This RESTful JSON API has been designed specifically for quick and easy integration of all of the features of the Dacast streaming service platform into a wide variety of cloud video applications, services, and digital media workflows.

In this blog, we aim to introduce you to the concept of an API, explain what you are now able to build by using our Live Streaming API, and layout some of the basic commands that you can use to manipulate your data with this tool. We’ll also provide a link to our documentation and more resources for learning at the end of this post.

What is an API?

API stands for Application Programming Interface. An Application Programming Interface is a simplified means for sending and retrieving data from a complex computer system—in this case, the Dacast video hosting network and management platform.

An API functions via a system of operations, inputs, outputs, and underlying data types that are standardized across the platform. This creates a common “language” (our API uses the JSON format) using predictable commands and URLs that programmers can use to create their own methods of interacting with their data that’s stored on another network inside a proprietary platform.

The data within the platform will change, and Dacast can continue to add new features and iterate on our technologies, but the API language will remain the same, with one or two new calls added to allow users to harness new abilities without disrupting apps and services built on the existing API.

In practice, an API makes it possible for Dacast users to customize nearly every aspect of the viewing experience, and to manually set up their own methods of uploading, renaming, moving, tagging, accessing, and otherwise managing content on the Dacast platform.

The New Dacast Live Streaming API: Version 2

Version 2 of the Dacast Live Streaming API expands on the features provided by version 1 so our power users and business customers are now able to use all of Dacast’s features without having to log in to their Dacast accounts. This release provides our users with even more power over their content and, we believe, is a compelling reason to consider using our Live Streaming API.

Businesses and organizations seeking total control and customization can go as far as building their own video streaming platform based on the Dacast backend. On a smaller scale, anyone can use our Live Streaming API to easily access data, pull information from their account, upload and edit information via a remote device, code an app, and so on.

Dacast Live Streaming API Features

Features included in the Dacast Live Streaming API are too numerous to list in full, but here are some of the highlights.

Write Files and Channels

Our Live Streaming API allows you to publish videos to your streaming channel directly within your own applications or platforms. This allows you to create a streamlined workflow that can coexist with current software platforms. You can also create and upload videos for on-demand viewing within the Live Streaming API with no need to use Dacast’s website.

Read Files and Channels

Similarly, the Live Streaming API enables control of viewing your content as well. This allows you to program custom interfaces to display your video on unique devices and in otherwise inaccessible situations. You can, for example, even code your own mobile application that can be distributed to users as a central hub for viewing your on-demand and live streaming content within a brand-controlled environment.

You can also use read commands to easily download information from your account, like creating a list of all videos ordered by their duration or the date they were uploaded.

Create New Accounts (and Admins)

With our Live Streaming API, even mundane management tasks like distributing and controlling access to your account don’t require you to use the Dacast platform directly. Instead, this can be done via custom applications or via command line terminals to streamline your workflows. This also includes managing account access control and providing credentials to new users.

Reseller Functionality

Dacast value-added resellers (VARs) purchase access plans to our video hosting platform and then resell it in small chunks to other customers. Thanks to our Live Streaming API, VARs can now create their own video live streaming platform for their customers to use. This platform can be branded as desired, with no need to use the Dacast platform, name, or logo, and will feature all of the Dacast features that are available to our users.

Read and Write Monetization Access

You can also use our Live Streaming API to control monetization settings. For example, configure monetization for new videos on the fly as broadcasts go live and videos are uploaded. You can also access monetization data and change settings for existing videos from the Live Streaming API.

Analytics Access

Dacast maintains a set of detailed analytics for tracking information and performance about who is viewing your content, for how long, from what locations, and so on.

The API allows access to analytics data in a raw form, so you can code your own custom displays, pick out the most relevant metrics, and gather the most important information for your operations. This data can be essential to making informed decisions about marketing and tweaking your approach to future content.

Publish on a Portal

Our Live Streaming API allows you to easily create your own video or audio portals for custom access to your content, with no need to use a Dacast video player or infrastructure. Instead, simply pull your content into your custom-built portal as needed.

File Transcoding Access

One of the most powerful elements of the Dacast system is the ability to transcode files in the cloud into the necessary formats required to reach your intended audience. The new Live Streaming API provides direct access to the powerful server architecture underlying this process, allowing you to implement custom content settings and deliver the precise media files of your choice to your viewers.

Playlist and Package Controls

Dacast’s platform includes the ability to create playlists of content that can be embedded and will play sequentially. Packages, which are usually used to create a collection of content that can be monetized for a single subscription or pay-per-view fee, are another option for bundling content together.

Both of these bundling options can be created, edited, and controlled via the new version 2 Live Streaming API.

Performance Improvements

Our Live Streaming API improvements have also boosted the performance of the platform in general. Now, data requests and operations will be carried out more efficiently and faster, providing for a snappier user experience and higher productivity.

Custom Video Players

The new Live Streaming API also allows full access to the Dacast video player API, so you can customize our white label video player or even roll your own solution to match the branding, style, or feature-needs of your organization. Custom players can support HTML5 or Flash video, support advanced DRM systems, and optimize SEO with metadata and tags.

Custom video players also allow integration with 3rd-party platforms for email capture, take-action prompts, advertising and other monetization, and analytics platforms like Google Analytics, ComScore, and others.

Dacast Live Streaming API Architecture

Modern API’s that are dedicated to editing and controlling the content that is located on another network often use a standard can REST—or Representational State Transfer—to ensure that data is communicated in a robust manner between client and platform.

The new Dacast Live Streaming API is RESTful, which means that it can be accessed from any suitable server or client-side application of your choice. This also means that you can use any programming language of your choice to interact with the API. All that is important is the ability to make HTTP GET and POST requests and to handle responses in the JSON format.

API Basics

The Dacast Live Streaming API commands are split into nine categories that cover all Dacast features. These categories are:

  1. Video on Demand
  2. Live Channel
  3. Playlist
  4. Package
  5. Preferences
  6. Analytics
  7. Account Information
  8. Public Information
  9. List of errors

Each of these categories contains a full listing of commands to manipulate and interact with the Dacast platform. Within each category, subcategories help delineate which commands affect which portion of your operation. For each command, parameters allow you to customize your requests.

Live Channel Commands

For example, the “Live Channel” category includes four sub-categories. These are:

  • 2.1 – Basic Operations
  • 2.2 – Rate Operations
  • 2.3 – Coupon Operations
  • 2.4 – Analytics Operations (which contains depreciated operations that are no longer used in version 2 of our Live Streaming API)

Each of these categories includes a list of operations designed to edit and interact with your data. For example, here is a list of the commands found under section 2.1 – Basic Operations.

  • GET /v2/channel (List channels on your account)
  • POST /v2/channel (Create a new channel)
  • DELETE /v2/channel/{channel_id} (Delete a channel)
  • GET /v2/channel/{channel_id} (Get channel details)
  • PUT /v2/channel/{channel_id} (Update channel details)
  • GET /v2/channel/{channel_id}/embed/{embed_type} (Get channel embed code)
  • DELETE /v2/channel/{channel_id}/splash (Delete Custom Splash Screen)
  • POST /v2/channel/{channel_id}/splash (Upload Custom Splash Screen)
  • GET /v2/channel/{channel_id}/startstream (Get Channel details)
  • DELETE /v2/channel/{channel_id}/thumbnail (Delete Custom Thumbnail)
  • POST /v2/channel/{channel_id}/thumbnail (Upload Custom Thumbnail)
  • POST /v2/channel/{channel_id}/xml (Get Channel XML)

Command Parameters

Most of these commands also have a number of different parameters that can be used to return data in a different order or customize information in other ways.

GET Channel Command

For example, the first command returns a list of all the live channels on your account. Sending this operator to Dacast simply entails entering a URL into your browser (or into a terminal or web-connected app). The full URL for this basic command would be:{your_apikey}.

This command can be customized using three parameters. The first, “sort,” allows you to choose an ascending or descending order to arrange your results. The second parameter, “order by,” chooses the metric by which the results will be sorted. For example, you could sort by title from A to Z with the following parameters:{your_apikey}&order_by=title&sort=DSC.

The third parameter is the filter, which (as the name implies) allows you to filter by more specific attributes. For example, you could filter your list to only contain streams that have a certain name, creation date, pay-per-view setting, duration, and so on. This parameter is added using a variety of tags listed in full in the documentation linked below.

PUT Channel Details Command

As another example, the update channel details command contains a number of parameters allowing you to change every setting related to a given channel. (Note: to edit these parameters, you will need the channel ID number, which can be found using the first GET Channel command.)

Settings that can be customized using this command include:

  • Channel title
  • Description
  • Category
  • Online status (turn the channel on or off)
  • Live counter (allows you enable or disable a counter displaying the number of people watching your channel, and set the threshold for displaying this counter)
  • Google Analytics (enable or disable Google Analytics tracking for this channel)
  • Autoplay (turn on or off)
  • Publish on Dacast (turn on or off publishing on the Dacast portal)
  • External Video Page (the URL of the webpage on which you will publish your channel)
  • Password (allows you to password protect your channel)
  • Referrers ID (ID code of the referrers list to apply to this channel)
  • Countries ID (ID code of the countries list you want to have access to your channel)
  • Theme ID (apply a custom theme to the Dacast video player)
  • Player Size ID (allows you to set the size of the video player window using common presets)
  • Player Width and Height (allows custom video player sizes)
  • NoFrame Security (turn frame security on or off)
  • Splashscreen ID (allows setting custom splash screens or choosing Dacast defaults)
  • Thumbnail ID (allows setting custom thumbnails or choosing Dacast defaults)
  • Custom Data (a field that can be used to store and retrieve metadata)

API Resources

To learn more about the new Dacast Live Streaming API, you can reference our comprehensive documentation found here. If you’re already logged in to your Dacast account, this resource can be found under the Help menu as well.

To generate an API key, which is necessary to use the API, you can visit the API Key preference pane in the Dacast back office. Once you’ve generated an API key, visit the documentation page and input it in the field at the top of the page.

At this point, the documentation page can be used as a sandbox to test various API commands and learn the platform. To test a given command using your account, click a given operation and then click the “sandbox” tab at the top of the documentation for the command. On this page, you can test the command without affecting the data inside your account.

Getting Started with the Dacast Live Streaming API

We’re very excited about the new Dacast Live Streaming API, and we know that many of our customers are as well. We believe it provides a powerful new way to control your data and should enable our users to export our technology into their own platform. If you have an exciting plan for using the Live Streaming API, get in touch with us—we’d love to hear more and possibly feature the story on our blog!

If you already are Dacast users and have issues with our Live Streaming API, please send an email to with your API key, the API call you made, any responses or error messages you received, and the time when you experienced the error. We will get back to you as soon as possible!

Thanks for reading!

Future of Live video streaming

Max Wilbert

Max Wilbert is a passionate writer, live streaming practitioner, and has strong expertise in the video streaming industry.