Table of Contents

EPG Component

The EPG component is a page component ("type": "epg") used to render a timeline/grid view of scheduled events by channel.

For developers creating an EPG page, the main setup point is the component configuration key GRID_CONFIGURATION, following the same page-configuration approach used by other components.

Minimal page component entry

{
  "key": "epg",
  "type": "epg",
  "title": "EPG",
  "schema": {
    "mediaType": "epg",
    "title": "EPG",
    "type": "epg",
    "columns": [],
    "filters": [],
    "formPageKey": "epg-edition-page",
    "formComponentKey": "epg-form",
    "contentPageKey": "epg-contents-edition-page",
    "listPageKey": "epg-list-page",
    "configuration": {
      "editable": false,
      "limit": 1000,
      "channelPageSize": 10,
      "timezone": "America/Sao_Paulo"
    }
  }
}

SECTION_BEHAVIORS is not supported

The EPG block shares the list configuration, so a SECTION_BEHAVIORS row binds without error, but the EPG schema never carries it: this block cannot be shown or hidden from a field value. See FormComponent — SECTION_BEHAVIORS for the blocks that support it.

GRID_CONFIGURATION

GRID_CONFIGURATION is a JSON object that defines how the EPG page maps channel data, event dates, event content, and navigation targets.

Properties

channels

Defines where channel data comes from and how channel fields are mapped. From 7.1 it also decides where the curated Channels filter loads its options (see filters).

Property Type Description
channels.relationPath string[] Ordered mediatype path from the event to the channel entity.
channels.fields.id string Channel identifier field.
channels.fields.title string Channel display-name field.
channels.fields.logo string Channel logo/image field.

Example:

"channels": {
  "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM", "EPG_CHANNEL"],
  "fields": {
    "id": "ID",
    "title": "NAME",
    "logo": "ICON"
  }
}

lineup

Defines where lineup (channel grouping) data comes from and how lineup fields are mapped. Consumed by GET /api/v2/epg/lineups?page=&limit= to populate the lineup selector that filters which channels are loaded by the data endpoint.

Property Type Description
lineup.relationPath string[] Ordered mediatype path to the lineup entity. For a standalone lineup table use a single-element path (e.g. ["LINEUP"]).
lineup.fields.id string Lineup identifier field.
lineup.fields.title string Lineup display-name field.

Default (used when GRID_CONFIGURATION is absent or omits lineup):

"lineup": {
  "relationPath": ["LINEUP"],
  "fields": {
    "id": "ID",
    "title": "NAME"
  }
}

Endpoint response shape:

{
  "total": 3,
  "items": [
    { "id": 1, "title": "Sports channels" },
    { "id": 2, "title": "News and entertainment" },
    { "id": 3, "title": "Kids and family" }
  ]
}

gridItems

Maps event date columns to the normalized keys expected by the EPG UI.

Property Type Description
gridItems.startDate string Source field for event start date/time.
gridItems.endDate string Source field for event end date/time.
gridItems.lastUpdated string Source field for update timestamp.

Example:

"gridItems": {
  "startDate": "START_DATETIME",
  "endDate": "END_DATETIME",
  "lastUpdated": "MIB_LAST_UPDATE"
}

contentFields

Defines which related fields become properties of each event's content object.

Property Type Description
contentFields[].name string Output property name in content (for example title, image, id).
contentFields[].columnName string Source field name in the target entity.
contentFields[].relationPath string[] Ordered mediatype path from event to the entity that owns columnName.
contentFields[].type string Field type used by the UI mapping (for example Varchar, Text, Integer, Image).

Example:

"contentFields": [
  {
    "name": "title",
    "columnName": "NAME",
    "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
    "type": "Varchar"
  },
  {
    "name": "image",
    "columnName": "ID",
    "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM", "MVP_MOVIES", "IMAGES"],
    "type": "Image"
  },
  {
    "name": "id",
    "columnName": "ID",
    "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
    "type": "Integer"
  }
]

filters

Declares the curated filter panel for the EPG grid. Each entry becomes a filter the UI renders; entries with shortcutFilter: true appear in the quick-filter bar, while the generic field-derived filters stay available as advanced filters. When GRID_CONFIGURATION is absent or omits filters, the default set below (Title, ID, Channel, Preset Date) is used.

In Add filter, the curated filters and the generic fields of the EPG media type are one group, labelled with the page title: the curated filters come first, then the remaining generic fields, and a generic field whose column name equals a curated filter's name (ID next to the curated id) is listed once, as the curated one. Up to 7.0 the curated filters were a group of their own, labelled with the raw media type name, so the media type selector offered the EPG media type twice (MEDIAIBOX-12289). A related media type declared in both directions in ADM_RELATEDS was also listed twice until 7.0.5 (MEDIAIBOX-12338).

