mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-09-30 04:02:08 +02:00
Bundle interactive OpenAPI 3.0 documentation for all XC_VM APIs into the
docsify site and align the docs visual with the Swagger UI page.
API reference
- Add self-contained Swagger UI host page (_media/swagger-ui.html) with a
tab per specification (Admin / System / Player / Playlist) plus nested
Documentation and Swagger views; deep-linkable via ?spec=<key>.
- Add OpenAPI 3.0 specs: admin-api (renamed from openapi.yaml, 104 ops) and
new system-api (31 actions), player-api (XtreamCodes) and playlist-api,
generated from the existing prose guides and controllers.
- Add EN/RU hub page (api/swagger.md) and wire it into the sidebars.
- Remove now-obsolete prose guides (system_api.md, xtreamcodes_api.md,
playlist.md) after verifying full coverage in the specs.
- Rebrand XUI.ONE -> XC_VM across the spec and host page; point links to
github.com/Vateron-Media/XC_VM.
Theming
- Add shared design tokens (_media/theme-tokens.css) consumed by both the
docs and the Swagger page as a single source of truth.
- Switch docsify to docsify-themeable (Simple / Simple Dark) and drop ~150
lines of hand-written CSS.
- Add a light/dark toggle synced across both pages via localStorage['theme'];
default to dark.
32 lines
2.2 KiB
Markdown
32 lines
2.2 KiB
Markdown
# Interactive API Reference (Swagger)
|
|
|
|
Interactive, always-in-sync Swagger UI for every XC_VM API, generated from OpenAPI 3.0 specifications. Use the **API tabs** at the top of the page to switch between APIs, or open one directly via the links below.
|
|
|
|
| API | Description | Auth | Open |
|
|
| --- | --- | --- | --- |
|
|
| **Admin API** | XUI.ONE-compatible administration — lines, users, streams, VOD, series, servers, settings (104 endpoints) | `api_key` + access code | [Open ↗](_media/swagger-ui.html?spec=admin ':ignore :target=_blank') |
|
|
| **System API** | Internal `/api.php` — stream/VOD control, stats, processes, files, connections (31 actions) | `password` (`live_streaming_pass`) | [Open ↗](_media/swagger-ui.html?spec=system ':ignore :target=_blank') |
|
|
| **Player API** | XtreamCodes player — Live TV, VOD, Series, EPG | `username` + `password` | [Open ↗](_media/swagger-ui.html?spec=player ':ignore :target=_blank') |
|
|
| **Playlist API** | `/playlist` authentication + playlist generation | `username`/`password` or `token` | [Open ↗](_media/swagger-ui.html?spec=playlist ':ignore :target=_blank') |
|
|
|
|
---
|
|
|
|
## Using "Try it out"
|
|
|
|
1. Open a spec, then use the **API tabs** to switch APIs, and the **Documentation / Interactive (Swagger)** tabs for each API.
|
|
2. Expand any endpoint → **Try it out** → fill parameters → **Execute** to see the real request URL, cURL command and live response.
|
|
3. For the Admin API, click **Authorize 🔓** and paste your API key — it is then attached to every request automatically.
|
|
|
|
> **CORS note:** direct "Try it out" calls from the browser to your server may be blocked by CORS. This is expected — use the generated cURL command, Postman or Insomnia instead. The error does not mean the API is broken.
|
|
|
|
---
|
|
|
|
## Raw specifications
|
|
|
|
Every spec can be imported into Postman, Insomnia or any OpenAPI 3.0 tooling:
|
|
|
|
- [`admin-api.openapi.yaml`](_media/admin-api.openapi.yaml ':ignore :target=_blank')
|
|
- [`system-api.openapi.yaml`](_media/system-api.openapi.yaml ':ignore :target=_blank')
|
|
- [`player-api.openapi.yaml`](_media/player-api.openapi.yaml ':ignore :target=_blank')
|
|
- [`playlist-api.openapi.yaml`](_media/playlist-api.openapi.yaml ':ignore :target=_blank')
|