> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# View Channel's Published Rundown XMLTV format

This endpoint provides access to EPG data in XMLTV format. XMLTV is a standardized XML-based format for exchanging TV listings and EPG data. This endpoint allows you to retrieve comprehensive and structured information about scheduled TV programs, including program names, descriptions, start times, end times, channels, and more. The response will contain the EPG data in XMLTV format, which you can parse and use to display TV program listings in your application.

## Value mapping

### Description

Set in CMS field. Example:

```
<desc lang="en">Video's description</desc>
```

### Keywords

Set in CMS field. Example:

```
<keywords lang="en">dogs, cats,rescue,police,search</keywords>
```

### Language

Set in CMS field. Example:

```
<language lang="en">en</language>
```

### Length

Duration in seconds and minutes of the asset. Example:

```
<length units="seconds">1600.149</length>
<length units="minutes">26.67</length>
```

### Rating

Set in CMS field

```
<rating>
  <value>TV-PG</value>
</rating>
```

### Thumbnail

Will use:

Uploaded custom thumbnail(if any, in case the custom thumbnail flag is set to true), otherwise it will use

The selected auto-generated thumbnail

Example:

```
<icon src="URL_TO_THUMBNAIL" height="1080" width="1920"/>
```

### SeriesId

Set in the CMS field. Example:

```
<seriesId>1784634</seriesId>
```

### Season

Set in the CMS field

```
<season>1</season>
```

### Episode

Set in the CMS field. Example:

```
<episode>2</episode>
```

### Episode Number

Id of the Video.

```
<episode-num system="assetID">VIDEO_ID</episode-num>
```

### Gracenote ID/ TMSID

Set in the CMS field. Example:

```
<tmsid>TMSID</tmsid>
```

### SourceID

Set in the CMS field:

```
<sourceId>SOURCE ID</sourceId>
```

### Categories

The categories are selected in CMS. Each category value selected is translated into a tag:

```
<category lang="en">Season 1</category>
<category lang="en">Documentary</category>
<category lang="en">English</category>
<category lang="en">Action</category>
<category lang="en">Comedy</category>
```

### Published At

Set in the CMS field

```
<date>20230706</date>
```

### Host

Set in the Custom Attributes in CMS

```
<host>Stephen Colbert</host>
```

## Time format:

You can play around with `date_format` and `with_time_zone` to get different formats of `start` and `stop`:

* unix: `<programme start="1690905706821" stop="1690909108639">`
* yyyymmddhhmmss:
  * `<programme start="20230801040146" stop="20230801045828">`
  * valid with `with_time_zone=true`
* yyyymmddhhmm:
  * `<programme start="202308010401" stop="202308010458">`
  * valid with `with_time_zone=true`
* yyyymmddHHmmss (24 hr format). Note the 16 instead of 04 from above formats
  * `<programme start="20230801160146" stop="20230801165828">`
  * valid with `with_time_zone=true`
* yyyymmddHHmm. Note the 16 instead of 04 from above formats
  * `<programme start="202308011601" stop="202308011658">`
  * valid with `with_time_zone=true`
* yyyymmdd:
  * `<programme start="20230801" stop="20230801">`
  * valid with `with_time_zone=true`
* iso8601: `<programme start="20230801T160146" stop="20230801T165828">`

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Playout Scheduler",
    "description": "",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.zype.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/scheduler/v1/channels/{id}/published/rundown/xmltv.xml": {
      "get": {
        "summary": "View Channel's Published Rundown XMLTV format",
        "description": "This endpoint provides access to EPG data in XMLTV format. XMLTV is a standardized XML-based format for exchanging TV listings and EPG data. This endpoint allows you to retrieve comprehensive and structured information about scheduled TV programs, including program names, descriptions, start times, end times, channels, and more. The response will contain the EPG data in XMLTV format, which you can parse and use to display TV program listings in your application.",
        "tags": [
          "EPG"
        ],
        "operationId": "channelXMLTVEPG",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ID of Channel"
          },
          {
            "name": "date_format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unix",
                "iso8601",
                "yyyymmddhhmm",
                "yyyymmddHHmmss",
                "yyyymmddHHmm",
                "yyyymmdd"
              ]
            },
            "description": "Different representation of programme's tag start and stop"
          },
          {
            "name": "with_time_zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "If true, adds UTC timezone in programme's tag start and stop"
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "full",
              "enum": [
                "full",
                "hybrid",
                "slim"
              ]
            },
            "required": false,
            "description": "full return every item without grouping them in collections.\nhybrid return items grouped into collections and single assets.\nslim return only collections."
          },
          {
            "name": "custom_thumbnail",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If true, uses the custom thumbnail from the Assets when they have one."
          }
        ],
        "responses": {
          "200": {
            "description": "Return a channel including it's published information",
            "content": {
              "application/xml": {
                "schema": {
                  "title": "NotFound",
                  "type": "object",
                  "properties": {
                    "xml": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1scheduler~1v2~1uploads/post/responses/404/content/application~1json/schema"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "X-API-Key",
        "in": "header"
      }
    }
  }
}
```