{
  "openapi": "3.0.0",
  "paths": {
    "/api/player/status": {
      "get": {
        "operationId": "WSController_getStatus",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Provides an overview of the current AP420 player status, including system information, storage availability, project details, connection status, and the availability of the main player services.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerStatusResponse"
                }
              }
            }
          }
        },
        "tags": [
          "player"
        ]
      }
    },
    "/api/player/playback": {
      "get": {
        "operationId": "WSController_getCurrentPlaying",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Provides information about the content currently being played by the AP420 player, including playback status, content type, playback position and duration, track metadata, webradio information, active program, and playlist details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaybackResponse"
                },
                "examples": {
  "track": {
    "summary": "Track playback",
    "value": {
      "playback": {
        "primary": {
          "status": "playing",
          "type": "track",
          "fallback": false,
          "position": "00:01:17",
          "duration": "00:03:04"
        },
        "track_metadata": {
          "title": "Example Track",
          "artist": "Example Artist",
          "album": "Example Album",
          "genre": "Music",
          "filename": "example-track.mp3"
        },
        "webradio_metadata": {
          "name": null,
          "url": null
        },
        "program": {
          "type": "music",
          "name": "Morning Program",
          "started": "2026-09-01T08:46:00.000Z",
          "end": "2026-09-01T18:46:00.000Z"
        },
        "playlist": {
          "name": "Example Playlist",
          "count": 10,
          "track_position": 3
        }
      }
    }
  },
  "webradio": {
    "summary": "Webradio playback",
    "value": {
      "playback": {
        "primary": {
          "status": "playing",
          "type": "webradio",
          "fallback": false,
          "position": "00:00:00",
          "duration": null
        },
        "track_metadata": {
          "title": null,
          "artist": null,
          "album": null,
          "genre": null,
          "filename": null
        },
        "webradio_metadata": {
          "name": "Radio Example",
          "url": "https://radio.example.com/stream"
        },
        "program": {
          "type": "music",
          "name": "Morning Program",
          "started": "2026-09-01T08:46:00.000Z",
          "end": "2026-09-01T18:46:00.000Z"
        },
        "playlist": {
          "name": null,
          "count": null,
          "track_position": null
        }
      }
    }
  }
}
              }
            }
          }
        },
        "tags": [
          "player"
        ]
      }
    }
  },
  "info": {
    "title": "AP420 Public API documentation",
    "description": "<br>Public API documentation for AP420 players.<br><br>© 2026 - Waves System. All rights reserved. For more information, visit the website.<a href=\"https://waves-system.com\">https://waves-system.com</a>",
    "version": "1.0",
    "contact": {}
  },
  "tags": [],
  "servers": [],
  "components": {
    "schemas": {
      "SystemInfo": {
        "type": "object",
        "properties": {
          "date_time": {
            "type": "object",
            "example": "2026-08-27T12:30:00.000Z",
            "description": "Current player date and time"
          },
          "volume": {
            "type": "number",
            "example": 75,
            "description": "Current volume level"
          },
          "mute": {
            "type": "boolean",
            "example": false,
            "description": "Whether the player is muted"
          },
          "calendar_status": {
            "type": "boolean",
            "example": true,
            "description": "Whether the calendar is enabled"
          },
          "firmware": {
            "type": "string",
            "example": "1.2.3",
            "description": "Current firmware version"
          }
        },
        "required": [
          "date_time",
          "volume",
          "mute",
          "calendar_status",
          "firmware"
        ]
      },
      "StorageInfo": {
        "type": "object",
        "properties": {
          "total_bytes": {
            "type": "number",
            "example": 64000000000,
            "description": "Total storage capacity in bytes"
          },
          "free_bytes": {
            "type": "number",
            "example": 32000000000,
            "description": "Free storage capacity in bytes"
          }
        },
        "required": [
          "total_bytes",
          "free_bytes"
        ]
      },
      "ProjectInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "My Project"
          },
          "version": {
            "type": "number",
            "example": 12
          }
        }
      },
      "WavesparkInfo": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected"
            ],
            "example": "connected"
          }
        },
        "required": [
          "status"
        ]
      },
      "ServicesInfo": {
        "type": "object",
        "properties": {
          "storage": {
            "type": "boolean",
            "example": true
          },
          "media_library": {
            "type": "boolean",
            "example": true
          },
          "calendar": {
            "type": "boolean",
            "example": true
          },
          "scenario": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "storage",
          "media_library",
          "calendar",
          "scenario"
        ]
      },
      "PlayerStatus": {
        "type": "object",
        "properties": {
          "system": {
            "$ref": "#/components/schemas/SystemInfo"
          },
          "storage": {
            "$ref": "#/components/schemas/StorageInfo"
          },
          "project": {
            "$ref": "#/components/schemas/ProjectInfo"
          },
          "wavespark": {
            "$ref": "#/components/schemas/WavesparkInfo"
          },
          "services": {
            "$ref": "#/components/schemas/ServicesInfo"
          }
        },
        "required": [
          "system",
          "storage",
          "project",
          "wavespark",
          "services"
        ]
      },
      "PlayerStatusResponse": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/PlayerStatus"
          }
        },
        "required": [
          "status"
        ]
      },
      "PlaybackPrimary": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "playing",
              "stopped",
              "paused",
              null
            ],
            "example": "playing"
          },
          "type": {
            "type": "string",
            "enum": [
              "track",
              "webradio",
              null
            ],
            "example": "track"
          },
          "fallback": {
            "type": "boolean",
            "example": false
          },
          "position": {
            "type": "string",
            "example": "00:00:17",
            "nullable": true
          },
          "duration": {
            "type": "string",
            "example": "00:03:04",
            "nullable": true
          }
        },
        "required": [
          "status",
          "type",
          "fallback",
          "position",
          "duration"
        ]
      },
      "TrackMetadata": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Imagine",
            "nullable": true
          },
          "artist": {
            "type": "string",
            "example": "John Lennon",
            "nullable": true
          },
          "album": {
            "type": "string",
            "example": "Imagine",
            "nullable": true
          },
          "genre": {
            "type": "string",
            "example": "Rock",
            "nullable": true
          },
          "filename": {
            "type": "string",
            "example": "john-lennon-imagine.mp3",
            "nullable": true
          }
        },
        "required": [
          "title",
          "artist",
          "album",
          "genre",
          "filename"
        ]
      },
      "WebradioInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Radio Example",
            "nullable": true
          },
          "url": {
            "type": "string",
            "example": "https://radio.example.com/stream"
          }
        },
        "required": [
          "name",
          "url"
        ]
      },
      "Program": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "music",
              "advert",
              "event",
              null
            ],
            "example": "music"
          },
          "name": {
            "type": "string",
            "example": "Morning Program",
            "nullable": true
          },
          "started": {
            "type": "string",
            "example": "2026-09-01T08:46:00.000Z",
            "nullable": true
          },
          "end": {
            "type": "string",
            "example": "2026-09-01T18:46:00.000Z",
            "nullable": true
          }
        },
        "required": [
          "type",
          "name",
          "started",
          "end"
        ]
      },
      "Playlist": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "My Playlist",
            "nullable": true
          },
          "count": {
            "type": "object",
            "example": 20,
            "nullable": true
          },
          "track_position": {
            "type": "object",
            "example": 5,
            "nullable": true
          }
        },
        "required": [
          "name",
          "count",
          "track_position"
        ]
      },
      "Playback": {
        "type": "object",
        "properties": {
          "primary": {
            "$ref": "#/components/schemas/PlaybackPrimary"
          },
          "track_metadata": {
            "$ref": "#/components/schemas/TrackMetadata"
          },
          "webradio_metadata": {
            "$ref": "#/components/schemas/WebradioInfo"
          },
          "program": {
            "$ref": "#/components/schemas/Program"
          },
          "playlist": {
            "$ref": "#/components/schemas/Playlist"
          }
        },
        "required": [
          "primary",
          "track_metadata",
          "webradio_metadata",
          "program",
          "playlist"
        ]
      },
      "PlaybackResponse": {
        "type": "object",
        "properties": {
          "playback": {
            "$ref": "#/components/schemas/Playback"
          }
        },
        "required": [
          "playback"
        ]
      }
    }
  }
}
