Sardius MediaSupport

Get Public Events for a Channel

Updated

Want to show viewers when you're live, or let them know when your next stream starts? Sardius provides a public calendar endpoint that returns event information for any channel. You can use it to add a "Live Now" banner to your website, display a countdown to your next event, or send viewers straight to your live page.


How It Works

The endpoint returns events from a two-week window: 7 days in the past and 7 days in the future. Depending on the route you choose, it returns your most recent event, your current live event, your next upcoming event, or all of them.

The endpoint is public, so no authentication is required.


Endpoint URL

https://watch.sardius.media/calendar/{accountId}/{channelId}/{route}
ParameterDescription
accountIdYour Sardius account ID
channelIdThe ID of the channel (site) whose events you want to retrieve
routeThe type of event data to return (see below)

Available Routes

RouteWhat It Returns
previousThe most recent past event
liveThe event that is currently live, if there is one
nextThe next upcoming event
eventThe previous, live, and next events together
eventsAll events in the feed
allEverything above in a single response

Example request:

https://watch.sardius.media/calendar/YOUR_ACCOUNT_ID/YOUR_CHANNEL_ID/event

Example Response

Below is a shortened example of a response from the event route. In this example, nothing is live, so live returns an empty object.

{
  "previous": {
    "id": "91",
    "title": "Sunday Service",
    "start": "2023-04-17T09:58:09-05:00",
    "end": "2023-04-17T10:05:00-05:00",
    "timezone": "America/Chicago",
    "locked": false,
    "metadata": {
      "description": "",
      "subtitle": "",
      "eventImage": ""
    },
    "accountId": "YOUR_ACCOUNT_ID",
    "calendarId": "YOUR_CHANNEL_ID",
    "siteId": "YOUR_CHANNEL_ID"
  },
  "live": {},
  "next": {
    "id": "51_51_2023113",
    "title": "Weekly Broadcast",
    "start": "2023-04-23T08:00:00-04:00",
    "end": "2023-04-23T09:00:00-04:00",
    "timezone": "America/New_York",
    "locked": false,
    "metadata": {
      "description": "",
      "subtitle": "",
      "eventImage": ""
    },
    "recurring": {
      "ends": "never",
      "days": ["SU"],
      "interval": 1
    },
    "accountId": "YOUR_ACCOUNT_ID",
    "calendarId": "YOUR_CHANNEL_ID",
    "siteId": "YOUR_CHANNEL_ID"
  }
}

Note: Full responses include additional fields, such as publishing and live encoding settings. The fields below are the ones most useful for displaying events on your site.


Key Fields

FieldDescription
idUnique ID of the event
titleEvent name
start / endEvent start and end times in ISO 8601 format, including the time zone offset
timezoneThe time zone the event was scheduled in
lockedWhether the event is locked
metadata.descriptionEvent description
metadata.subtitleEvent subtitle
metadata.eventImageEvent image, if one is set
recurringPresent on recurring events; shows the repeat schedule (for example, "days": ["SU"] repeats every Sunday)

Related articles