GraphQL API

Millicast provides a Graph API to query both stats and real time info about the service. The url entry point for the service is:

https://api.millicast.com/graphql

To perform requests to the api, you need to authenticate using a bearer Authorization request header with the Milicast secret api from the Dashboard.

We have temporarily enabled the graphiql UI to perform queries directly via the same url, but id doesn't include the option to append the Authorization header to the requests, so you would need to use a browser extension for including it like ModHeader

Entities

You will be able to query the following entities:

  • Feeds: Information about a publication for a stream by a broadcaster

  • StreamViews: Information about a stream view by a viewer

This information will only be accessible during 30 days after publication/view is ended, and the number of records returned is limited.

Aggregated Stats

Millicast will aggregate the stats for each stream in 5 minutes intervals and provide the following

  • StreamStats: started views, ended views, active views, duration of the views)

  • AccountStats: Aggregated stats in 5 minutes intervals for the global account

The stats will be available without any time limit, so you can perform historical queries.

For example, to find the current active publications you can perform the following query:

{

 feedFindMany(filter: {active: true}) {
  started
  active
  ended
  streamId
 }
}

Did this page help you?