### Install Frontend Dependencies and Start Dev Server Source: https://github.com/dispatcharr/dispatcharr/blob/main/CONTRIBUTING.md Navigate to the frontend directory, install Node.js dependencies using npm, and start the development server. This server includes Hot Module Replacement (HMR) and proxies API requests to the Django backend. ```bash cd frontend npm install npm run dev ``` -------------------------------- ### Start Full Stack Backend with Docker Compose Source: https://github.com/dispatcharr/dispatcharr/blob/main/CONTRIBUTING.md Use this command to start the full backend stack in modular mode with separate Docker containers. Ensure Docker and Docker Compose are installed. ```bash docker compose -f docker/docker-compose.dev.yml up ``` -------------------------------- ### Install Plugin Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/plugins-connect.md Installs a plugin from the repository using its ID and version. Requires administrator authentication. ```http POST /api/plugins/ Authorization: Bearer {access_token} Content-Type: application/json { "plugin_id": "emby-sync", "version": "1.0.0" } ``` -------------------------------- ### Install Plugin Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/plugins-connect.md Installs a new plugin from a repository using its ID and version. ```APIDOC ## POST /api/plugins/ ### Description Install a plugin from repository. ### Method POST ### Endpoint /api/plugins/ ### Request Body - **plugin_id** (string) - Required - The ID of the plugin to install - **version** (string) - Required - The version of the plugin to install ### Request Example ```json { "plugin_id": "emby-sync", "version": "1.0.0" } ``` ### Response (201 Created) Installed plugin object ``` -------------------------------- ### Python Login Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Example of how to make a POST request to the login endpoint using the Python requests library. ```python import requests response = requests.post('http://localhost:9191/api/accounts/auth/login/', json={ 'username': 'admin', 'password': 'mypassword' }) tokens = response.json() access_token = tokens['access'] ``` -------------------------------- ### Output Profile Parameters Examples Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Provides example FFmpeg parameters for various output profile presets. Ensure output profiles read from stdin (`pipe:0`) and write to stdout (`pipe:1`). ```Text 720p H.264 | -i pipe:0 -c:v libx264 -b:v 2000k -vf scale=-2:720 -c:a copy -f mpegts pipe:1 1080p H.264 | -i pipe:0 -c:v libx264 -b:v 5000k -c:a copy -f mpegts pipe:1 Audio Only AAC | -i pipe:0 -vn -c:a aac -b:a 128k -f adts pipe:1 fMP4 Container | -i pipe:0 -c:v copy -c:a copy -f mp4 -movflags frag_keyframe+empty_moov pipe:1 ``` -------------------------------- ### Example GitHub Raw Content URL Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md This is an example URL for hosting a plugin manifest on GitHub Pages using raw content. Ensure your manifest.json is in the specified path. ```text https://raw.githubusercontent.com/myorg/my-plugins/main/manifest.json ``` -------------------------------- ### Stream Profile Parameter Examples Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Examples of command-line parameters for different streaming tools. These parameters are used within the 'parameters' field when creating or updating a stream profile. ```text Streamlink: -p {userAgent} --loglevel none {streamUrl} best -o pipe:1 VLC: --user-agent={userAgent} {streamUrl} --sout=#standard{{access=pipe{{id=out}},dst=-}} YouTube-DL: -U {userAgent} {streamUrl} -f best -o - FFmpeg: -user_agent {userAgent} -i {streamUrl} -c copy -f mpegts pipe:1 ``` -------------------------------- ### Channel List Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/channels.md Example JSON response for the channel listing endpoint, showing channel details and pagination. ```json { "count": 250, "next": "http://localhost:9191/api/channels/channels/?page=2", "previous": null, "results": [ { "id": 1, "name": "BBC One", "tvg_id": "bbc.one.uk", "tvg_name": "BBC One", "logo": 1, "number": 101, "group": 1, "is_adult": false, "epg_data": { "id": 123, "title": "Current Program", "description": "Program description", "start": "2024-03-15T20:00:00Z", "end": "2024-03-15T21:00:00Z" }, "custom_properties": {}, "updated_at": "2024-03-15T10:30:00Z" } ] } ``` -------------------------------- ### List Permissions Response Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Example JSON response for the GET /api/accounts/permissions/ endpoint, showing permission details. ```json [ { "id": 1, "name": "Can add user", "codename": "add_user" }, { "id": 2, "name": "Can change user", "codename": "change_user" }, { "id": 3, "name": "Can delete user", "codename": "delete_user" } ] ``` -------------------------------- ### Channel Profile Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/channels.md This is an example of a successful response when listing channel profiles, showing the structure of a single profile object. ```JSON { "count": 10, "results": [ { "id": 1, "name": "Main Profile", "description": "Main viewing profile", "is_main": true, "users": [1, 2, 3], "channel_count": 150, "is_active": true, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-03-15T10:30:00Z" } ] } ``` -------------------------------- ### Watchlist Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/vod.md Example of a successful response when managing a movie's watchlist status. ```json { "id": 1, "title": "Inception", "is_watchlist": true } ``` -------------------------------- ### Full Per-Plugin Manifest Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md An example of a complete per-plugin manifest for the 'weather_display' plugin. It includes detailed information about the plugin, its latest version, and a list of all available versions with their respective details like URLs, checksums, build timestamps, and compatibility. ```json { "slug": "weather_display", "name": "Weather Display", "description": "Shows weather information on the Dispatcharr dashboard", "author": "Acme Labs", "license": "MIT", "latest_version": "1.2.5", "registry_name": "Acme Labs Plugins", "registry_url": "https://github.com/acmelabs/dispatcharr-plugins", "versions": [ { "version": "1.2.5", "url": "releases/weather_display-1.2.5.zip", "checksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "size": 142, "build_timestamp": "2025-01-20T15:30:00Z", "commit_sha": "4e8f1b108c1e84f60520710d13e54eb2fb519648", "commit_sha_short": "4e8f1b1", "min_dispatcharr_version": "2.5.0", "max_dispatcharr_version": null }, { "version": "1.2.5-rc.1", "url": "releases/weather_display-1.2.5-rc.1.zip", "checksum_sha256": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2", "size": 141, "prerelease": true, "build_timestamp": "2025-01-18T09:00:00Z", "min_dispatcharr_version": "2.5.0" }, { "version": "1.2.4", "url": "releases/weather_display-1.2.4.zip", "checksum_sha256": "d4d967a67a4947e55183308cece206b30dda3e1b4fe00aae60f45a49c83b7ed6", "size": 138, "build_timestamp": "2025-01-15T10:00:00Z", "min_dispatcharr_version": "2.4.0" } ], "latest": { "version": "1.2.5", "url": "releases/weather_display-1.2.5.zip", "latest_url": "releases/weather_display-latest.zip", "checksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "size": 142, "build_timestamp": "2025-01-20T15:30:00Z", "min_dispatcharr_version": "2.5.0" } } ``` -------------------------------- ### Setup Media Server Integration Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/README.md Endpoints for connecting and testing integration with media servers like Emby. ```APIDOC ## Add media server connection ### Description Adds a connection to a media server. ### Method POST ### Endpoint /api/connect/ ``` ```APIDOC ## Test media server connection ### Description Tests the connection to a previously added media server. ### Method POST ### Endpoint /api/connect/{connectionId}/test/ ``` -------------------------------- ### Full Signing Workflow Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md A comprehensive bash script demonstrating the entire signing workflow, from key generation to combining the signature with the manifest. ```bash # Generate a keypair (one-time) gpg --gen-key # Export your public key (give this to repo users) gpg --armor --export "your@email.com" > my-repo.pub # Build your manifest cat > manifest.json << 'EOF' { "manifest": { "registry_name": "My Repo", "root_url": "https://example.com/releases", "plugins": [ { "slug": "my_plugin", "name": "My Plugin", "latest_version": "1.0.0", "latest_url": "plugins/my_plugin/my_plugin-1.0.0.zip" } ] } } EOF # Sign the manifest object (canonical JSON + newline) jq -c '.manifest' manifest.json | gpg --armor --detach-sign > manifest.sig # Combine into final output jq --arg sig "$(cat manifest.sig)" '.signature = $sig' manifest.json > signed_manifest.json ``` -------------------------------- ### Minimal Docker Setup Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/configuration.md Run Dispatcharr with essential environment variables and port mapping. Mounts a volume for data persistence. ```bash docker run -d \ -e DATABASE_URL="postgresql://user:pass@postgres:5432/dispatcharr" \ -e REDIS_URL="redis://redis:6379" \ -e SECRET_KEY="your-secret-key-here" \ -e ALLOWED_HOSTS="dispatcharr.local,192.168.1.100" \ -p 9191:9191 \ -v dispatcharr_data:/data \ ghcr.io/dispatcharr/dispatcharr:latest ``` -------------------------------- ### Series Seasons and Episodes Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/vod.md Example JSON response for retrieving all seasons and episodes of a series. ```json { "series_id": 1, "series_title": "Breaking Bad", "total_seasons": 5, "seasons": [ { "season_number": 1, "episode_count": 7, "first_air_date": "2008-01-20", "episodes": [ { "episode_number": 1, "title": "Pilot", "description": "When an underemployed high school chemistry teacher...", "air_date": "2008-01-20", "rating": 8.5, "watched": false, "stream_count": 2 }, { "episode_number": 2, "title": "Cat's in the Bag", "description": "Walt and Jesse face the consequences of their actions...", "air_date": "2008-01-27", "rating": 8.2, "watched": false, "stream_count": 2 } ] } ] } ``` -------------------------------- ### Channel Streams Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/channels.md Example JSON response for fetching streams of a channel, including stream details and pagination. ```json { "count": 5, "results": [ { "id": 1, "name": "Stream 1", "url": "http://example.com/stream1.m3u8", ... }, { "id": 2, "name": "Stream 2 (Backup)", "url": "http://example.com/stream2.m3u8", ... } ] } ``` -------------------------------- ### Initialize Superuser Response (Superuser Exists) Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Example JSON response when a superuser already exists during the initialization attempt. ```json { "superuser_exists": true } ``` -------------------------------- ### Bulk Update Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/channels.md This is an example of a successful response after performing a bulk update of channel memberships, indicating the number of updated items and a confirmation message. ```JSON { "updated_count": 2, "message": "2 channel memberships updated" } ``` -------------------------------- ### Quick Start with Docker Source: https://github.com/dispatcharr/dispatcharr/blob/main/README.md This snippet shows how to pull the latest Dispatcharr Docker image and run it as a detached container. Customize ports and volumes as needed. ```bash docker pull ghcr.io/dispatcharr/dispatcharr:latest docker run -d \ -p 9191:9191 \ --name dispatcharr \ -v dispatcharr_data:/data \ ghcr.io/dispatcharr/dispatcharr:latest ``` -------------------------------- ### PGP Public Key Block Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md This is an example of a standard PGP/GPG armored public key block format. ```text -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBG... ... -----END PGP PUBLIC KEY BLOCK----- ``` -------------------------------- ### Make HTTP Request with Timeout and Error Handling Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugins.md Perform an HTTP GET request to a specified URL with a timeout and robust error handling. This example uses the `requests` library to fetch data from an endpoint. ```python import requests resp = requests.get(url, timeout=10) resp.raise_for_status() data = resp.json() ``` -------------------------------- ### Movie Streams Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/vod.md Example of a successful response containing movie stream information. ```json { "movie_id": 1, "movie_title": "Inception", "stream_count": 3, "streams": [ { "id": 1, "name": "Inception HD", "url": "http://example.com:8080/live/user/pass/123", "m3u_account": 1, "stream_profile": 1, "is_available": true }, { "id": 2, "name": "Inception 4K", "url": "http://example.com:8080/live/user/pass/456", "m3u_account": 1, "stream_profile": 2, "is_available": true } ] } ``` -------------------------------- ### Series List Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/vod.md Example JSON response when listing TV series, showing total count and details of the first result. ```json { "count": 650, "results": [ { "id": 1, "title": "Breaking Bad", "description": "A chemistry teacher turned meth cooker partners with a student...", "year_started": 2008, "year_ended": 2013, "total_seasons": 5, "total_episodes": 62, "rating": 9.5, "content_rating": "TV-14", "genres": ["Crime", "Drama", "Thriller"], "poster_url": "http://example.com/posters/breaking-bad.jpg", "backdrop_url": "http://example.com/backdrops/breaking-bad.jpg", "creator": "Vince Gilligan", "cast": "Bryan Cranston, Aaron Paul, Anna Gunn", "imdb_id": "tt0903747", "tmdb_id": 1396, "plot": "A meticulous chemistry teacher resorts to a unlikely profession...", "is_watchlist": false, "user_rating": null, "watched_episodes": 0, "status": "ended", "next_episode": null, "m3u_account": 1, "created_at": "2024-01-15T00:00:00Z", "updated_at": "2024-03-15T10:30:00Z" } ] } ``` -------------------------------- ### EPG Program Data Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/epg.md This is an example of a successful response (200 OK) when requesting EPG program data. It includes details for multiple programs. ```json { "count": 5420, "next": "http://localhost:9191/api/epg/epgdata/?page=2", "previous": null, "results": [ { "id": 1, "channel": 1, "channel_tvg_id": "bbc.one.uk", "title": "Breaking News", "description": "Live coverage of breaking events", "category": "News", "start_time": "2024-03-15T20:00:00Z", "end_time": "2024-03-15T20:30:00Z", "duration_minutes": 30, "rating": "PG", "icon_url": "http://example.com/icons/breaking.jpg", "director": "Various", "actors": "Reporter, Correspondent", "original_air_date": "2024-03-15", "episode_number": null, "season_number": null, "series_name": null, "created_at": "2024-03-15T19:55:00Z", "updated_at": "2024-03-15T19:55:00Z" }, { "id": 2, "channel": 1, "channel_tvg_id": "bbc.one.uk", "title": "EastEnders", "description": "British soap opera", "category": "Drama", "start_time": "2024-03-15T20:30:00Z", "end_time": "2024-03-15T21:00:00Z", "duration_minutes": 30, "rating": "12", "icon_url": "http://example.com/icons/eastenders.jpg", "director": "Various", "actors": "Jessie Wallace, Max Bowden", "original_air_date": "2024-03-15", "episode_number": 6742, "season_number": 39, "series_name": "EastEnders", "created_at": "2024-03-15T19:55:00Z", "updated_at": "2024-03-15T19:55:00Z" } ] } ``` -------------------------------- ### Specific Episode Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/vod.md Example JSON response for retrieving details of a single episode, including stream information. ```json { "id": 1, "series_id": 1, "series_title": "Breaking Bad", "season_number": 1, "episode_number": 1, "title": "Pilot", "description": "When an underemployed high school chemistry teacher...", "air_date": "2008-01-20", "duration_minutes": 58, "rating": 8.5, "watched": false, "user_rating": null, "stream_count": 2, "streams": [ { "id": 1, "name": "Breaking Bad S01E01", "url": "http://example.com/stream", "m3u_account": 1 } ] } ``` -------------------------------- ### Production Docker Setup Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/configuration.md Configure Dispatcharr for production with security settings, SSL redirects, and specific storage paths. Includes volume mounts for data and recordings. ```bash docker run -d \ -e DEBUG="false" \ -e SECRET_KEY="$(openssl rand -hex 32)" \ -e DATABASE_URL="postgresql://user:pass@postgres:5432/dispatcharr" \ -e REDIS_URL="redis://redis:6379" \ -e ALLOWED_HOSTS="dispatcharr.example.com" \ -e SECURE_SSL_REDIRECT="true" \ -e SESSION_COOKIE_SECURE="true" \ -e SECURE_HSTS_SECONDS="31536000" \ -e DVR_STORAGE_PATH="/data/recordings" \ -e DVR_RETENTION_DAYS="90" \ -p 9191:9191 \ -v dispatcharr_data:/data \ -v /mnt/large_disk/recordings:/data/recordings \ ghcr.io/dispatcharr/dispatcharr:latest ``` -------------------------------- ### Time and Duration Format Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/types.md API responses use seconds for durations. This example shows duration in seconds and minutes. ```json { "duration_seconds": 3600, "duration_minutes": 60 } ``` -------------------------------- ### Channel Stream Statistics Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/channels.md Example JSON response for channel stream statistics, showing overall metrics and individual stream performance. ```json { "channel_id": 1, "total_streams": 5, "active_streams": 4, "average_viewers": 12, "streams": [ { "stream_id": 1, "name": "Stream 1", "current_viewers": 15, "status": "healthy", "last_check": "2024-03-15T10:30:00Z" } ] } ``` -------------------------------- ### Minimal Repo Manifest (JSON) Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md This is the simplest valid repo manifest, containing a single plugin with essential information for display and installation. It does not include signing. ```json { "registry_name": "My Plugin Repo", "plugins": [ { "slug": "my_plugin", "name": "My Plugin", "description": "Does something useful", "author": "Your Name", "latest_version": "1.0.0", "latest_url": "https://example.com/releases/my_plugin-1.0.0.zip" } ] } ``` -------------------------------- ### POST /api/channels/recordings/ Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/channels.md Create a new recording request with specified channel, start, and end times. ```APIDOC ## POST /api/channels/recordings/ ### Description Create a new recording request. ### Method POST ### Endpoint /api/channels/recordings/ #### Request Body - **channel** (integer) - Required - Channel ID to record - **start_time** (datetime) - Required - Recording start time (ISO 8601) - **end_time** (datetime) - Required - Recording end time (ISO 8601) ### Request Example { "channel": 1, "start_time": "2024-03-20T20:00:00Z", "end_time": "2024-03-20T21:00:00Z" } ### Response (201 Created) Created recording object ``` -------------------------------- ### Manifest Structure with Signature Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md Example JSON structure for a manifest that includes the detached PGP signature alongside the manifest data. ```json { "manifest": { "registry_name": "...", "plugins": [...] }, "signature": "-----BEGIN PGP SIGNATURE-----\n...\n-----END PGP SIGNATURE-----" } ``` -------------------------------- ### JWT Token Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/types.md Illustrates the structure of a JSON Web Token (JWT), which consists of three parts separated by dots. ```text eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ``` -------------------------------- ### Get Environment and System Information Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Fetches detailed environment and system information, including debug status, database type, and available services. Authentication is required and recommended for administrators. ```text GET /api/core/settings/env/ Authorization: Bearer {access_token} ``` ```json { "debug": false, "environment": "production", "database": "postgresql", "redis_available": true, "celery_available": true, "python_version": "3.13.1", "django_version": "6.0.6", "drf_version": "3.17.1", "allowed_hosts": ["localhost", "127.0.0.1", "dispatcharr.local"], "cors_allowed_origins": ["http://localhost:3000"], "timezone": "UTC" } ``` -------------------------------- ### List User Groups Response Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Example response structure for listing user groups, showing group ID, name, and associated permissions. ```json [ { "id": 1, "name": "moderators", "permissions": [5, 10, 23] } ] ``` -------------------------------- ### GET /api/epg/epgdata/ Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/epg.md Lists all EPG program data, supporting filtering by channel, time, and pagination. This endpoint is useful for retrieving a list of programs to display in a guide or schedule. ```APIDOC ## GET /api/epg/epgdata/ ### Description Lists all EPG program data, supporting filtering by channel, time, and pagination. This endpoint is useful for retrieving a list of programs to display in a guide or schedule. ### Method GET ### Endpoint /api/epg/epgdata/ ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number for pagination. - **page_size** (integer) - Optional - Results per page (default: 20). - **channel** (integer) - Optional - Filter by channel ID. - **channel__tvg_id** (string) - Optional - Filter by channel TVG ID. - **start_time__gte** (datetime) - Optional - Filter programs starting after this time. - **start_time__lte** (datetime) - Optional - Filter programs starting before this time. ### Request Example ``` GET /api/epg/epgdata/?page=1&channel__tvg_id=bbc.one.uk&start_time__gte=2024-03-15 Authorization: Bearer {access_token} ``` ### Response #### Success Response (200 OK) - **count** (integer) - Total number of results. - **next** (string) - URL for the next page of results. - **previous** (string) - URL for the previous page of results. - **results** (array) - List of EPG program objects. - **id** (integer) - EPG data record ID. - **channel** (integer) - Associated channel ID. - **channel_tvg_id** (string) - Channel TVG ID. - **title** (string) - Program title. - **description** (string) - Program description. - **category** (string) - Program category/genre. - **start_time** (datetime) - Program start time (UTC). - **end_time** (datetime) - Program end time (UTC). - **duration_minutes** (integer) - Calculated duration. - **rating** (string) - Content rating (PG, 12, 15, 18, etc.). - **icon_url** (string) - Program icon/thumbnail URL. - **director** (string) - Director name(s). - **actors** (string) - Actor names. - **original_air_date** (date) - Original broadcast date. - **episode_number** (integer) - Episode number (for series). - **season_number** (integer) - Season number (for series). - **series_name** (string) - Series name (for series). - **created_at** (datetime) - Timestamp when the record was created. - **updated_at** (datetime) - Timestamp when the record was last updated. #### Response Example ```json { "count": 5420, "next": "http://localhost:9191/api/epg/epgdata/?page=2", "previous": null, "results": [ { "id": 1, "channel": 1, "channel_tvg_id": "bbc.one.uk", "title": "Breaking News", "description": "Live coverage of breaking events", "category": "News", "start_time": "2024-03-15T20:00:00Z", "end_time": "2024-03-15T20:30:00Z", "duration_minutes": 30, "rating": "PG", "icon_url": "http://example.com/icons/breaking.jpg", "director": "Various", "actors": "Reporter, Correspondent", "original_air_date": "2024-03-15", "episode_number": null, "season_number": null, "series_name": null, "created_at": "2024-03-15T19:55:00Z", "updated_at": "2024-03-15T19:55:00Z" } ] } ``` **Authentication:** Optional (returns only accessible channels if authenticated) ``` -------------------------------- ### JWT Token as Query Parameter Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Pass JWT tokens as a query parameter for specific use cases like WebSocket connections. This example shows a GET request with the token appended. ```http GET /api/channels/?token=eyJ0eXAiOiJKV1QiLCJhbGc... ``` -------------------------------- ### Create EPG Entry Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/epg.md Allows for the creation of a custom Electronic Program Guide (EPG) entry, either manually or through API-driven processes. Requires administrator privileges. ```APIDOC ## POST /api/epg/epgdata/ ### Description Create a custom EPG entry (manual entry or API-driven creation). ### Method POST ### Endpoint /api/epg/epgdata/ ### Parameters #### Request Body - **channel** (integer) - Required - Channel ID - **title** (string) - Required - Program title - **description** (string) - Optional - Program description - **category** (string) - Optional - Genre/category - **start_time** (datetime) - Required - Start time (ISO 8601 UTC) - **end_time** (datetime) - Required - End time (ISO 8601 UTC) - **rating** (string) - Optional - Content rating - **icon_url** (string) - Optional - Thumbnail/icon URL - **director** (string) - Optional - Director name(s) - **actors** (string) - Optional - Actor names - **series_name** (string) - Optional - Series name - **season_number** (integer) - Optional - Season number - **episode_number** (integer) - Optional - Episode number ### Request Example ```json { "channel": 1, "title": "Custom Program", "description": "Manual EPG entry", "category": "Entertainment", "start_time": "2024-03-20T20:00:00Z", "end_time": "2024-03-20T21:00:00Z", "rating": "PG", "icon_url": "http://example.com/custom.jpg" } ``` ### Response #### Success Response (201 Created) Created EPG data object **Authentication:** Required (Admin only) ``` -------------------------------- ### Streamlink Command with Placeholders Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Shows how to build a Streamlink command using placeholders for user agent and stream URL. The parameters are expanded into a full command line. ```yaml command: streamlink parameters: -p {userAgent} --loglevel none {streamUrl} best -o pipe:1 ``` ```bash streamlink -p "Mozilla/5.0..." --loglevel none "http://example.com/stream.m3u8" best -o pipe:1 ``` -------------------------------- ### Full Repo Manifest with Signing (JSON) Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugin_repo.md A comprehensive repo manifest example that includes signing information. It details various metadata fields for a plugin, such as version history, checksums, and compatibility. ```json { "manifest": { "registry_name": "My Plugin Repo", "registry_url": "https://github.com/myorg/my-plugins", "root_url": "https://raw.githubusercontent.com/myorg/my-plugins/releases", "plugins": [ { "slug": "weather_display", "name": "Weather Display", "description": "Shows weather info on the dashboard", "author": "Acme Labs", "maintainers": ["alice", "bob"], "license": "MIT", "deprecated": false, "repo_url": "https://github.com/acmelabs/dispatcharr-weather", "discord_thread": "https://discord.com/channels/123456/789012", "latest_version": "1.2.5", "last_updated": "2025-01-20T15:30:00Z", "manifest_url": "plugins/weather_display/manifest.json", "latest_url": "plugins/weather_display/releases/weather_display-1.2.5.zip", "latest_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "latest_size": 142, "icon_url": "plugins/weather_display/logo.png", "min_dispatcharr_version": "2.5.0", "max_dispatcharr_version": null } ] }, "signature": "-----BEGIN PGP SIGNATURE-----\n..." } ``` -------------------------------- ### Build Production Frontend Source: https://github.com/dispatcharr/dispatcharr/blob/main/CONTRIBUTING.md Generate a production-ready build of the frontend application. This command optimizes assets for deployment. ```bash npm run build ``` -------------------------------- ### Initialize Superuser Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Creates the first superuser account for the system. This endpoint is unprotected and should only be called if no admin user exists. ```bash POST /api/accounts/initialize-superuser/ Content-Type: application/json { "username": "admin", "password": "securepassword123", "email": "admin@example.com" } ``` -------------------------------- ### List Plugins Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/plugins-connect.md Use this endpoint to list all available plugins, with options to filter by page number and enabled status. Authentication is required. ```http GET /api/plugins/?page=1&is_enabled=true Authorization: Bearer {access_token} ``` -------------------------------- ### Create Output Profile Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Creates a new output profile. Requires administrator privileges and specific JSON payload. Parameters must use `pipe:0` for input and `pipe:1` for output. ```HTTP POST /api/core/outputprofiles/ Authorization: Bearer {access_token} Content-Type: application/json { "name": "Mobile 360p", "command": "ffmpeg", "parameters": "-i pipe:0 -c:v libx264 -b:v 500k -vf scale=-2:360 -c:a aac -b:a 64k -f mpegts pipe:1", "is_active": true } ``` -------------------------------- ### M3U Filters Response Example Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/m3u.md Example JSON response when listing M3U filters, showing filter details like ID, name, pattern, and status. ```json { "count": 5, "results": [ { "id": 1, "account": 1, "name": "Exclude Adult", "filter_type": "exclude_by_name", "pattern": ".*adult.*|.*xxx.*", "is_regex": true, "is_enabled": true, "order": 1, "created_at": "2024-01-01T00:00:00Z" }, { "id": 2, "account": 1, "name": "Keep Only HD", "filter_type": "include_by_name", "pattern": ".*HD.*|.*1080.*", "is_regex": true, "is_enabled": true, "order": 2, "created_at": "2024-01-01T00:00:00Z" } ] } ``` -------------------------------- ### List All Core Settings Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Retrieves a list of all core settings, organized by category. This endpoint provides an overview of the system's current configuration. ```APIDOC ## GET /api/core/settings/ ### Description Lists all core settings organized by category. ### Method GET ### Endpoint /api/core/settings/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ``` GET /api/core/settings/ Authorization: Bearer {access_token} ``` ### Response #### Success Response (200 OK) - **count** (integer) - The total number of settings. - **results** (array) - A list of setting objects, each containing: - **id** (integer) - The unique identifier for the setting. - **key** (string) - The name of the setting. - **value** (string/integer/boolean) - The current value of the setting. - **description** (string) - A brief description of the setting. - **category** (string) - The category the setting belongs to. - **data_type** (string) - The data type of the setting's value. - **updated_at** (string) - The timestamp when the setting was last updated. #### Response Example ```json { "count": 100, "results": [ { "id": 1, "key": "stream_profile_default", "value": "1", "description": "Default stream profile ID", "category": "stream_settings", "data_type": "integer", "updated_at": "2024-03-15T10:30:00Z" }, { "id": 2, "key": "dvr_storage_path", "value": "/recordings", "description": "Path where DVR recordings are stored", "category": "dvr_settings", "data_type": "string", "updated_at": "2024-03-15T10:30:00Z" } ] } ``` ### Authentication Required (Admin only) ``` -------------------------------- ### List Plugins Source: https://github.com/dispatcharr/dispatcharr/blob/main/Plugins.md Retrieves a list of all available plugins, including their key, name, version, description, enabled status, fields, settings, and actions. ```APIDOC ## GET /api/plugins/plugins/ ### Description Retrieves a list of all available plugins. ### Method GET ### Endpoint /api/plugins/plugins/ ### Response #### Success Response (200) - **plugins** (array) - An array of plugin objects, each containing: - **key** (string) - **name** (string) - **version** (string) - **description** (string) - **enabled** (boolean) - **fields** (object) - **settings** (object) - **actions** (array) ### Response Example { "plugins": [ { "key": "example_plugin", "name": "Example Plugin", "version": "1.0.0", "description": "A sample plugin.", "enabled": true, "fields": {}, "settings": {}, "actions": [] } ] } ``` -------------------------------- ### GET /api/accounts/groups/ Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md List all user groups. ```APIDOC ## GET /api/accounts/groups/ ### Description List all user groups. ### Method GET ### Endpoint /api/accounts/groups/ ### Response #### Success Response (200 OK) - **id** (integer) - The unique identifier for the group. - **name** (string) - The name of the group. - **permissions** (array of integers) - A list of permission IDs associated with the group. ### Response Example ```json [ { "id": 1, "name": "moderators", "permissions": [5, 10, 23] } ] ``` **Authentication:** Required ``` -------------------------------- ### List All Core Settings Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Retrieves a list of all core settings, organized by category. Requires administrator authentication. ```http GET /api/core/settings/ Authorization: Bearer {access_token} ``` -------------------------------- ### Create Custom Core Setting Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/core-settings.md Adds a new custom setting to the system. This is generally not recommended for production environments. Requires administrator authentication. ```http POST /api/core/settings/ Authorization: Bearer {access_token} Content-Type: application/json { "key": "custom_setting", "value": "value", "description": "Custom setting description", "category": "system_settings", "data_type": "string" } ``` -------------------------------- ### Run Frontend Tests Source: https://github.com/dispatcharr/dispatcharr/blob/main/CONTRIBUTING.md Execute the Vitest test suite for the frontend application. Ensure all tests pass before making significant changes. ```bash npm run test ``` -------------------------------- ### Uninstall Plugin Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/plugins-connect.md Removes a previously installed plugin. ```APIDOC ## DELETE /api/plugins/{id}/ ### Description Uninstall a plugin. ### Method DELETE ### Endpoint /api/plugins/{id}/ ### Response (204 No Content) ### Error Responses: - `400 Bad Request`: Cannot uninstall system plugin - `404 Not Found`: Plugin not found ``` -------------------------------- ### Create User Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Creates a new user account in the system. Requires administrator privileges. ```APIDOC ## POST /api/accounts/users/ ### Description Create a new user. ### Method POST ### Endpoint /api/accounts/users/ ### Parameters #### Request Body - **username** (string) - Required - Unique username (3-150 characters) - **password** (string) - Required - User password (minimum 8 characters) - **email** (string) - Optional - User email address - **user_level** (integer) - Optional - User privilege level (0=Streamer, 1=Standard, 10=Admin, default: 0) - **channel_profiles** (array) - Optional - IDs of channel profiles to assign - **custom_properties** (object) - Optional - JSON object for custom user data (max 100KB) - **first_name** (string) - Optional - User's first name - **last_name** (string) - Optional - User's last name ### Request Example { "username": "newuser", "password": "securepassword", "email": "user@example.com", "user_level": 1, "channel_profiles": [1, 2], "custom_properties": { "theme": "dark" } } ### Response #### Success Response (201 Created) - **id** (integer) - Unique identifier for the user. - **username** (string) - The user's username. - **email** (string) - The user's email address. - **user_level** (integer) - The user's privilege level. - **api_key** (string) - The user's API key (if generated). - **channel_profiles** (array) - List of channel profile IDs associated with the user. - **custom_properties** (object) - Custom key-value pairs for user properties. - **avatar_config** (object) - Configuration for the user's avatar. - **stream_limit** (integer) - The stream limit for the user. - **is_staff** (boolean) - Whether the user has staff status. - **is_superuser** (boolean) - Whether the user is a superuser. - **last_login** (string) - Timestamp of the last login. - **date_joined** (string) - Timestamp when the user joined. - **first_name** (string) - The user's first name. - **last_name** (string) - The user's last name. ### Response Example { "id": 43, "username": "newuser", "email": "user@example.com", "user_level": 1, "api_key": null, "channel_profiles": [1, 2], "custom_properties": { "theme": "dark" }, "avatar_config": null, "stream_limit": 0, "is_staff": false, "is_superuser": false, "last_login": null, "date_joined": "2024-03-15T12:00:00Z", "first_name": "", "last_name": "" } ### Error Handling - `400 Bad Request`: Validation error (duplicate username, weak password, etc.) - `401 Unauthorized`: Not authenticated - `403 Forbidden`: Admin access required ### Authentication Required (Admin only) ``` -------------------------------- ### GET /api/accounts/groups/{id}/ Source: https://github.com/dispatcharr/dispatcharr/blob/main/_autodocs/api-reference/accounts.md Retrieve a specific group. ```APIDOC ## GET /api/accounts/groups/{id}/ ### Description Retrieve a specific group. ### Method GET ### Endpoint /api/accounts/groups/{id}/ ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the group to retrieve. ### Response #### Success Response (200 OK) - Group object **Authentication:** Required ```