Files
documentation/stream-api/operations/index.html

167 lines
7.8 KiB
HTML

<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Health, testing, and safe operations — Vyla</title>
<meta name="description"
content="Observe SDK providers and diagnose a Stream API deployment without making debug data public." />
<meta name="keywords"
content="health check, API testing, operations, debugging, provider health, API monitoring, deployment" />
<link rel="canonical" href="https://vyla.cc/stream-api/operations.html" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://vyla.cc/stream-api/operations.html" />
<meta property="og:title" content="Health, testing, and safe operations — Vyla" />
<meta property="og:description"
content="Observe SDK providers and diagnose a Stream API deployment without making debug data public." />
<meta property="og:image" content="https://vyla.cc/assets/images/thumbnail.png" />
<meta property="og:site_name" content="Vyla" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://vyla.cc/stream-api/operations.html" />
<meta property="twitter:title" content="Health, testing, and safe operations — Vyla" />
<meta property="twitter:description"
content="Observe SDK providers and diagnose a Stream API deployment without making debug data public." />
<meta property="twitter:image" content="https://vyla.cc/assets/images/thumbnail.png" />
<meta property="twitter:site" content="@vylaentertainment" />
<!-- Additional SEO -->
<meta name="robots" content="index, follow" />
<meta name="author" content="Vyla" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/assets/base.css" />
<link rel="stylesheet" href="/assets/highlight.css" />
<link rel="stylesheet" href="/assets/mintlify-overrides.css" />
<!-- JSON-LD Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Health, testing, and safe operations",
"description": "Observe SDK providers and diagnose a Stream API deployment without making debug data public.",
"url": "https://vyla.cc/stream-api/operations.html",
"applicationCategory": "MultimediaApplication",
"operatingSystem": "Windows, macOS, Linux, Android, Android TV",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
</head>
<body>
<div id="banner">
<span>Vyla is self-hosted. Run Vyla Home, embed the SDK, or deploy Stream API on infrastructure you control. Rights
holders can request source removal — <a href="/misc/dmca">DMCA policy</a>.</span>
<button id="banner-close" onclick="dismissBanner()" aria-label="Dismiss">✕</button>
</div>
<header id="navbar">
<div class="nav-top">
<a class="brand" href="/"><img src="/assets/images/logo.png" alt="Vyla" id="brand-logo" loading="lazy"
fetchpriority="low"></a>
<button id="search-trigger" type="button" onclick="openSearch()" aria-label="Search"></button>
<div class="links">
<button id="theme-toggle" type="button" onclick="toggleThemeMenu(event)" aria-label="Theme"></button>
</div>
</div>
<nav class="tabs">
<a class="tab-link" href="/">Vyla</a>
<a class="tab-link" href="/sdk">SDK</a>
<a class="tab-link active" href="/stream-api/overview">Stream API</a>
<a class="tab-link" href="/guides/integrations">Resources</a>
<a class="tab-link" href="/misc/credit">Misc</a>
</nav>
</header>
<div id="layout">
<nav id="sidebar">
<div class="group">
<p class="group-title">Overview</p>
<ul>
<li><a class="" href="/stream-api/overview">Overview</a></li>
</ul>
</div>
<div class="group">
<p class="group-title">Reference</p>
<ul>
<li><a class="" href="/stream-api/paths">Paths</a></li>
<li><a class="" href="/stream-api/media-data">Media Data</a></li>
<li><a class="active" href="/stream-api/operations">Operations</a></li>
</ul>
</div>
<div class="group">
<p class="group-title">Deployment</p>
<ul>
<li><a class="" href="/self-hosting">Self Hosting</a></li>
</ul>
</div>
</nav>
<div id="content-col">
<main class="prose">
<h1>Health, testing, and safe operations</h1>
<p class="page-description">Observe SDK providers and diagnose a Stream API deployment without making debug data
public.</p>
<h2 id="health">Health</h2>
<p><code>GET /health</code> (or <code>/api/health</code>) probes active providers and returns a JSON summary. It
includes a status, timestamp, TMDB-key presence, cache size, and a map of provider keys to
<code>{ ok, ms }</code> results.
</p>
<p>Health is a signal, not a promise of playback. Provider behavior can differ by title, client network, and the
moment of the request. Use it for observability and source selection—not as a guarantee that a viewer will
receive a stream.</p>
<h2 id="test-one-provider">Test one provider</h2>
<p><code>GET /test/:id?source=:providerKey</code> resolves a single provider for a movie. Add
<code>season</code> and <code>episode</code> (or <code>s</code> and <code>e</code>) for TV.
</p>
<pre><code class="hljs language-bash">curl <span class="hljs-string">"http://localhost:7860/test/155?source=provider-key"</span>
curl <span class="hljs-string">"http://localhost:7860/test/1396?season=1&#x26;episode=1&#x26;source=provider-key"</span>
</code></pre>
<p>Use source keys reported by the running deployment. A test result reports whether resolution and verification
succeeded; clients should inspect the result body rather than relying only on a transport success.</p>
<h2 id="debug-route">Debug route</h2>
<p><code>GET /debug/:id?source=:providerKey</code> offers detailed candidate and request traces, but it is only
available when <code>ENABLE_DEBUG_ROUTE=true</code>.</p>
<div class="callout callout-warning">
<div class="callout-content">
<p>Do not enable the debug route on a public deployment. It can expose upstream request data, raw
candidates, and headers. Enable it temporarily in a controlled environment, then disable it again.</p>
</div>
</div>
<h2 id="production-checklist">Production checklist</h2>
<ul>
<li>Set <code>TMDB_API_KEY</code> when metadata-dependent sources are required.</li>
<li>Keep <code>ENABLE_DEBUG_ROUTE=false</code> outside controlled troubleshooting.</li>
<li>Use TLS and enforce your own access policy before making the service remotely reachable.</li>
<li>Monitor health trends and playback failures separately.</li>
<li>Run updates and provider changes through your normal deployment process.</li>
<li>Build player fallbacks instead of assuming a specific provider is always available.</li>
</ul>
</main>
<aside id="toc">
<p class="toc-title">On this page</p>
<ul>
<li><a href="#health">Health</a></li>
<li><a href="#test-one-provider">Test one provider</a></li>
<li><a href="#debug-route">Debug route</a></li>
<li><a href="#production-checklist">Production checklist</a></li>
</ul>
</aside>
</div>
</div>
<footer id="site-footer">
<a href="https://discord.gg/5eqRhKeywG" target="_blank" rel="noopener">Discord</a>
<a href="https://gitlab.com/vyla-entertainment/" target="_blank" rel="noopener">GitLab</a>
</footer>
<script src="/assets/app.js"></script>
</body>
</html>