Property Type Description
filters[].name string Front-facing filter key emitted as config.name (for example content.title, id, channel.id, rangeDate). Must be unique across filters.
filters[].label string Display label shown in the filter UI.
filters[].variant string UI control: input, number, select, range, or date.
filters[].relationPath string[] Ordered mediatype path from the event to the entity that owns columnName. Used to translate the applied filter into a query condition. Omit for fields on the schedule itself.
filters[].columnName string Source field the filter maps to when applied.
filters[].shortcutFilter bool When true, the filter shows in the quick-filter bar.
filters[].operatorOptions { value, label }[] Operator list with explicit display labels (for example { "value": "Contains", "label": "Contains" }).
filters[].operators string[] Shorthand operator list (labels derived). Use operatorOptions when you need custom labels; prefer one or the other.
filters[].presetOptions { label, value }[] Preset shortcuts for range filters (for example Today, Next Week). Ignored by other variants.
filters[].optionsLimit int For select filters (7.1): the maximum number of options loaded. Unset or 0 keeps the default page size, 20 options. Ignored by other variants.

For select filters the option list is not declared here: it is loaded when the schema is built, from the channel media type and honouring the user's lineup. From 7.1 (MEDIAIBOX-12288) that media type is the grid's own: the last entry of channels.relationPath, read with channels.fields.id and channels.fields.title; with a lineup, the lineup's channel ids are resolved against that media type too. A page that maps its channels onto ["availability", "channel"] therefore lists the rows of channel, and the option ids are the values the grid filters on. Up to 7.0 the options always came from EPG_CHANNEL, whatever channels said, so on such a page the dropdown was empty. Without optionsLimit only the first 20 channels are offered (the default page size): set it on pages with more channels. A page on the default channels definition sees no change.

Default (used when GRID_CONFIGURATION is absent or omits filters):

"filters": [
  {
    "name": "content.title",
    "label": "Title",
    "variant": "input",
    "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
    "columnName": "NAME",
    "shortcutFilter": true,
    "operatorOptions": [
      { "value": "Contains", "label": "Contains" },
      { "value": "like", "label": "Like" },
      { "value": "StartsWith", "label": "Starts With" }
    ]
  },
  {
    "name": "id",
    "label": "Id",
    "variant": "number",
    "columnName": "ID",
    "shortcutFilter": true,
    "operatorOptions": [
      { "value": "Equal", "label": "Equals" },
      { "value": "NotEqual", "label": "Not Equal To" },
      { "value": "GreaterThan", "label": "Greater Than" },
      { "value": "LessThan", "label": "Less Than" }
    ]
  },
  {
    "name": "channel.id",
    "label": "Channels",
    "variant": "select",
    "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM", "EPG_CHANNEL"],
    "columnName": "ID",
    "shortcutFilter": true,
    "operatorOptions": [
      { "value": "Equal", "label": "Equals" }
    ]
  },
  {
    "name": "rangeDate",
    "label": "Preset Date",
    "variant": "range",
    "columnName": "START_DATETIME",
    "shortcutFilter": true,
    "operatorOptions": [
      { "value": "Between", "label": "Between" }
    ],
    "presetOptions": [
      { "label": "Today", "value": "today" },
      { "label": "Tomorrow", "value": "tomorrow" },
      { "label": "Yesterday", "value": "yesterday" },
      { "label": "Next Week", "value": "nextweek" },
      { "label": "Previous Week", "value": "previousweek" },
      { "label": "Next 2 Weeks", "value": "next2weeks" },
      { "label": "Last 2 Weeks", "value": "last2weeks" }
    ]
  }
]

These keys define where the EPG page navigates for edit flows.

Property Type Description
formPageKey string Page key used to open event editing.
formComponentKey string Component key of the target form component in the event edit page.
contentPageKey string Page key used to open related content editing.
listPageKey string Page key used to return to the EPG list/grid page.

configuration

General runtime behavior for the EPG grid.

Property Type Default Description
configuration.editable bool false Enables/disables inline editing on the grid.
configuration.limit int 1000 Maximum number of events loaded per request.
configuration.channelPageSize int 10 Number of channels loaded per page.
configuration.timezone string null IANA timezone used to display and interpret event dates.

Example:

"configuration": {
  "editable": false,
  "limit": 1000,
  "channelPageSize": 10,
  "timezone": "America/Sao_Paulo"
}

Full GRID_CONFIGURATION example

