Skip to main content

EPG Sources

List EPG Sources

curl -X GET https://your-instance.com/api/epg/sources/ \
  -H "Authorization: Bearer YOUR_TOKEN"
Returns all configured EPG sources with their status and configuration details.
id
integer
EPG source ID
name
string
EPG source name
url
string
EPG source URL (XMLTV format)
enabled
boolean
Whether the EPG source is active
last_updated
string
Timestamp of last successful update

Create EPG Source

curl -X POST https://your-instance.com/api/epg/sources/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "XMLTV Guide",
    "url": "https://example.com/epg.xml",
    "enabled": true
  }'
name
string
required
Name for the EPG source
url
string
required
URL to XMLTV EPG data
enabled
boolean
default:"true"
Whether to enable this source

Get EPG Source

curl -X GET https://your-instance.com/api/epg/sources/123/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Update EPG Source

curl -X PUT https://your-instance.com/api/epg/sources/123/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated EPG Source",
    "enabled": false
  }'

Delete EPG Source

curl -X DELETE https://your-instance.com/api/epg/sources/123/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Programs

List Programs

curl -X GET https://your-instance.com/api/epg/programs/ \
  -H "Authorization: Bearer YOUR_TOKEN"
Returns EPG program listings with support for filtering and pagination.
channel
string
Filter by channel TVG ID
start_time
string
Filter programs starting after this time (ISO 8601)
end_time
string
Filter programs ending before this time (ISO 8601)
Search program titles and descriptions
id
integer
Program ID
title
string
Program title
description
string
Program description
start_time
string
Program start time (ISO 8601)
end_time
string
Program end time (ISO 8601)
channel_id
string
Channel TVG ID
category
string
Program category/genre

Get Program

curl -X GET https://your-instance.com/api/epg/programs/456/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Program

curl -X POST https://your-instance.com/api/epg/programs/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Movie Night",
    "description": "Classic film premiere",
    "start_time": "2026-03-03T20:00:00Z",
    "end_time": "2026-03-03T22:00:00Z",
    "channel_id": "hbo.us"
  }'

Update Program

curl -X PUT https://your-instance.com/api/epg/programs/456/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Movie Night",
    "description": "Extended cut premiere"
  }'

Delete Program

curl -X DELETE https://your-instance.com/api/epg/programs/456/ \
  -H "Authorization: Bearer YOUR_TOKEN"

EPG Data

List EPG Data

curl -X GET https://your-instance.com/api/epg/epgdata/ \
  -H "Authorization: Bearer YOUR_TOKEN"
Returns raw EPG data entries associated with channels.

Get EPG Data

curl -X GET https://your-instance.com/api/epg/epgdata/789/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Create EPG Data

curl -X POST https://your-instance.com/api/epg/epgdata/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tvg_id": "hbo.us",
    "display_name": "HBO",
    "icon_url": "https://example.com/hbo.png"
  }'

Update EPG Data

curl -X PUT https://your-instance.com/api/epg/epgdata/789/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "HBO HD"
  }'

Delete EPG Data

curl -X DELETE https://your-instance.com/api/epg/epgdata/789/ \
  -H "Authorization: Bearer YOUR_TOKEN"

EPG Grid

Get EPG Grid

curl -X GET https://your-instance.com/api/epg/grid/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d 'start_time=2026-03-03T00:00:00Z&end_time=2026-03-03T23:59:59Z'
Returns EPG data formatted as a grid for display in a program guide interface.
start_time
string
required
Start time for grid data (ISO 8601)
end_time
string
required
End time for grid data (ISO 8601)
channels
string
Comma-separated list of channel IDs to include
channels
array
Array of channel objects with their programs
time_slots
array
Array of time slot boundaries for the grid

EPG Import

Import EPG Data

curl -X POST https://your-instance.com/api/epg/import/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "source_id": 123,
    "force": false
  }'
Triggers an import of EPG data from configured sources.
source_id
integer
Specific EPG source ID to import (omit to import all)
force
boolean
default:"false"
Force reimport even if recently updated
status
string
Import status (success, pending, failed)
message
string
Status message
imported_count
integer
Number of programs imported

Current Programs

Get Current Programs

curl -X GET https://your-instance.com/api/epg/current-programs/ \
  -H "Authorization: Bearer YOUR_TOKEN"
Returns currently airing programs across all channels.
channels
string
Comma-separated list of channel IDs to filter
programs
array
Array of currently airing program objects with channel info