Files
nextcloud-jukebox/openapi.json

3110 lines
133 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"title": "jukebox",
"version": "0.0.1",
"description": "Stream and organize all your audio content in one place.",
"license": {
"name": "agpl"
}
},
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
},
"bearer_auth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"OCSMeta": {
"type": "object",
"required": [
"status",
"statuscode"
],
"properties": {
"status": {
"type": "string"
},
"statuscode": {
"type": "integer"
},
"message": {
"type": "string"
},
"totalitems": {
"type": "string"
},
"itemsperpage": {
"type": "string"
}
}
}
}
},
"paths": {
"/ocs/v2.php/apps/jukebox/api/music/tracks": {
"get": {
"operationId": "music-list-tracks",
"summary": "List all tracks for the current user",
"tags": [
"music"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "List of media tracks for current user",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"tracks"
],
"properties": {
"tracks": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/music/tracks/{id}/stream": {
"get": {
"operationId": "music-stream-track",
"summary": "Stream a track file for playback",
"tags": [
"music"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Track ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "File response returned successfully",
"content": {
"*/*": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"401": {
"description": "User not authenticated",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
]
}
}
}
},
"403": {
"description": "Track does not belong to current user",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
},
"404": {
"description": "Track file or record not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/music/albums": {
"get": {
"operationId": "music-list-albums",
"summary": "Fetch albums with grouped tracks for current user",
"tags": [
"music"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Grouped albums and their tracks",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"albums"
],
"properties": {
"albums": {
"type": "array",
"items": {
"type": "object",
"required": [
"album",
"albumArtist",
"year",
"cover",
"tracks"
],
"properties": {
"album": {
"type": "string"
},
"albumArtist": {
"type": "string"
},
"year": {
"type": "integer",
"format": "int64",
"nullable": true
},
"cover": {
"type": "string",
"nullable": true
},
"tracks": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/music/albums/{artist}/{album}": {
"get": {
"operationId": "music-get-album-by-id",
"summary": "Fetch a single album by its album & artist",
"tags": [
"music"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "artist",
"in": "path",
"description": "Encoded artist identifier",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "album",
"in": "path",
"description": "Encoded album identifier",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Album and its tracks",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"album",
"albumArtist",
"year",
"cover",
"tracks"
],
"properties": {
"album": {
"type": "string"
},
"albumArtist": {
"type": "string"
},
"year": {
"type": "integer",
"format": "int64",
"nullable": true
},
"cover": {
"type": "string",
"nullable": true
},
"tracks": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/music/artists": {
"get": {
"operationId": "music-list-artists",
"summary": "Fetch a list of unique artists for the current user",
"tags": [
"music"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "List of unique artists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"artists"
],
"properties": {
"artists": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"cover",
"genre"
],
"properties": {
"name": {
"type": "string"
},
"cover": {
"type": "string",
"nullable": true
},
"genre": {
"type": "string",
"nullable": true
}
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/music/artists/{id}": {
"get": {
"operationId": "music-get-artist-by-id",
"summary": "Fetch a single artist by their ID",
"tags": [
"music"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Base64-encoded artist name",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Artist details, their albums and tracks",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"cover",
"genre",
"tracks"
],
"properties": {
"name": {
"type": "string"
},
"cover": {
"type": "string",
"nullable": true
},
"genre": {
"type": "string",
"nullable": true
},
"tracks": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/subscriptions": {
"get": {
"operationId": "podcast-get-subscriptions",
"summary": "Get all podcast subscriptions for the current user",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Subscriptions listed",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"url",
"subscribed",
"updated"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
},
"subscribed": {
"type": "boolean"
},
"updated": {
"type": "string"
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"post": {
"operationId": "podcast-subscribe",
"summary": "Subscribe to a podcast by URL",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "The podcast feed URL"
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"201": {
"description": "Subscription created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"subscription"
],
"properties": {
"subscription": {
"type": "object",
"required": [
"id",
"url",
"subscribed",
"updated",
"title",
"author",
"description",
"image"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
},
"subscribed": {
"type": "boolean"
},
"updated": {
"type": "string"
},
"title": {
"type": "string"
},
"author": {
"type": "string"
},
"description": {
"type": "string"
},
"image": {
"type": "string"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"subscription"
],
"properties": {
"subscription": {
"type": "object",
"required": [
"id",
"url",
"subscribed",
"updated",
"title",
"author",
"description",
"image"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
},
"subscribed": {
"type": "boolean"
},
"updated": {
"type": "string"
},
"title": {
"type": "string"
},
"author": {
"type": "string"
},
"description": {
"type": "string"
},
"image": {
"type": "string"
}
}
}
}
}
}
}
},
"200": {
"description": "Subscription updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"subscription"
],
"properties": {
"subscription": {
"type": "object",
"required": [
"id",
"url",
"subscribed",
"updated",
"title",
"author",
"description",
"image"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
},
"subscribed": {
"type": "boolean"
},
"updated": {
"type": "string"
},
"title": {
"type": "string"
},
"author": {
"type": "string"
},
"description": {
"type": "string"
},
"image": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/track": {
"post": {
"operationId": "podcast-track-action",
"summary": "Track a podcast playback action",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"guid",
"action",
"timestamp"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "Episode ID"
},
"guid": {
"type": "string",
"description": "Episode GUID"
},
"action": {
"type": "string",
"description": "e.g. \"play\", \"pause\", \"complete\""
},
"timestamp": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp"
},
"position": {
"type": "integer",
"format": "int64",
"nullable": true,
"default": null,
"description": "Position in seconds"
},
"total": {
"type": "integer",
"format": "int64",
"nullable": true,
"default": null,
"description": "Duration in seconds"
},
"device": {
"type": "string",
"nullable": true,
"default": null,
"description": "Device name or ID"
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Action logged",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"400": {
"description": "Invalid input",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/next": {
"get": {
"operationId": "podcast-get-next-episodes",
"summary": "Get the next unfinished episode per podcast",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Next episodes listed",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"episodes"
],
"properties": {
"episodes": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"title",
"guid",
"pub_date",
"duration",
"media_url",
"description",
"subscription_data_id"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"title": {
"type": "string",
"nullable": true
},
"guid": {
"type": "string",
"nullable": true
},
"pub_date": {
"type": "string",
"nullable": true
},
"duration": {
"type": "integer",
"format": "int64",
"nullable": true
},
"media_url": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"subscription_data_id": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/subscriptions/{id}": {
"get": {
"operationId": "podcast-get-subscription",
"summary": "Get a single podcast subscription",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "the subscription ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Subscription found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"subscription"
],
"properties": {
"subscription": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"404": {
"description": "Subscription not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"subscription"
],
"properties": {
"subscription": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/subscriptions/{id}/episodes": {
"get": {
"operationId": "podcast-get-episodes-for-subscription",
"summary": "Get all episodes for a podcast subscription",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "the subscription ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Episodes listed",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"episodes"
],
"properties": {
"episodes": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"404": {
"description": "Subscription not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"episodes"
],
"properties": {
"episodes": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/episodes/{id}/stream": {
"get": {
"operationId": "podcast-stream-episode",
"summary": "Stream a podcast episode",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Episode ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "range",
"in": "query",
"description": "Optional HTTP Range header for seeking support",
"schema": {
"type": "string",
"nullable": true,
"default": null
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Full content stream returned",
"content": {
"*/*": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"206": {
"description": "Partial content stream returned",
"content": {
"*/*": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"401": {
"description": "User is not authenticated",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
]
}
}
}
},
"404": {
"description": "Episode not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "Invalid or missing media URL",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
},
"500": {
"description": "Error occurred while streaming",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/podcasts/episodes/{id}/position": {
"get": {
"operationId": "podcast-get-episode-position",
"summary": "Get the last known playback position for a podcast episode",
"tags": [
"podcast"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Episode ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Playback position returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"position"
],
"properties": {
"position": {
"type": "integer",
"format": "int64"
}
}
}
}
}
},
"401": {
"description": "User not authenticated",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
]
}
}
}
},
"404": {
"description": "Episode not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/radio/stations": {
"get": {
"operationId": "radio-index",
"summary": "List all saved radio stations for current user, paginated",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "offset",
"in": "query",
"description": "Offset for pagination",
"schema": {
"type": "integer",
"format": "int64",
"default": 0
}
},
{
"name": "limit",
"in": "query",
"description": "Number of items to return",
"schema": {
"type": "integer",
"format": "int64",
"default": 50
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "List of radio stations returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"stations"
],
"properties": {
"stations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"post": {
"operationId": "radio-add-by-uuid",
"summary": "Add a radio station to the database",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"station"
],
"properties": {
"station": {
"type": "object",
"description": "Data to add the station",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Station was added successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"station"
],
"properties": {
"station": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/radio/favorites": {
"get": {
"operationId": "radio-favorites",
"summary": "List all favorited radio stations for current user, paginated",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "offset",
"in": "query",
"description": "Offset for pagination",
"schema": {
"type": "integer",
"format": "int64",
"default": 0
}
},
{
"name": "limit",
"in": "query",
"description": "Number of items to return",
"schema": {
"type": "integer",
"format": "int64",
"default": 50
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "List of radio stations returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"stations"
],
"properties": {
"stations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/radio/search/{name}": {
"get": {
"operationId": "radio-search",
"summary": "Search radio stations from Radio Browser by name",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "name",
"in": "path",
"description": "Name or partial name of the radio station",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Matching radio stations returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"stations"
],
"properties": {
"stations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/radio/{uuid}": {
"get": {
"operationId": "radio-get-by-uuid",
"summary": "List all favorited radio stations for current user, paginated",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the radio station",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Radio station returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"station"
],
"properties": {
"station": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/radio/stations/{uuid}": {
"put": {
"operationId": "radio-update-by-uuid",
"summary": "Update an existing radio station by UUID",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"station"
],
"properties": {
"station": {
"type": "object",
"description": "Data to add the station",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the station to update",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Station was added successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"station"
],
"properties": {
"station": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "radio-delete-by-uuid",
"summary": "Remove a saved radio station by its UUID",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "Remote UUID of the radio station",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Station deleted",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
},
"404": {
"description": "Station not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
},
"401": {
"description": "Unauthenticated",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
]
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/radio/{uuid}/stream": {
"get": {
"operationId": "radio-stream-by-uuid",
"summary": "Stream a radio station by its UUID",
"tags": [
"radio"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the radio station",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Streaming audio content",
"content": {
"*/*": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"500": {
"description": "If the stream could not be retrieved",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/settings": {
"put": {
"operationId": "settings-save-settings",
"summary": "Save user-specific settings",
"tags": [
"settings"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"description": "Data to save",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Settings saved",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"get": {
"operationId": "settings-get-settings",
"summary": "Fetch all user-specific settings",
"tags": [
"settings"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Current settings",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/video": {
"get": {
"operationId": "video-index",
"summary": "List all videos for the current user",
"tags": [
"video"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "List of videos for current user",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"videos"
],
"properties": {
"videos": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/video/{id}": {
"get": {
"operationId": "video-show",
"summary": "Get a single video by ID",
"tags": [
"video"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Video ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Video details",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
}
},
"404": {
"description": "Video not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/jukebox/api/video/{id}/stream": {
"get": {
"operationId": "video-stream-video",
"summary": "Stream a video file for playback with range request support",
"tags": [
"video"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Video ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "range",
"in": "header",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"401": {
"description": "User not authenticated",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
]
}
}
}
}
}
}
}
},
"tags": [
{
"name": "settings",
"description": "Handles user-specific settings such as the music folder path."
}
]
}