{
  "channels": {
    "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM", "EPG_CHANNEL"],
    "fields": {
      "id": "ID",
      "title": "NAME",
      "logo": "ICON"
    }
  },
  "lineup": {
    "relationPath": ["LINEUP"],
    "fields": {
      "id": "ID",
      "title": "NAME"
    }
  },
  "gridItems": {
    "startDate": "START_DATETIME",
    "endDate": "END_DATETIME",
    "lastUpdated": "MIB_LAST_UPDATE"
  },
  "contentFields": [
    {
      "name": "title",
      "columnName": "NAME",
      "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
      "type": "Varchar"
    },
    {
      "name": "description",
      "columnName": "DESCRIPTION",
      "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
      "type": "Text"
    },
    {
      "name": "image",
      "columnName": "ID",
      "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM", "MVP_MOVIES", "IMAGES"],
      "type": "Image"
    },
    {
      "name": "id",
      "columnName": "ID",
      "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
      "type": "Integer"
    }
  ],
  "filters": [
    {
      "name": "content.title",
      "label": "Title",
      "variant": "input",
      "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM"],
      "columnName": "NAME",
      "shortcutFilter": true,
      "operatorOptions": [
        { "value": "Contains", "label": "Contains" },
        { "value": "like", "label": "Like" },
        { "value": "StartsWith", "label": "Starts With" }
      ]
    },
    {
      "name": "id",
      "label": "Id",
      "variant": "number",
      "columnName": "ID",
      "shortcutFilter": true,
      "operatorOptions": [
        { "value": "Equal", "label": "Equals" },
        { "value": "NotEqual", "label": "Not Equal To" },
        { "value": "GreaterThan", "label": "Greater Than" },
        { "value": "LessThan", "label": "Less Than" }
      ]
    },
    {
      "name": "channel.id",
      "label": "Channels",
      "variant": "select",
      "relationPath": ["EPG_SCHEDULE", "EPG_PROGRAM", "EPG_CHANNEL"],
      "columnName": "ID",
      "shortcutFilter": true,
      "operatorOptions": [
        { "value": "Equal", "label": "Equals" }
      ]
    },
    {
      "name": "rangeDate",
      "label": "Preset Date",
      "variant": "range",
      "columnName": "START_DATETIME",
      "shortcutFilter": true,
      "operatorOptions": [
        { "value": "Between", "label": "Between" }
      ],
      "presetOptions": [
        { "label": "Today", "value": "today" },
        { "label": "Tomorrow", "value": "tomorrow" },
        { "label": "Yesterday", "value": "yesterday" },
        { "label": "Next Week", "value": "nextweek" },
        { "label": "Previous Week", "value": "previousweek" },
        { "label": "Next 2 Weeks", "value": "next2weeks" },
        { "label": "Last 2 Weeks", "value": "last2weeks" }
      ]
    }
  ],
  "formPageKey": "epg-edition-page",
  "formComponentKey": "epg-form",
  "contentPageKey": "epg-contents-edition-page",
  "listPageKey": "epg-list-page",
  "configuration": {
    "editable": false,
    "limit": 1000,
    "channelPageSize": 10,
    "timezone": "America/Sao_Paulo"
  }
}

Search history

From 7.1 the EPG page can record the filters the operator applies, so the Search history and Save filters entries of the filters gear menu work on an EPG page as on a list (MEDIAIBOX-12293). Each change of the applied filters is sent once to:

POST /api/v2/epg/search-history
{
  "pageKey": "epg-list-page",
  "templateComponentKey": "epg",
  "criteria": {
    "mediaType": "EPG_SCHEDULE",
    "clause": "AND",
    "conditions": [
      { "mediaType": "EPG_SCHEDULE", "field": "content.title", "operator": "Contains", "value": "news" },
      { "mediaType": "EPG_SCHEDULE", "field": "channel.id", "operator": "Equal", "value": "24" }
    ]
  }
}
  • 200 with an empty body: the search is recorded for the current user, page key and component key. clause defaults to AND.
  • 400: pageKey or templateComponentKey is missing, there are no conditions, or a condition has no field. Nothing is recorded.
  • The entries come back through GET /api/v2/list/search-history/{pageKey}/{templateComponentKey}, newest first and capped by AdvancedSearchHistoryMaxSize (10 by default); POST /api/v2/list/filter/{id}/{name} promotes one to a saved filter. Array values come back as JSON text ("[24,25]"), as for any other entry.

POST /api/v2/epg/data records nothing: the grid calls it once per time-zone window and per channel page, and it receives the channel filter as displayChannels and the dates in UTC, so an entry taken there could not be re-applied. Up to 7.0 no v2 EPG request recorded anything, so the history was always empty on EPG pages and Save filters had nothing to promote. The legacy MVC EPG page already recorded its searches and is unchanged. Mounting the menu entry and sending the request from the React EPG is the frontend half of the fix (MEDIAIBOX-12294).