{"openapi": "3.0.0", "paths": {"/api": {"get": {"operationId": "AppController_apiHome", "summary": "Get information about your API.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "Lists all available versions of your API, and all endpoints across all versions of your API.", "content": {"application/json": {"schema": {"example": {"versions": {"v1": "/api/v1"}, "endpoints": ["GET /api/v1/health"]}}}}}}, "tags": ["General"]}}, "/api/v1/health": {"get": {"operationId": "AppController_getHealth", "summary": "Know if your Media Server is online.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "Returns the state of the server. If the server responds, then it's online.\n Responses will always have a 200 status. Possible states are: \n `normal`, `not_setup.`", "content": {"application/json": {"schema": {"example": {"state": "normal"}}}}}}, "tags": ["General"]}}, "/api/v1/release-channels": {"get": {"operationId": "AppController_getCurrentReleaseChannel", "summary": "Get the current release channel.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}}, "tags": ["General"]}}, "/api/v1/updates": {"get": {"operationId": "AppController_getAvailableUpdates", "summary": "Manually check for available updates.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"example": {"updateIsAvailable": true, "daysBehindLatestVersion": 42, "latestVersion": "0.0.1", "latestVersionReleasedAt": "Thu Jan 04 2024 21:28:00 GMT-0500 (Eastern Standard Time)"}}}}}, "503": {"description": "Returns a 503 if the latest version cannot be fetched from the cloud, or if the server is running in development mode."}}, "tags": ["General"]}}, "/api/v1/setup": {"post": {"operationId": "AppController_setup", "summary": "Initial setup.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ServerSetupDto"}}}}, "responses": {"201": {"description": "Returns an empty Created response on success."}, "403": {"description": "Possible reasons: The initial setup has already been completed."}}, "tags": ["General"]}}, "/api/v1/instance": {"get": {"operationId": "AppController_getInstance", "summary": "Get information about this server instance.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"example": {"instanceId": "", "serverName": "My custom name", "kioskMode": false}}}}}}, "tags": ["General"]}}, "/api/v1/versions": {"get": {"operationId": "AppController_getAppVersions", "summary": "Get versions of things.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"example": {"nodejs": "0.0.0", "openssl": "0.0.0", "database": "0.0.0", "cardinal_home_server": "0.0.0", "cardinal_home_server_web_app": "0.0.0", "cardinal_music_web_app": "0.0.0", "cardinal_photos_web_app": "0.0.0", "cardinal_cinema_web_app": "0.0.0", "build_tag": "--"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["General"], "security": [{"Local User JWT": []}]}}, "/api/v1/reset": {"post": {"operationId": "AppController_reset", "summary": "\ud83d\udee1\ufe0f Reset server state.", "description": "Deindexing media requires the `Indexing.Deindex` capability; a factory reset requires `MediaServer.FactoryReset`. Both types are gated behind a validation phrase that the user must type out: `Deindex media` and `Factory reset` respectively.

\ud83d\udee1\ufe0f Requires one of these Capabilities: Indexing.Deindex MediaServer.FactoryReset

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ServerResetDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"type": "boolean"}}}}, "400": {"description": "Possible reasons: Request validation failed, see response for details; The validation phrase does not match the reset type."}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user lacks the capability for the requested reset type."}}, "tags": ["General"], "security": [{"Local User JWT": []}]}}, "/api/v1/ls": {"get": {"operationId": "AppController_ls", "summary": "List the contents of a directory.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "rootDir", "required": true, "in": "query", "schema": {"enum": ["music", "photos", "movies", "tv"], "type": "string"}}, {"name": "path", "required": false, "in": "query", "schema": {"type": "string"}}, {"name": "removeFileNodes", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "addEmptyNodes", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "400": {"description": "Possible reasons: Request validation failed, see response for details; Missing root directory."}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["General"], "security": [{"Local User JWT": []}]}}, "/api/v1/dev/settings/{app}/{key}": {"get": {"operationId": "DevController_getSetting", "summary": "Dev-only: read a settings value for the given app.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "app", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "key", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/last-claim-attempt": {"get": {"operationId": "DevController_lastClaimAttempt", "summary": "Dev-only: read the in-memory record of the most recent claim attempt.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/factory-reset": {"post": {"operationId": "DevController_factoryReset", "summary": "Dev-only: factory-reset the server without the validation phrase.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/options/{name}": {"get": {"operationId": "DevController_readOption", "summary": "Dev-only: read a server option by name.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "name", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/first-time-setup": {"post": {"operationId": "DevController_firstTimeSetup", "summary": "Dev-only: complete first-time-setup without driving the wizard.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/users/local": {"post": {"operationId": "DevController_createLocalUser", "summary": "Dev-only: create a local user with the given role.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/users/{userId}": {"delete": {"operationId": "DevController_deleteLocalUser", "summary": "Dev-only: delete a user by userId.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "userId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/users/grant-role": {"post": {"operationId": "DevController_grantRole", "summary": "Dev-only: grant a role to a user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/users/revoke-role": {"post": {"operationId": "DevController_revokeRole", "summary": "Dev-only: revoke a role from a user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/libraries": {"post": {"operationId": "DevController_createLibrary", "summary": "Dev-only: insert a library row directly.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/dev/libraries/{libraryId}": {"delete": {"operationId": "DevController_deleteLibrary", "summary": "Dev-only: delete a library by libraryId.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "libraryId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}}, "tags": ["Dev"]}}, "/api/v1/auth/login": {"post": {"operationId": "LoginController_login", "summary": "\ud83d\udee1\ufe0f Log into a Cardinal app.", "description": "Logs the user into a client application that is hosted (bundled web app) or served by this server.\n\nIf logging into the Guest Account, no credentials are required. If logging into a Cardinal Account, a valid Cardinal SSO token is required.\n\nThe client app must set the cardinal-app header for this request.\n\nOnly the capability corresponding to the application that you are trying to log into will be validated.

\ud83d\udee1\ufe0f Requires one of these Capabilities: AdminApp.Login MusicApp.Login PhotosApp.Login CinemaApp.Login

", "parameters": [{"name": "cardinal-app", "in": "header", "schema": {"enum": ["admin", "music", "photos", "cinema"], "type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginDetails"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "401": {"description": "Returns a 401 if there is an issue with the SSO token."}}, "tags": ["Authentication"]}}, "/api/v1/auth/refresh": {"post": {"operationId": "LoginController_refresh", "summary": "Refresh access token using the httpOnly cookie.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Authentication"]}}, "/api/v1/auth/logout": {"post": {"operationId": "LoginController_logout", "summary": "Clear the refresh token cookie.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["Authentication"]}}, "/api/v1/settings/{app}": {"get": {"operationId": "SettingsController_getAppSettings", "summary": "Get app settings.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "app", "required": true, "in": "path", "description": "The Cardinal app to get settings for.", "schema": {"enum": ["admin", "music", "photos", "cinema"], "type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetAppSettingsResponse"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Settings"], "security": [{"Local User JWT": []}]}}, "/api/v1/settings": {"patch": {"operationId": "SettingsController_upsertSettings", "summary": "\ud83d\udee1\ufe0f Save app settings.", "description": "When saving app settings, set the `app` for which this update applies. Explicitly set the app to `null` to apply the update to all apps. Account-scoped settings ignore `app` entirely and are always saved against the caller; settings that belong to the whole install require the `UserSettings.Update` capability.

\ud83d\udee1\ufe0f Requires one of these Capabilities: UserSettings.Update

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpsertSettings"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpsertSettingsResponse"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The payload changes a setting that belongs to the whole server and the user lacks UserSettings.Update."}}, "tags": ["Settings"], "security": [{"Local User JWT": []}]}}, "/api/v1/users/public": {"get": {"operationId": "PublicUserController_getPublicUsers", "summary": "Get a list of users for the login screen.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "object"}}}}}}, "tags": ["Users (Public)"]}}, "/api/v1/users/current": {"get": {"operationId": "UserController_getCurrentUser", "summary": "\ud83d\udee1\ufe0f Get the currently logged in user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: CurrentUser.Read

", "parameters": [{"name": "CardinalTolkien", "in": "header", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetUserResponse"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "UserController_updateCurrentUser", "summary": "\ud83d\udee1\ufe0f Update your own user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: CurrentUser.Update

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateUserDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}}, "/api/v1/users/owner": {"get": {"operationId": "UserController_getOwner", "summary": "\ud83d\udee1\ufe0f Returns the server owner, if there is one.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}}, "/api/v1/users/active": {"get": {"operationId": "UserController_getActiveUsers", "summary": "\ud83d\udee1\ufe0f Get active Media Server users.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/User"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}}, "/api/v1/users": {"get": {"operationId": "UserController_getUsers", "summary": "\ud83d\udee1\ufe0f Get all users in this server.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Read

", "parameters": [{"name": "roles", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "sort", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}, "post": {"operationId": "UserController_createLocalUser", "summary": "\ud83d\udee1\ufe0f Create a new local Media Server user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUser"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}}, "/api/v1/users/{id}": {"get": {"operationId": "UserController_getUser", "summary": "\ud83d\udee1\ufe0f Get a specific user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "UserController_updateUser", "summary": "\ud83d\udee1\ufe0f Update a user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Update

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateUserDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Users"], "security": [{"Local User JWT": []}]}}, "/api/v1/licensing/subscription": {"get": {"operationId": "LicensingController_getCurrentSubscription", "summary": "\ud83d\udee1\ufe0f Get the subscription tier.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Licensing"], "security": [{"Local User JWT": []}]}}, "/api/v1/licensing/seats": {"get": {"operationId": "LicensingController_getSeats", "summary": "\ud83d\udee1\ufe0f Get information about seat usage.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Users.Read

", "parameters": [], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Licensing"], "security": [{"Local User JWT": []}]}}, "/api/v1/roles/assignments": {"get": {"operationId": "RBACController_getRoleAssignments", "summary": "\ud83d\udee1\ufe0f Get role assignments.", "description": "Get all role assignments for all users, or all role assignments for just one user.

\ud83d\udee1\ufe0f Requires Capabilities: RoleAssignments.Read

", "parameters": [{"name": "userId", "required": false, "in": "query", "schema": {"type": "string"}}, {"name": "sort", "required": false, "in": "query", "schema": {"default": "name", "enum": ["name"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/RoleAssignment"}}}}}, "400": {"description": "Possible reasons: Request validation failed, see response for details."}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Role Assignments"], "security": [{"Local User JWT": []}]}}, "/api/v1/roles/{role}/assignments": {"post": {"operationId": "RBACController_assignRoles", "summary": "\ud83d\udee1\ufe0f Assign roles.", "description": "Assign a role to one or more users by creating role assignments. If the user already has the role, the existing assignment will be returned.

\ud83d\udee1\ufe0f Requires Capabilities: RoleAssignments.Create

", "parameters": [{"name": "role", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AssignRolesDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/RoleAssignment"}}}}}, "400": {"description": "Possible reasons: Request validation failed, see response for details."}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities; The role is non-assignable."}}, "tags": ["Role Assignments"], "security": [{"Local User JWT": []}]}, "delete": {"operationId": "RBACController_revokeRoles", "summary": "\ud83d\udee1\ufe0f Revoke roles.", "description": "Revoke a role from one or more users by deleting role assignments. If the user does not have the role, nothing will happen. The Guest Account is protected from having its roles removed.

\ud83d\udee1\ufe0f Requires Capabilities: RoleAssignments.Delete

", "parameters": [{"name": "userIds", "required": true, "in": "query", "schema": {"default": [], "type": "array", "items": {"type": "string"}}}, {"name": "role", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/RoleAssignment"}}}}}, "400": {"description": "Possible reasons: Request validation failed, see response for details; You are attempting to update the Guest Account."}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Role Assignments"], "security": [{"Local User JWT": []}]}}, "/api/v1/events/subscribe": {"get": {"operationId": "EventController_sse", "summary": "Subscribe to real time events.", "description": "Subscribe to events. An `EventSource` can be used to listen to events (the\nSwagger test page won't work).\n\nEach client connection is unique to that client app, and clients will only\nreceive the events that are meant for them.\n\nAuthenticate with the standard `Authorization` header. Clients built on the\nnative browser `EventSource` cannot send headers; those can send the JWT in\nthe deprecated `authorization` query param instead.

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "authorization", "required": false, "in": "query", "deprecated": true, "description": "The JWT, for EventSource implementations that cannot send an Authorization header.", "schema": {}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Events"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/state": {"get": {"operationId": "IndexingController_getState", "summary": "\ud83d\udee1\ufe0f Get the current state of the indexing service.", "description": "\nReturns a snapshot of the indexing state at \nthis current moment. Use this endpoint for one-time checks. \nFor real-time updates, use the `/events/subscribe` endpoint \ninstead.\n\n

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Read

", "parameters": [], "responses": {"200": {"description": "\nThe returned object will contain the state of the indexing service. \nPossible states are: `idle` `indexing` `paused`\n\n", "content": {"application/json": {"schema": {"example": {"state": "idle"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "IndexingController_changeState", "summary": "\ud83d\udee1\ufe0f Control the current indexing run.", "description": "\nUpdate the state of the currently running indexing operation. This endpoint\nis dedicated to controlling the indexing service from the frontend, and\ncannot update completed runs.\n\nThis endpoint is designed to accept actions. Instead of sending the desired\nstate, send an action and let the indexing service handle the change\ninternally. So, you send \"stop\", and internally the service will terminate\nthe run and change the state to `idle`.\n\nAccepted actions are:\n\n- `pause` - Pauses the run after the current file has completed indexing.\nThe internal state will change to `paused`.\n- `resume` - Resumes a run and continues with the next file. Triggering\nresume on a run that isn't paused will have no effect. The internal\nstate will change to `indexing`.\n- `stop` - Stops a run after the current file has completed indexing. The\ninternal state will change to `idle`, and a new run can be started.\n\n

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Operate

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StateChangeActionDto"}}}}, "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}, "409": {"description": "\nReturns a 409 if the action is not compatible \nwith the current indexing state. For example, sending `stop` \nwhile the server is `idle`.\n\n"}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/directories": {"get": {"operationId": "IndexingController_getDirectories", "summary": "\ud83d\udee1\ufe0f Get your media directories.", "description": "Returns an array of all media directories that the user told Cardinal Media Server to use.

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/counts": {"get": {"operationId": "IndexingController_getFileCounts", "summary": "\ud83d\udee1\ufe0f Count your files.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"example": {"musicFiles": 10, "photoFiles": 12, "movieFiles": 20, "tvFiles": 24}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/run/logs": {"get": {"operationId": "IndexingController_getRunLogs", "summary": "\ud83d\udee1\ufe0f Get logs for an indexing run.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Read

", "parameters": [{"name": "runId", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/runs": {"get": {"operationId": "IndexingController_getRuns", "summary": "\ud83d\udee1\ufe0f Get your previous indexing runs.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Read

", "parameters": [{"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"example": [[{"runId": "7b74fae5-c377-4352-983d-0981e9b9fbec"}], 24]}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/run": {"post": {"operationId": "IndexingController_startManualIndexingRun", "summary": "\ud83d\udee1\ufe0f Start an indexing run.", "description": "\nCreates a new Run in the database and starts the indexing operation for\nthat Run. This endpoint can only be used if there is not currently a run\nrunning.\n\nThe indexing operation will continue to run on the server after this\nendpoint has returned a response.\n\n

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Operate

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateRunDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Run"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/file": {"get": {"operationId": "IndexingController_getFile", "summary": "\ud83d\udee1\ufe0f Get files from your index.", "description": "\nGet one or more files from your index. Depending on the filetype, addtional\ninformation will be returned about the entities that were extracted from\nthe file.\n\n

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Operate

", "parameters": [{"name": "ids", "required": false, "in": "query", "schema": {"default": [], "type": "array", "items": {"type": "string"}}}, {"name": "library", "required": false, "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/File"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/files": {"delete": {"operationId": "IndexingController_deleteFiles", "summary": "\ud83d\udee1\ufe0f Deindex one or more of your files.", "description": "\nDeindexes one or more files. To \"deindex\" means to delete the file entity\nand all of its derived entities like songs and episodes, and all of their\nderived entities like metadata and thumbnails.\n\nDeindexing however does not delete cached static resources on the disk like\nthe thumbnail files that the server generates when initially indexing\nthings. Those now stale assets will eventually be deleted by a cleanup cron\njob.\n\nIf a wildcard (`*`) is given as the sole item in the array, all files will\nbe deindexed. The wildcard method only supports hard deleting, so you must\nalso set `hardDelete` to true to activate it. Only a `true` boolean will be\nreturned when the wildcard operation is done.\n\nBy default, this deindexing is a soft delete. To perform a hard delete, set\nthe `hardDelete` param to true.\n\n

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Deindex

", "parameters": [{"name": "ids", "required": true, "in": "query", "schema": {"default": [], "type": "array", "items": {"type": "string"}}}, {"name": "hardDelete", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}], "responses": {"200": {"description": "Returns an object of file IDs and booleans, indicating whether each file was successfully deindexed.", "content": {"application/json": {"schema": {"example": {"7b74fae5-c377-4352-983d-0981e9b9fbec": true}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/seed/large": {"post": {"operationId": "IndexingController_seedIndexLarge", "summary": "\ud83d\udee1\ufe0f Seed the index with millions of mock music files.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Operate

", "parameters": [{"name": "count", "required": true, "in": "query", "schema": {"type": "string"}}], "responses": {"201": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/seed/fs": {"post": {"operationId": "IndexingController_seedIndexFs", "summary": "\ud83d\udee1\ufe0f Seed the file system with mock music folders and files.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Operate

", "parameters": [{"name": "artists", "required": true, "in": "query", "schema": {"type": "string"}}], "responses": {"201": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/index/seed/demo": {"post": {"operationId": "IndexingController_seedIndexDemo", "summary": "\ud83d\udee1\ufe0f Seed the curated public demo dataset (kiosk mode only).", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Operate

", "parameters": [{"name": "username", "required": true, "in": "query", "schema": {"type": "string"}}, {"name": "scale", "required": true, "in": "query", "schema": {"type": "string"}}], "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Indexing"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/track/{id}": {"get": {"operationId": "MusicTrackController_getMusicTrack", "summary": "\ud83d\udee1\ufe0f Get a single music track.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicTracks.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MusicTrackComputed"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/tracks": {"get": {"operationId": "MusicTrackController_getTracks", "summary": "\ud83d\udee1\ufe0f Query music tracks.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicTracks.Read

", "parameters": [{"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "release", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "artists", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "libraries", "required": false, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "playCount", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "rating", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "orderBy", "required": false, "in": "query", "schema": {"default": "title", "enum": ["createdAt", "title", "trackNumber", "discNumber", "duration", "bitrate", "playCount", "rating"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/stream/{id}": {"get": {"operationId": "MusicTrackController_streamMusicTrack", "summary": "\ud83d\udee1\ufe0f Stream a music track.", "description": "Stream a music track using either direct stream or transcoding.

\ud83d\udee1\ufe0f Requires Capabilities: MusicTracks.Play

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "transcode", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "bitrate", "required": false, "in": "query", "schema": {"type": "number"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT (Query Parameter)": []}, {"Local User JWT": []}]}}, "/api/v1/library": {"post": {"operationId": "LibraryController_createLibrary", "summary": "\ud83d\udee1\ufe0f Create a new library.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Libraries.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateLibraryDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Library"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Libraries"], "security": [{"Local User JWT": []}]}}, "/api/v1/libraries": {"get": {"operationId": "LibraryController_getLibraries", "summary": "\ud83d\udee1\ufe0f Get the current user's all libraries.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Libraries.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Library"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Libraries"], "security": [{"Local User JWT": []}]}}, "/api/v1/library/{id}": {"get": {"operationId": "LibraryController_getLibrary", "summary": "\ud83d\udee1\ufe0f Get a library.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Libraries.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Library"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Libraries"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "LibraryController_updateLibrary", "summary": "\ud83d\udee1\ufe0f Update a library.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Libraries.Update

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateLibraryBodyDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Library"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Libraries"], "security": [{"Local User JWT": []}]}, "delete": {"operationId": "LibraryController_deleteLibrary", "summary": "\ud83d\udee1\ufe0f Delete a library.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Libraries.Delete

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Libraries"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/release/{id}": {"get": {"operationId": "MusicReleaseController_getMusicArtist", "summary": "\ud83d\udee1\ufe0f Get a single music release.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicReleases.Read

", "parameters": [{"name": "tracks", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "genres", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "artists", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "thumbnails", "required": false, "in": "query", "schema": {"type": "boolean"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MusicRelease"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/releases": {"get": {"operationId": "MusicReleaseController_getMusicReleases", "summary": "\ud83d\udee1\ufe0f Query music releases.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicReleases.Read

", "parameters": [{"name": "genres", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "tracks", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "artists", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "thumbnails", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "libraries", "required": false, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "orderBy", "required": false, "in": "query", "schema": {"default": "title", "enum": ["createdAt", "title"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/releases/{id}/cover": {"get": {"operationId": "MusicReleaseController_getReleaseCoverBlob", "summary": "\ud83d\udee1\ufe0f Get the cover image of a release.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicReleases.Read

", "parameters": [], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/artist/{id}": {"get": {"operationId": "MusicArtistController_getMusicArtist", "summary": "\ud83d\udee1\ufe0f Get a single music artist.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicArtists.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "releases", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "tracks", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "summary", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "playCount", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "rating", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/artists": {"get": {"operationId": "MusicArtistController_getMusicArtists", "summary": "\ud83d\udee1\ufe0f Query music artists.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicArtists.Read

", "parameters": [{"name": "tracks", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "releases", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "libraries", "required": false, "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "orderBy", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt", "updatedAt", "name", "sortName"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/ratings": {"put": {"operationId": "RatingController_setRating", "summary": "\ud83d\udee1\ufe0f Set a rating for a media item.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Ratings.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetRatingDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Rating"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Ratings"], "security": [{"Local User JWT": []}]}, "get": {"operationId": "RatingController_queryRatings", "summary": "\ud83d\udee1\ufe0f Query ratings for the currently logged in user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Ratings.Read

", "parameters": [{"name": "favorites", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "type", "required": false, "in": "query", "schema": {"enum": ["music_track"], "type": "string"}}, {"name": "sort", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt", "rating"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Ratings"], "security": [{"Local User JWT": []}]}}, "/api/v1/ratings/{mediaType}/{mediaId}": {"delete": {"operationId": "RatingController_deleteRating", "summary": "\ud83d\udee1\ufe0f Remove a rating for a media item.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Ratings.Delete

", "parameters": [{"name": "mediaType", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "mediaId", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Ratings"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/genre/{id}": {"get": {"operationId": "MusicGenreController_getMusicArtist", "summary": "\ud83d\udee1\ufe0f Get a single music genre.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicGenres.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MusicGenre"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/photos": {"get": {"operationId": "PhotoController_getPhotos", "summary": "\ud83d\udee1\ufe0f Get your photos.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Photos.Read

", "parameters": [{"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "thumbnails", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "photoAlbumEntries", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "orderBy", "required": false, "in": "query", "schema": {"default": "takenAt", "enum": ["createdAt", "takenAt", "modifiedAt", "width", "height", "deviceMake", "deviceModel", "gpsLat", "gpsLng", "gpsAltitude"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": "Returns an array where the first item is an array of query results, and the second item is the total number of photos.", "content": {"application/json": {"schema": {"example": [[{"photoId": "7b74fae5-c377-4352-983d-0981e9b9fbec"}, {"photoId": "7b74fae5-c377-4352-983d-0981e9b9fbec"}, {"photoId": "7b74fae5-c377-4352-983d-0981e9b9fbec"}, {"photoId": "7b74fae5-c377-4352-983d-0981e9b9fbec"}], 24]}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photos"], "security": [{"Local User JWT": []}, {"Local User JWT": []}]}}, "/api/v1/photos/count": {"get": {"operationId": "PhotoController_countPhotos", "summary": "\ud83d\udee1\ufe0f Count your photos.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Photos.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "number"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photos"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo/{id}": {"get": {"operationId": "PhotoController_getPhoto", "summary": "\ud83d\udee1\ufe0f Get data about a photo.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Photos.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}, {"name": "file", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "thumbnails", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "photoAlbumEntries", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Photo"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photos"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "PhotoController_updatePhoto", "summary": "\ud83d\udee1\ufe0f Update a photo.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Photos.Update

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdatePhotoBodyDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Photo"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photos"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo/{id}/blob": {"get": {"operationId": "PhotoController_getPhotoBlob", "summary": "\ud83d\udee1\ufe0f Get a photo blob.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Photos.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}, {"name": "autoConvert", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photos"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo/{id}/thumbnail": {"get": {"operationId": "PhotoController_getReleaseCoverBlob", "summary": "\ud83d\udee1\ufe0f Get a photo thumbnail.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Photos.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photos"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo-album/{id}": {"get": {"operationId": "PhotoAlbumController_getPhotoAlbum", "summary": "\ud83d\udee1\ufe0f Get a single photo album.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhotoAlbum"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "PhotoAlbumController_updatePhotoAlbum", "summary": "\ud83d\udee1\ufe0f Update a photo album.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Update

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdatePhotoAlbumBodyDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhotoAlbum"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}, "delete": {"operationId": "PhotoAlbumController_deletePhotoAlbum", "summary": "\ud83d\udee1\ufe0f Delete a photo album.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Delete

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo-albums": {"get": {"operationId": "PhotoAlbumController_getPhotoAlbums", "summary": "\ud83d\udee1\ufe0f Get your photo albums.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Read

", "parameters": [{"name": "metadata", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "thumbnails", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "orderBy", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt", "modifiedAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo-albums/count": {"get": {"operationId": "PhotoAlbumController_countPhotoAlbums", "summary": "\ud83d\udee1\ufe0f Count your photo albums.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "number"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo-album": {"post": {"operationId": "PhotoAlbumController_createPhotoAlbum", "summary": "\ud83d\udee1\ufe0f Create a new photo album.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreatePhotoAlbumDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PhotoAlbum"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}}, "/api/v1/photo-album/{id}/entries": {"get": {"operationId": "PhotoAlbumController_getPhotoAlbumEntries", "summary": "\ud83d\udee1\ufe0f Get photo album entries.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: PhotoAlbums.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}, {"name": "joinPhoto", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "joinPhotoAlbum", "required": false, "in": "query", "schema": {"default": false, "type": "boolean"}}, {"name": "featured", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "orderBy", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt", "modifiedAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Photo Albums"], "security": [{"Local User JWT": []}]}}, "/api/v1/thumbnails": {"delete": {"operationId": "ThumbnailController_deleteThumbnailFileCache", "summary": "\ud83d\udee1\ufe0f Delete all cached thumbnails files.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Indexing.Deindex

", "parameters": [], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Thumbnails"], "security": [{"Local User JWT": []}]}}, "/api/v1/job": {"post": {"operationId": "JobController_createJob", "summary": "\ud83d\udee1\ufe0f Create a new job.", "description": "The job will automatically start running.

\ud83d\udee1\ufe0f Requires Capabilities: Jobs.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateJobDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Job"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Jobs"], "security": [{"Local User JWT": []}]}}, "/api/v1/jobs": {"get": {"operationId": "JobController_getJobs", "summary": "\ud83d\udee1\ufe0f Fetch server jobs.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Jobs.Read

", "parameters": [{"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}, {"name": "status", "required": true, "in": "query", "description": "draft, preparing, in_queue, running, paused, canceled, completed, errored", "schema": {"type": "array", "items": {"type": "string"}}}, {"name": "type", "required": true, "in": "query", "description": "album_art_thumbnails, photo_variations, photo_thumbnails, generate_waveforms", "schema": {"type": "array", "items": {"type": "string"}}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Jobs"], "security": [{"Local User JWT": []}]}}, "/api/v1/job/{id}": {"get": {"operationId": "JobController_getJob", "summary": "\ud83d\udee1\ufe0f Get a single job.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Jobs.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Job"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Jobs"], "security": [{"Local User JWT": []}]}, "patch": {"operationId": "JobController_updateJob", "summary": "\ud83d\udee1\ufe0f Control a job.", "description": "Control a job by updating its status. Pausing will only kick in between the next job tasks, resuming is instant.

\ud83d\udee1\ufe0f Requires Capabilities: Jobs.Operate

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateJobDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Job"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Jobs"], "security": [{"Local User JWT": []}]}}, "/api/v1/job/{id}/tasks": {"get": {"operationId": "JobController_getJobTasks", "summary": "\ud83d\udee1\ufe0f Get a job's tasks.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Jobs.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "number"}}, {"name": "type", "required": false, "in": "query", "schema": {"enum": ["create_album_artwork_thumbnail", "create_photo_thumbnail", "heic_to_jpeg", "generate_track_waveform"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Jobs"], "security": [{"Local User JWT": []}]}}, "/api/v1/jobs/types": {"get": {"operationId": "JobController_getJobTypes", "summary": "\ud83d\udee1\ufe0f Get all job types.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Jobs.Read

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "object"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Jobs"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/track/{id}/waveform": {"get": {"operationId": "WaveformController_getMusicTrackWaveform", "summary": "\ud83d\udee1\ufe0f Get the waveform of a music track.", "description": "Returns the stored waveform data for a track. When no current waveform exists yet, responds with 202 and begins generating one; a `music.waveform_ready` server-sent event announces the result.

\ud83d\udee1\ufe0f Requires Capabilities: MusicTracks.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MusicTrackWaveform"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}}, "/api/v1/music/history": {"patch": {"operationId": "MusicHistoryController_createPlaybackHistoryEntry", "summary": "\ud83d\udee1\ufe0f Save playback history.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicHistory.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateMusicHistoryEntryDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MusicHistory"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}]}, "get": {"operationId": "MusicHistoryController_queryPlaybackHistory", "summary": "\ud83d\udee1\ufe0f Query playback history for the currently logged in user.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: MusicHistory.Read

", "parameters": [{"name": "sort", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Music"], "security": [{"Local User JWT": []}, {"Local User JWT": []}]}}, "/api/v1/invitations/{id}": {"get": {"operationId": "InvitationController_getInvitation", "summary": "\ud83d\udee1\ufe0f Get data about an invitation.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Invitations.Read

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Invitation"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Invitations"], "security": [{"Local User JWT": []}]}, "delete": {"operationId": "InvitationController_deleteInvitation", "summary": "\ud83d\udee1\ufe0f Delete a new invitation.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Invitations.Delete

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "boolean"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Invitations"], "security": [{"Local User JWT": []}]}}, "/api/v1/invitations": {"get": {"operationId": "InvitationController_queryInvitations", "summary": "\ud83d\udee1\ufe0f Query invitations.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Invitations.Read

", "parameters": [{"name": "isExpired", "required": false, "in": "query", "schema": {"type": "boolean"}}, {"name": "sort", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Invitations"], "security": [{"Local User JWT": []}]}, "post": {"operationId": "InvitationController_createInvitation", "summary": "\ud83d\udee1\ufe0f Create a new invitation.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: Invitations.Create

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateInvitationDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Invitation"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}, "403": {"description": "Possible reasons: The user does not have sufficent capabilities."}}, "tags": ["Invitations"], "security": [{"Local User JWT": []}]}}, "/api/v1/playback-queues/{id}": {"get": {"operationId": "PlaybackQueueController_getPlaybackQueue", "summary": "Get a queue.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybackQueue"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}, "delete": {"operationId": "PlaybackQueueController_deletePlaybackQueue", "summary": "Delete a queue.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "boolean"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}}, "/api/v1/playback-queues": {"get": {"operationId": "PlaybackQueueController_queryPlaybackQueues", "summary": "Query queues.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "type", "required": false, "in": "query", "schema": {"enum": ["static", "dynamic"], "type": "string"}}, {"name": "sort", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}, "post": {"operationId": "PlaybackQueueController_createPlaybackQueue", "summary": "Create a new queue.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreatePlaybackQueueDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybackQueue"}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}}, "/api/v1/playback-queues/{id}/items": {"get": {"operationId": "PlaybackQueueController_queryPlaybackQueueItems", "summary": "Query queues.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "currentQueueItemId", "required": false, "in": "query", "schema": {"type": "string"}}, {"name": "leading", "required": false, "in": "query", "schema": {"type": "number"}}, {"name": "trailing", "required": false, "in": "query", "schema": {"type": "number"}}, {"name": "includeCurrentItemInReturn", "required": false, "in": "query", "schema": {"default": true, "type": "boolean"}}, {"name": "sort", "required": false, "in": "query", "schema": {"default": "createdAt", "enum": ["createdAt"], "type": "string"}}, {"name": "take", "required": false, "in": "query", "schema": {"default": 12, "type": "number"}}, {"name": "skip", "required": false, "in": "query", "schema": {"default": 0, "type": "number"}}, {"name": "order", "required": false, "in": "query", "schema": {"enum": ["ASC", "DESC"], "type": "string"}}], "responses": {"200": {"description": ""}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}}, "/api/v1/playback-queues/{id}/items/{queueItemId}": {"patch": {"operationId": "PlaybackQueueController_movePlaybackQueueItem", "summary": "Move a queue item behind another one.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}, {"name": "queueItemId", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MovePlaybackQueueItemDto"}}}}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/PlaybackQueueItem"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}}, "/api/v1/playback-queues/{id}/extend": {"post": {"operationId": "PlaybackQueueController_extend", "summary": "Add items to a queue.", "description": "

\ud83d\udee1\ufe0f Requires Capabilities: None

", "parameters": [{"name": "id", "required": true, "in": "path", "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExtendPlaybackQueueDto"}}}}, "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/PlaybackQueueItem"}}}}}, "401": {"description": "Possible reasons: The authorization token is invalid."}}, "tags": ["Playback Queues"], "security": [{"Local User JWT": []}]}}}, "info": {"title": "Cardinal Media Server API", "description": "

This is the API specification for your Cardinal Media Server.

\n

For the responsible disclosure of a security vulnerability, please email hackers@cardinalapps.io.

\n

Authorization

\n

There are two authorization tokens, and both are stored in your browser after you log in. You can enable developer mode in the app settings and copy the tokens from there.

\n
    \n
  • @cardinal/home_server_user_tolkien: Token for an account in your Media Server.
  • \n
  • @cardinal/cloud_user_tolkien: Token for a Cardinal cloud account. Some endpoints require this in addition to the other token.
  • \n
\n

Use the home_server_user_tolkien as the main authorization token in this API. Use the cloud_user_tolkien for endpoints that require the CardinalTolkien parameter or header.

\n

Some endpoints (e.g. audio streaming) accept the local user JWT as a token query parameter instead of the Authorization header, for contexts where custom request headers cannot be set (such as the browser's native <audio> element). The query parameter takes lower priority than the header; use the header wherever possible.

\n

Deleting Things

\n

None of the deletion endpoints in this API will delete your source media files. The only files that Cardinal will delete are the ones from its own cache. Rest assured that you can delete things from your database and your original files will stay safe.

\n ", "version": "", "contact": {}}, "tags": [], "servers": [], "components": {"securitySchemes": {"Local User JWT": {"scheme": "Bearer", "bearerFormat": "JWT", "name": "Authorization", "description": "Enter the JWT generated by your Cardinal Media Server for a local user. Do not prefix with \"Bearer\".", "type": "http", "in": "Header"}, "Local User JWT (Query Parameter)": {"type": "apiKey", "in": "query", "name": "token", "description": "Alternative to the Authorization header for contexts where custom headers cannot be set (e.g. browser native audio/video elements). Pass the local user JWT as the `token` query parameter. Use the Authorization header instead whenever possible."}}, "schemas": {"ServerSetupDto": {"type": "object", "properties": {"theme": {"type": "string"}, "serverName": {"type": "string"}, "sendAnonymousUsageData": {"type": "boolean"}, "ssoToken": {"type": "string"}}}, "ServerResetDto": {"type": "object", "properties": {"type": {"type": "string", "enum": ["media", "factory"]}, "validationString": {"type": "string", "enum": ["Deindex media", "Factory reset"]}}, "required": ["type", "validationString"]}, "LoginDetails": {"type": "object", "properties": {"userId": {"type": "string"}, "username": {"type": "string"}, "password": {"type": "string"}, "cardinalJWT": {"type": "string"}}}, "LoginResponse": {"type": "object", "properties": {"JWT": {"type": "string"}, "user": {"type": "object"}, "cloudJWT": {"type": "string"}, "cloudUser": {"type": "object"}, "refreshToken": {"type": "string"}, "scope": {"type": "object"}}, "required": ["JWT", "user"]}, "GetAppSettingsResponse": {"type": "object", "properties": {"settings": {"type": "object", "default": {}}}, "required": ["settings"]}, "UpsertSettings": {"type": "object", "properties": {"app": {"type": "string", "enum": ["admin", "music", "photos", "cinema"]}, "settings": {"type": "object", "default": {}}}, "required": ["settings"]}, "UpsertSettingsResponse": {"type": "object", "properties": {"updated": {"type": "object", "default": {}}}}, "GetUserResponse": {"type": "object", "properties": {"cardinalUser": {"type": "object"}, "localUser": {"type": "object"}}, "required": ["localUser"]}, "UpdateUserDto": {"type": "object", "properties": {"enabled": {"type": "boolean"}, "password": {"type": "string"}}}, "User": {"type": "object", "properties": {"userId": {"type": "string"}, "cardinalId": {"type": "string"}, "cachedCloudUser": {"type": "object", "properties": {"subscription": {"required": true, "enum": ["free", "early_adopter", "starter", "pro", "ultimate"], "type": "string"}}}, "cachedCloudUserAt": {"format": "date-time", "type": "string"}, "enabled": {"type": "boolean"}, "role": {"type": "string"}, "designation": {"type": "string"}, "activityStatus": {"type": "string"}, "activityStatusUpdatedAt": {"format": "date-time", "type": "string"}, "roles": {"type": "array", "items": {"$ref": "#/components/schemas/RoleAssignment"}}, "username": {"type": "string"}, "password": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["userId", "cachedCloudUser", "role", "roles", "id", "createdAt", "updatedAt", "deletedAt"]}, "RoleAssignment": {"type": "object", "properties": {"id": {"type": "number"}, "user": {"$ref": "#/components/schemas/User"}, "role": {"type": "string"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["id", "user", "role", "createdAt", "updatedAt", "deletedAt"]}, "CreateUser": {"type": "object", "properties": {"cardinalJWT": {"type": "string"}, "username": {"type": "string"}, "password": {"type": "string"}, "role": {"type": "object"}}, "required": ["role"]}, "AssignRolesDto": {"type": "object", "properties": {"userIds": {"default": [], "type": "array", "items": {"type": "string"}}}, "required": ["userIds"]}, "StateChangeActionDto": {"type": "object", "properties": {"action": {"type": "object"}}, "required": ["action"]}, "CreateRunDto": {"type": "object", "properties": {"indexMusic": {"type": "boolean"}, "indexPhotos": {"type": "boolean"}, "indexMovies": {"type": "boolean"}, "indexTV": {"type": "boolean"}, "type": {"type": "string", "enum": ["quick", "full"]}}, "required": ["indexMusic", "indexPhotos", "indexMovies", "indexTV", "type"]}, "Run": {"type": "object", "properties": {"runId": {"type": "string"}, "file": {"type": "array", "items": {"$ref": "#/components/schemas/File"}}, "status": {"type": "string"}, "type": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["runId", "status", "type", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicGenre": {"type": "object", "properties": {"releases": {"type": "array", "items": {"$ref": "#/components/schemas/MusicRelease"}}, "musicGenreId": {"type": "string"}, "name": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["musicGenreId", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicReleaseMetadata": {"type": "object", "properties": {"release": {"$ref": "#/components/schemas/MusicRelease"}, "metadataType": {"type": "object"}, "metadataFormat": {"type": "object"}, "metaKey": {"type": "string"}, "metaValue": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["release", "metaKey", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicReleaseThumbnail": {"type": "object", "properties": {"thumbnailId": {"type": "string"}, "absolutePath": {"type": "string", "nullable": true}, "relativeSrc": {"type": "string", "nullable": true}, "size": {"type": "string"}, "format": {"type": "string"}, "width": {"type": "number"}, "height": {"type": "number"}, "bytes": {"type": "number"}, "release": {"$ref": "#/components/schemas/MusicRelease"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["thumbnailId", "absolutePath", "relativeSrc", "size", "format", "width", "height", "bytes", "release", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicRelease": {"type": "object", "properties": {"tracks": {"type": "array", "items": {"$ref": "#/components/schemas/MusicTrack"}}, "artist": {"$ref": "#/components/schemas/MusicArtist"}, "artists": {"type": "array", "items": {"$ref": "#/components/schemas/MusicArtist"}}, "genres": {"type": "array", "items": {"$ref": "#/components/schemas/MusicGenre"}}, "musicReleaseId": {"type": "string"}, "title": {"type": "string"}, "sortTitle": {"type": "string"}, "releaseType": {"enum": ["album", "ep", "single", "compilation", "soundtrack", "live", "remix", "dj-mix", "broadcast", "demo"], "type": "string"}, "metadata": {"type": "array", "items": {"$ref": "#/components/schemas/MusicReleaseMetadata"}}, "thumbnails": {"type": "array", "items": {"$ref": "#/components/schemas/MusicReleaseThumbnail"}}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["musicReleaseId", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicArtistMetadata": {"type": "object", "properties": {"musicTrack": {"$ref": "#/components/schemas/MusicArtist"}, "metadataType": {"type": "object"}, "metadataFormat": {"type": "object"}, "metaKey": {"type": "string"}, "metaValue": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["musicTrack", "metaKey", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicArtist": {"type": "object", "properties": {"tracks": {"type": "array", "items": {"$ref": "#/components/schemas/MusicTrack"}}, "releases": {"type": "array", "items": {"$ref": "#/components/schemas/MusicRelease"}}, "musicArtistId": {"type": "string"}, "name": {"type": "string"}, "sortName": {"type": "string"}, "metadata": {"type": "array", "items": {"$ref": "#/components/schemas/MusicArtistMetadata"}}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["musicArtistId", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicTrackMetadata": {"type": "object", "properties": {"track": {"$ref": "#/components/schemas/MusicTrack"}, "metadataType": {"type": "object"}, "metadataFormat": {"type": "object"}, "metaKey": {"type": "string"}, "metaValue": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["track", "metaKey", "id", "createdAt", "updatedAt", "deletedAt"]}, "Library": {"type": "object", "properties": {"id": {"type": "number"}, "libraryId": {"type": "string"}, "name": {"type": "string"}, "paths": {"type": "array", "items": {"type": "string"}}, "user": {"$ref": "#/components/schemas/User"}, "playbackQueues": {"type": "array", "items": {"$ref": "#/components/schemas/PlaybackQueue"}}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["id", "libraryId", "name", "paths", "user", "playbackQueues", "createdAt", "updatedAt", "deletedAt"]}, "PlaybackQueue": {"type": "object", "properties": {"queueId": {"type": "string"}, "user": {"$ref": "#/components/schemas/User"}, "type": {"type": "object"}, "dynamicType": {"type": "object"}, "seedMediaType": {"type": "string"}, "seedMediaId": {"type": "string"}, "libraries": {"type": "array", "items": {"$ref": "#/components/schemas/Library"}}, "items": {"type": "array", "items": {"$ref": "#/components/schemas/PlaybackQueueItem"}}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["queueId", "user", "type", "dynamicType", "libraries", "id", "createdAt", "updatedAt", "deletedAt"]}, "PlaybackQueueItem": {"type": "object", "properties": {"queueItemId": {"type": "string"}, "queue": {"$ref": "#/components/schemas/PlaybackQueue"}, "history": {"$ref": "#/components/schemas/MusicHistory"}, "mediaType": {"type": "string"}, "mediaId": {"type": "string"}, "position": {"type": "number"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["queueItemId", "queue", "mediaType", "mediaId", "position", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicHistory": {"type": "object", "properties": {"playbackEntryId": {"type": "string"}, "progress": {"type": "number"}, "track": {"$ref": "#/components/schemas/MusicTrack"}, "queueItem": {"$ref": "#/components/schemas/PlaybackQueueItem"}, "user": {"$ref": "#/components/schemas/User"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["playbackEntryId", "progress", "track", "user", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicTrackWaveform": {"type": "object", "properties": {"track": {"$ref": "#/components/schemas/MusicTrack"}, "version": {"type": "number"}, "binCount": {"type": "number"}, "data": {"type": "object"}, "integratedLufs": {"type": "number"}, "truePeakDb": {"type": "number"}, "silenceLeadIn": {"type": "number"}, "silenceLeadOut": {"type": "number"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["track", "version", "binCount", "data", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicTrack": {"type": "object", "properties": {"file": {"$ref": "#/components/schemas/File"}, "artists": {"type": "array", "items": {"$ref": "#/components/schemas/MusicArtist"}}, "release": {"$ref": "#/components/schemas/MusicRelease"}, "musicTrackId": {"type": "string"}, "title": {"type": "string"}, "sortTitle": {"type": "string"}, "trackNumber": {"type": "number"}, "discNumber": {"type": "number"}, "duration": {"type": "number"}, "bitrate": {"type": "number"}, "metadata": {"type": "array", "items": {"$ref": "#/components/schemas/MusicTrackMetadata"}}, "history": {"type": "array", "items": {"$ref": "#/components/schemas/MusicHistory"}}, "waveform": {"$ref": "#/components/schemas/MusicTrackWaveform"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["file", "artists", "release", "musicTrackId", "id", "createdAt", "updatedAt", "deletedAt"]}, "PhotoMetadata": {"type": "object", "properties": {"photo": {"$ref": "#/components/schemas/Photo"}, "metadataType": {"type": "string"}, "metadataFormat": {"type": "string"}, "metaKey": {"type": "string"}, "metaValue": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["photo", "metaKey", "id", "createdAt", "updatedAt", "deletedAt"]}, "PhotoThumbnail": {"type": "object", "properties": {"thumbnailId": {"type": "string"}, "absolutePath": {"type": "string", "nullable": true}, "relativeSrc": {"type": "string", "nullable": true}, "size": {"type": "string"}, "format": {"type": "string"}, "width": {"type": "number"}, "height": {"type": "number"}, "bytes": {"type": "number"}, "photo": {"$ref": "#/components/schemas/Photo"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["thumbnailId", "absolutePath", "relativeSrc", "size", "format", "width", "height", "bytes", "photo", "id", "createdAt", "updatedAt", "deletedAt"]}, "PhotoVariation": {"type": "object", "properties": {"variationId": {"type": "string"}, "absolutePath": {"type": "string", "nullable": true}, "relativeSrc": {"type": "string", "nullable": true}, "format": {"type": "string"}, "bytes": {"type": "number"}, "photo": {"$ref": "#/components/schemas/Photo"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["variationId", "absolutePath", "relativeSrc", "format", "bytes", "photo", "id", "createdAt", "updatedAt", "deletedAt"]}, "PhotoAlbumMetadata": {"type": "object", "properties": {"photoAlbum": {"$ref": "#/components/schemas/PhotoAlbum"}, "metaKey": {"type": "string"}, "metaValue": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["photoAlbum", "metaKey", "id", "createdAt", "updatedAt", "deletedAt"]}, "PhotoAlbum": {"type": "object", "properties": {"user": {"$ref": "#/components/schemas/User"}, "photoAlbumId": {"type": "string"}, "name": {"type": "string"}, "entries": {"type": "array", "items": {"$ref": "#/components/schemas/PhotoAlbumEntry"}}, "metadata": {"type": "array", "items": {"$ref": "#/components/schemas/PhotoAlbumMetadata"}}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["photoAlbumId", "name", "entries", "metadata", "id", "createdAt", "updatedAt", "deletedAt"]}, "PhotoAlbumEntry": {"type": "object", "properties": {"photoAlbumEntryId": {"type": "string"}, "photo": {"$ref": "#/components/schemas/Photo"}, "photoAlbum": {"$ref": "#/components/schemas/PhotoAlbum"}, "featured": {"type": "boolean"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["photoAlbumEntryId", "photo", "photoAlbum", "featured", "id", "createdAt", "updatedAt", "deletedAt"]}, "Photo": {"type": "object", "properties": {"photoId": {"type": "string"}, "file": {"$ref": "#/components/schemas/File"}, "metadata": {"type": "array", "items": {"$ref": "#/components/schemas/PhotoMetadata"}}, "thumbnail": {"type": "array", "items": {"$ref": "#/components/schemas/PhotoThumbnail"}}, "variations": {"type": "array", "items": {"$ref": "#/components/schemas/PhotoVariation"}}, "photoAlbumEntries": {"type": "array", "items": {"$ref": "#/components/schemas/PhotoAlbumEntry"}}, "timestamp": {"type": "number"}, "takenAt": {"format": "date-time", "type": "string"}, "takenOnDay": {"type": "string"}, "modifiedAt": {"format": "date-time", "type": "string"}, "width": {"type": "number"}, "height": {"type": "number"}, "orientation": {"type": "string"}, "deviceMake": {"type": "string"}, "deviceModel": {"type": "string"}, "gpsLat": {"type": "number"}, "gpsLng": {"type": "number"}, "gpsLatRef": {"type": "string"}, "gpsLngRef": {"type": "string"}, "gpsAltitude": {"type": "string"}, "gpsTime": {"type": "string"}, "gpsDate": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["photoId", "file", "metadata", "thumbnail", "variations", "photoAlbumEntries", "timestamp", "takenAt", "takenOnDay", "modifiedAt", "width", "height", "orientation", "deviceMake", "deviceModel", "gpsLat", "gpsLng", "gpsLatRef", "gpsLngRef", "gpsAltitude", "gpsTime", "gpsDate", "id", "createdAt", "updatedAt", "deletedAt"]}, "Job": {"type": "object", "properties": {"jobId": {"type": "string"}, "user": {"$ref": "#/components/schemas/User"}, "run": {"$ref": "#/components/schemas/Run"}, "type": {"enum": ["album_art_thumbnails", "photo_variations", "photo_thumbnails", "generate_waveforms"], "type": "string"}, "status": {"enum": ["draft", "preparing", "in_queue", "running", "paused", "canceled", "completed", "errored"], "type": "string"}, "parameters": {"type": "object"}, "tasks": {"type": "array", "items": {"$ref": "#/components/schemas/JobTask"}}, "completedTasks": {"type": "number"}, "remainingTasks": {"type": "number"}, "totalTasks": {"type": "number"}, "completedAt": {"format": "date-time", "type": "string"}, "errorMessage": {"type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["jobId", "run", "type", "status", "completedTasks", "remainingTasks", "totalTasks", "completedAt", "errorMessage", "id", "createdAt", "updatedAt", "deletedAt"]}, "JobTask": {"type": "object", "properties": {"jobTaskId": {"type": "string"}, "job": {"$ref": "#/components/schemas/Job"}, "file": {"$ref": "#/components/schemas/File"}, "type": {"type": "string", "enum": ["create_album_artwork_thumbnail", "create_photo_thumbnail", "heic_to_jpeg", "generate_track_waveform"]}, "target": {"type": "string"}, "status": {"type": "string", "enum": ["draft", "in_queue", "running", "paused", "canceled", "completed", "errored"]}, "completedAt": {"format": "date-time", "type": "string"}, "errorMessage": {"type": "string"}, "results": {"type": "object"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["jobTaskId", "type", "target", "status", "completedAt", "errorMessage", "id", "createdAt", "updatedAt", "deletedAt"]}, "File": {"type": "object", "properties": {"user": {"$ref": "#/components/schemas/User"}, "run": {"$ref": "#/components/schemas/Run"}, "musicTrack": {"type": "array", "items": {"$ref": "#/components/schemas/MusicTrack"}}, "photo": {"$ref": "#/components/schemas/Photo"}, "fileId": {"type": "string"}, "jobTasks": {"type": "array", "items": {"$ref": "#/components/schemas/JobTask"}}, "absolutePath": {"type": "string"}, "relativePath": {"type": "string"}, "mimeType": {"type": "string"}, "extension": {"type": "string"}, "app": {"type": "string"}, "mediaType": {"type": "string"}, "size": {"type": "number"}, "mtime": {"format": "date-time", "type": "string"}, "lastSeen": {"format": "date-time", "type": "string"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["user", "run", "fileId", "jobTasks", "absolutePath", "relativePath", "extension", "app", "mediaType", "size", "lastSeen", "id", "createdAt", "updatedAt", "deletedAt"]}, "MusicTrackComputed": {"type": "object", "properties": {"file": {"$ref": "#/components/schemas/File"}, "artists": {"type": "array", "items": {"$ref": "#/components/schemas/MusicArtist"}}, "release": {"$ref": "#/components/schemas/MusicRelease"}, "musicTrackId": {"type": "string"}, "title": {"type": "string"}, "sortTitle": {"type": "string"}, "trackNumber": {"type": "number"}, "discNumber": {"type": "number"}, "duration": {"type": "number"}, "bitrate": {"type": "number"}, "metadata": {"type": "array", "items": {"$ref": "#/components/schemas/MusicTrackMetadata"}}, "history": {"type": "array", "items": {"$ref": "#/components/schemas/MusicHistory"}}, "waveform": {"$ref": "#/components/schemas/MusicTrackWaveform"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}, "numEntries": {"type": "number"}, "playCount": {"type": "number"}, "rating": {"type": "number", "nullable": true}}, "required": ["file", "artists", "release", "musicTrackId", "id", "createdAt", "updatedAt", "deletedAt"]}, "CreateLibraryDto": {"type": "object", "properties": {"name": {"type": "string"}, "paths": {"type": "array", "items": {"type": "string"}}}, "required": ["name", "paths"]}, "UpdateLibraryBodyDto": {"type": "object", "properties": {"name": {"type": "string"}, "paths": {"type": "array", "items": {"type": "string"}}}}, "SetRatingDto": {"type": "object", "properties": {"mediaType": {"type": "string", "enum": ["music_track"]}, "mediaId": {"type": "string"}, "rating": {"type": "number", "minimum": 0, "maximum": 1}}, "required": ["mediaType", "mediaId", "rating"]}, "Rating": {"type": "object", "properties": {"ratingId": {"type": "string"}, "rating": {"type": "number"}, "mediaType": {"type": "string"}, "mediaId": {"type": "string"}, "user": {"$ref": "#/components/schemas/User"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["ratingId", "rating", "mediaType", "mediaId", "user", "id", "createdAt", "updatedAt", "deletedAt"]}, "UpdatePhotoBodyDto": {"type": "object", "properties": {"photoAlbums": {"type": "array", "items": {"type": "number"}}}, "required": ["photoAlbums"]}, "CreatePhotoAlbumDto": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}, "UpdatePhotoAlbumBodyDto": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}, "CreateJobDto": {"type": "object", "properties": {"type": {"type": "string", "enum": ["album_art_thumbnails", "photo_variations", "photo_thumbnails", "generate_waveforms"]}}, "required": ["type"]}, "UpdateJobDto": {"type": "object", "properties": {"status": {"type": "string", "enum": ["draft", "preparing", "in_queue", "running", "paused", "canceled", "completed", "errored"]}, "completedAt": {"format": "date-time", "type": "string"}}}, "CreateMusicHistoryEntryDto": {"type": "object", "properties": {"seconds": {"type": "number"}, "trackId": {"type": "string"}, "queueItemId": {"type": "string"}}, "required": ["seconds", "trackId", "queueItemId"]}, "Invitation": {"type": "object", "properties": {"invitationId": {"type": "string"}, "expiresAt": {"format": "date-time", "type": "string"}, "createdBy": {"$ref": "#/components/schemas/User"}, "invitee": {"type": "string"}, "cloudLink": {"type": "string"}, "userFriendlyCode": {"type": "string"}, "type": {"type": "object"}, "id": {"type": "number"}, "createdAt": {"format": "date-time", "type": "string"}, "updatedAt": {"format": "date-time", "type": "string"}, "deletedAt": {"format": "date-time", "type": "string"}}, "required": ["invitationId", "createdBy", "cloudLink", "type", "id", "createdAt", "updatedAt", "deletedAt"]}, "CreateInvitationDto": {"type": "object", "properties": {}}, "MovePlaybackQueueItemDto": {"type": "object", "properties": {"afterQueueItemId": {"type": "string"}}, "required": ["afterQueueItemId"]}, "CreatePlaybackQueueDto": {"type": "object", "properties": {}}, "ExtendPlaybackQueueDto": {"type": "object", "properties": {"insert": {"type": "string", "enum": ["next", "end"]}, "items": {"type": "array", "items": {"type": "object"}}}}}}}