{
  "JSONRPC.Introspect": {
    "type": "method",
    "description": "Enumerates all actions and descriptions",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "getdescriptions", "type": "boolean", "default": true },
      { "name": "getmetadata", "type": "boolean", "default": false },
      { "name": "filterbytransport", "type": "boolean", "default": true },
      { "name": "filter", "type": "object",
        "properties": {
          "id": { "type": "string", "required": true, "description": "Name of a namespace, method or type" },
          "type": { "type": "string", "required": true, "enum": [ "method", "namespace", "type", "notification" ], "description": "Type of the given name" },
          "getreferences": { "type": "boolean", "default": true, "description": "Whether or not to print the schema for referenced types" }
        }
      }
    ],
    "returns": "object"
  },
  "JSONRPC.Version": {
    "type": "method",
    "description": "Retrieve the JSON-RPC protocol version.",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": {
      "type": "object",
      "properties": {
        "version": { "type": "object", "required": true,
          "properties": {
            "major": { "type": "integer", "minimum": 0, "required": true, "description": "Bumped on backwards incompatible changes to the API definition" },
            "minor": { "type": "integer", "minimum": 0, "required": true, "description": "Bumped on backwards compatible additions/changes to the API definition" },
            "patch": { "type": "integer", "minimum": 0, "required": true, "description": "Bumped on any changes to the internal implementation but not to the API definition" }
          }
        }
      }
    }
  },
  "JSONRPC.Permission": {
    "type": "method",
    "description": "Retrieve the clients permissions",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": {
      "type": "object",
      "properties": {
        "ReadData": { "type": "boolean", "required": true },
        "ControlPlayback": { "type": "boolean", "required": true },
        "ControlNotify": { "type": "boolean", "required": true },
        "ControlPower": { "type": "boolean", "required": true },
        "UpdateData": { "type": "boolean", "required": true },
        "RemoveData": { "type": "boolean", "required": true },
        "Navigate": { "type": "boolean", "required": true },
        "WriteFile": { "type": "boolean", "required": true },
        "ControlSystem": { "type": "boolean", "required": true },
        "ControlGUI": { "type": "boolean", "required": true },
        "ManageAddon": { "type": "boolean", "required": true },
        "ExecuteAddon": { "type": "boolean", "required": true },
        "ControlPVR": { "type": "boolean", "required": true }
      }
    }
  },
  "JSONRPC.Ping": {
    "type": "method",
    "description": "Ping responder",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": "string"
  },
  "JSONRPC.GetConfiguration": {
    "type": "method",
    "description": "Get client-specific configurations",
    "transport": "Announcing",
    "permission": "ReadData",
    "params": [],
    "returns": { "$ref": "Configuration" }
  },
  "JSONRPC.SetConfiguration": {
    "type": "method",
    "description": "Change the client-specific configuration",
    "transport": "Announcing",
    "permission": "ControlNotify",
    "params": [
      { "name": "notifications", "type": "object",
        "properties": {
          "Player": { "$ref": "Optional.Boolean" },
          "Playlist": { "$ref": "Optional.Boolean" },
          "GUI": { "$ref": "Optional.Boolean" },
          "System": { "$ref": "Optional.Boolean" },
          "AudioLibrary": { "$ref": "Optional.Boolean" },
          "VideoLibrary": { "$ref": "Optional.Boolean" },
          "Application": { "$ref": "Optional.Boolean" },
          "Input": { "$ref": "Optional.Boolean" },
          "Other": { "$ref": "Optional.Boolean" }
        }
      }
    ],
    "returns": { "$ref": "Configuration" }
  },
  "JSONRPC.NotifyAll": {
    "type": "method",
    "description": "Notify all other connected clients",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "sender", "type": "string", "required": true },
      { "name": "message", "type": "string", "required": true },
      { "name": "data", "type": "any", "default": null }
    ],
    "returns": "any"
  },
  "Player.Open": {
    "type": "method",
    "description": "Start playback of either the playlist with the given ID, a slideshow with the pictures from the given directory or a single file or an item from the database.",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "item",
        "type": [
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "playlistid": { "$ref": "Playlist.Id", "required": true },
              "position": { "$ref": "Playlist.Position", "default": 0 }
            }
          },
          { "$ref": "Playlist.Item", "required": true },
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "path": { "type": "string", "required": true },
              "random": { "type": "boolean", "default": true, "description": "Deprecated, use the shuffled property of the options parameter instead" },
              "recursive": { "type": "boolean", "default": true }
            }
          },
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "partymode": { "type": [
                  { "type": "string", "required": true, "enum": [ "music", "video" ] },
                  { "type": "string", "required": true, "minLength": 5, "description": "Path to a smartplaylist (*.xsp) file" }
                ]
              }
            }
          },
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "channelid": { "$ref": "Library.Id", "required": true }
            }
          },
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "recordingid": { "$ref": "Library.Id", "required": true }
            }
          }
        ]
      },
      { "name": "options", "type": "object", "additionalProperties": false,
        "properties": {
          "playername": { "type": [
              "null",
              { "type": "string", "enum": [ "default" ], "required": true },
              { "type": "string", "minLength": 1, "required": true, "description": "name of player" }
            ],
            "default": null
          },
          "shuffled": { "$ref": "Optional.Boolean" },
          "repeat": { "type": [ "null", { "$ref": "Player.Repeat", "required": true } ], "default": null },
          "resume": { "type": [
              { "type": "boolean", "required": true, "description": "Whether to resume from the resume point or not" },
              { "$ref": "Player.Position.Percentage", "required": true, "description": "Percentage value to start from" },
              { "$ref": "Player.Position.Time", "required": true, "description": "Time to start from" }
            ],
            "default": false
          }
        }
      }
    ],
    "returns": "string"
  },
  "Player.GetActivePlayers": {
    "type": "method",
    "description": "Returns all active players",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "object",
        "properties": {
          "playerid": { "$ref": "Player.Id", "required": true },
          "type": { "$ref": "Player.Type", "required": true },
          "playertype": { "type": "string", "enum": [ "internal", "external", "remote" ], "required": true }
        }
      }
    }
  },
  "Player.GetPlayers": {
    "type": "method",
    "description": "Get a list of available players",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "media", "type": "string", "enum": [ "all", "video", "audio" ], "default": "all" }
    ],
    "returns": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "object",
        "properties": {
          "name": { "$ref": "Global.String.NotEmpty", "required": true },
          "type": { "type": "string", "enum": [ "internal", "external", "remote" ], "required": true },
          "playsvideo": { "type": "boolean", "required": true },
          "playsaudio": { "type": "boolean", "required": true }
        }
      }
    }
  },
  "Player.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the given properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Player.Property.Name" } }
    ],
    "returns":  { "$ref": "Player.Property.Value", "required": true }
  },
  "Player.GetItem": {
    "type": "method",
    "description": "Retrieves the currently played item",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "properties", "$ref": "List.Fields.All" }
    ],
    "returns": { "type": "object",
      "properties": {
        "item": { "$ref": "List.Item.All", "required": true }
      }
    }
  },
  "Player.PlayPause": {
    "type": "method",
    "description": "Pauses or unpause playback and returns the new state",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "play", "$ref": "Global.Toggle", "default": "toggle" }
    ],
    "returns": { "$ref": "Player.Speed" }
  },
  "Player.Stop": {
    "type": "method",
    "description": "Stops playback",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true }
    ],
    "returns": "string"
  },
  "Player.SetSpeed": {
    "type": "method",
    "description": "Set the speed of the current playback",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "speed", "type": [
          { "type": "integer", "required": true, "enum": [ -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32 ] },
          { "$ref": "Global.IncrementDecrement", "required": true }
        ],
        "required": true
      }
    ],
    "returns": { "$ref": "Player.Speed" }
  },
  "Player.Seek": {
    "type": "method",
    "description": "Seek through the playing item",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "value", "required": true, "type": [
          { "$ref": "Player.Position.Percentage", "required": true, "description": "Percentage value to seek to" },
          { "$ref": "Player.Position.Time", "required": true, "description": "Time to seek to" },
          { "type": "string", "enum": [ "smallforward", "smallbackward", "bigforward", "bigbackward" ], "required": true, "description": "Seek by predefined jumps" },
          { "type": "object", "properties": { "percentage": { "$ref": "Player.Position.Percentage", "required": true, "description": "Percentage value to seek to" } }, "additionalProperties": false, "required": true },
          { "type": "object", "properties": { "time": { "$ref": "Player.Position.Time", "required": true, "description": "Time to seek to" } }, "additionalProperties": false, "required": true },
          { "type": "object", "properties": { "step": { "type": "string", "enum": [ "smallforward", "smallbackward", "bigforward", "bigbackward" ], "required": true, "description": "Seek by predefined jumps" } }, "additionalProperties": false, "required": true },
          { "type": "object", "properties": { "seconds": { "type": "integer", "required": true, "description": "Seek by the given number of seconds" } }, "additionalProperties": false, "required": true }
        ]
      }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "percentage": { "$ref": "Player.Position.Percentage" },
        "time": { "$ref": "Global.Time" },
        "totaltime": { "$ref": "Global.Time" }
      }
    }
  },
  "Player.Move": {
    "type": "method",
    "description": "If picture is zoomed move viewport left/right/up/down otherwise skip previous/next",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "direction", "type": "string", "enum": [ "left", "right", "up", "down" ], "required": true }
    ],
    "returns": "string"
  },
  "Player.Zoom": {
    "type": "method",
    "description": "Zoom current picture",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "zoom", "type": [
          { "type": "string", "enum": [ "in", "out" ], "required": true },
          { "type": "integer", "minimum": 1, "maximum": 10, "description": "zoom level", "required": true }
        ],
      "required": true }
    ],
    "returns": "string"
  },
  "Player.SetViewMode": {
    "type": "method",
    "description": "Set view mode of video player",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "viewmode", "type": [
          { "$ref": "Player.CustomViewMode", "description": "Custom view mode", "required": true },
          { "name": "value", "$ref": "Player.ViewMode", "required": true}
        ],
      "required": true }
    ],
    "returns": "string"
  },
  "Player.GetViewMode": {
    "type": "method",
    "description": "Get view mode of video player",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": {
      "type": "object",
      "properties": {
        "viewmode": { "$ref": "Player.ViewMode", "required": true },
        "zoom": { "type": "number", "required": true },
        "pixelratio": { "type": "number", "required": true },
        "verticalshift": { "type": "number", "required": true },
        "nonlinearstretch": { "type": "boolean", "required": true }		
        }
      }
  },
  "Player.Rotate": {
    "type": "method",
    "description": "Rotates current picture",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "value", "type": "string", "enum": [ "clockwise", "counterclockwise" ], "default": "clockwise" }
    ],
    "returns": "string"
  },
  "Player.GoTo": {
    "type": "method",
    "description": "Go to previous/next/specific item in the playlist",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "to", "type": [
          { "type": "string", "enum": [ "previous", "next" ], "required": true },
          { "$ref": "Playlist.Position", "description": "position in playlist", "required": true }
        ],
      "required": true }
    ],
    "returns": "string"
  },
  "Player.SetShuffle": {
    "type": "method",
    "description": "Shuffle/Unshuffle items in the player",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
  { "name": "shuffle", "$ref": "Global.Toggle", "required": true }
    ],
    "returns": "string"
  },
  "Player.SetRepeat": {
    "type": "method",
    "description": "Set the repeat mode of the player",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "repeat", "type": [
          { "$ref": "Player.Repeat", "required": true },
          { "type": "string", "enum": [ "cycle" ], "required": true }
        ],
        "required": true
      }
    ],
    "returns": "string"
  },
  "Player.SetPartymode": {
    "type": "method",
    "description": "Turn partymode on or off",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "partymode", "$ref": "Global.Toggle", "required": true }
    ],
    "returns": "string"
  },
  "Player.SetAudioStream": {
    "type": "method",
    "description": "Set the audio stream played by the player",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "stream", "required": true, "type": [
          { "type": "string", "enum": [ "previous", "next" ] },
          { "type": "integer", "minimum": 0, "description": "Index of the audio stream to play" }
        ]
      }
    ],
    "returns": "string"
  },
  "Player.SetVideoStream": {
    "type": "method",
    "description": "Set the video stream played by the player",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "stream", "required": true, "type": [
          { "type": "string", "enum": [ "previous", "next" ] },
          { "type": "integer", "minimum": 0, "description": "Index of the video stream to play" }
        ]
      }
    ],
    "returns": "string"
  },
  "Player.SetSubtitle": {
    "type": "method",
    "description": "Set the subtitle displayed by the player",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playerid", "$ref": "Player.Id", "required": true },
      { "name": "subtitle", "required": true, "type": [
          { "type": "string", "enum": [ "previous", "next", "off", "on" ] },
          { "type": "integer", "minimum": 0, "description": "Index of the subtitle to display" }
        ]
      },
      { "name": "enable", "type": "boolean", "default": false, "description": "Whether to enable subtitles to be displayed after setting the new subtitle" }
    ],
    "returns": "string"
  },
  "Playlist.GetPlaylists": {
    "type": "method",
    "description": "Returns all existing playlists",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "object",
        "properties": {
          "playlistid": { "$ref": "Playlist.Id", "required": true },
          "type": { "$ref": "Playlist.Type", "required": true }
        }
      }
    }
  },
  "Playlist.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the given properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Playlist.Property.Name" } }
    ],
    "returns":  { "$ref": "Playlist.Property.Value", "required": true }
  },
  "Playlist.GetItems": {
    "type": "method",
    "description": "Get all items from playlist",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
      { "name": "properties", "$ref": "List.Fields.All" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "items": { "type": "array", "items": { "$ref": "List.Item.All" }, "required": true }
      }
    }
  },
  "Playlist.Add": {
    "type": "method",
    "description": "Add item(s) to playlist",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
      { "name": "item",
        "type": [
          { "$ref": "Playlist.Item", "required": true },
          { "type": "array", "items": { "$ref": "Playlist.Item" }, "required": true }
        ],
        "required": true }
    ],
    "returns": "string"
  },
  "Playlist.Insert": {
    "type": "method",
    "description": "Insert item(s) into playlist. Does not work for picture playlists (aka slideshows).",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
      { "name": "position", "$ref": "Playlist.Position", "required": true },
      { "name": "item",
        "type": [
          { "$ref": "Playlist.Item", "required": true },
          { "type": "array", "items": { "$ref": "Playlist.Item" }, "required": true }
        ],
        "required": true }
    ],
    "returns": "string"
  },
  "Playlist.Remove": {
    "type": "method",
    "description": "Remove item from playlist. Does not work for picture playlists (aka slideshows).",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
      { "name": "position", "$ref": "Playlist.Position", "required": true }
    ],
    "returns": "string"
  },
  "Playlist.Clear": {
    "type": "method",
    "description": "Clear playlist",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true }
    ],
    "returns": "string"
  },
  "Playlist.Swap": {
    "type": "method",
    "description": "Swap items in the playlist. Does not work for picture playlists (aka slideshows).",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
      { "name": "position1", "$ref": "Playlist.Position", "required": true },
      { "name": "position2", "$ref": "Playlist.Position", "required": true }
    ],
    "returns": "string"
  },
  "Files.GetSources": {
    "type": "method",
    "description": "Get the sources of the media windows",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "media", "$ref": "Files.Media", "required": true },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "sources": { "$ref": "List.Items.Sources", "required": true }
      }
    }
  },
  "Files.PrepareDownload": {
    "type": "method",
    "description": "Provides a way to download a given file (e.g. providing an URL to the real file location)",
    "transport": [ "Response", "FileDownloadRedirect" ],
    "permission": "ReadData",
    "params": [
      { "name": "path", "type": "string", "required": true }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "protocol": { "type": "string", "enum": [ "http" ], "required": true },
        "details": { "type": "any", "required": true, "description": "Transport specific details on how/from where to download the given file" },
        "mode": { "type": "string", "enum": [ "redirect", "direct" ], "required": true, "description": "Direct mode allows using Files.Download whereas redirect mode requires the usage of a different protocol" }
      }
    }
  },
  "Files.Download": {
    "type": "method",
    "description": "Downloads the given file",
    "transport": [ "Response", "FileDownloadDirect" ],
    "permission": "ReadData",
    "params": [
      { "name": "path", "type": "string", "required": true }
    ],
    "returns": { "type": "any", "required": true }
  },
  "Files.GetDirectory": {
    "type": "method",
    "description": "Get the directories and files in the given directory",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "directory", "type": "string", "required": true },
      { "name": "media", "$ref": "Files.Media", "default": "files" },
      { "name": "properties", "$ref": "List.Fields.Files" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "limits", "$ref": "List.Limits", "description": "Limits are applied after getting the directory content thus retrieval is not faster when they are applied." }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "files": { "type": "array", "items": { "$ref": "List.Item.File" }, "required": true }
      }
    }
  },
  "Files.GetFileDetails": {
    "type": "method",
    "description": "Get details for a specific file",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "file", "type": "string", "required": true, "description": "Full path to the file" },
      { "name": "media", "$ref": "Files.Media", "default": "files" },
      { "name": "properties", "$ref": "List.Fields.Files" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "filedetails": { "$ref": "List.Item.File", "required": true }
      }
    }
  },
  "Files.SetFileDetails": {
    "type": "method",
    "description": "Update the given specific file with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "file", "type": "string", "required": true, "description": "Full path to the file" },
      { "name": "media", "$ref": "Files.Media", "required": true, "description": "File type to update correct database. Currently only \"video\" is supported." },
      { "name": "playcount", "$ref": "Optional.Integer" },
      { "name": "lastplayed", "$ref": "Optional.String", "description": "Setting a valid lastplayed without a playcount will force playcount to 1." },
      { "name": "resume", "type": [ "null", { "$ref": "Video.Resume", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "AudioLibrary.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the music library properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Audio.Property.Name" } }
    ],
    "returns":  { "$ref": "Audio.Property.Value", "required": true }
  },
  "AudioLibrary.GetArtists": {
    "type": "method",
    "description": "Retrieve all artists. For backward compatibility by default this implicity does not include those that only contribute other roles, however absolutely all artists can be returned using allroles=true",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "albumartistsonly", "$ref": "Optional.Boolean", "description": "Whether or not to only include album artists rather than the artists of only individual songs as well. If the parameter is not passed or is passed as null the GUI setting will be used" },
      { "name": "properties", "$ref": "Audio.Fields.Artist" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true, "description": "Deprecated, use songgenreid. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "songgenreid": { "$ref": "Library.Id", "required": true, "description": "Song genreid. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "songgenreid": { "$ref": "Library.Id", "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "songgenreid": { "$ref": "Library.Id", "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true, "description": "Deprecated, use songgenre. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "songgenre": { "type": "string", "minLength": 1, "required": true, "description": "Song genre. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "songgenre": { "type": "string", "minLength": 1, "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "songgenre": { "type": "string", "minLength": 1, "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "albumid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "album": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "songid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "songid": { "$ref": "Library.Id", "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "songid": { "$ref": "Library.Id", "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "roleid": { "$ref": "Library.Id", "required": true, "description": "Role contributed by artist. Overridden by allroles parameter" } }, "additionalProperties": false },
          { "type": "object", "properties": { "role": { "type": "string", "minLength": 1, "required": true, "description": "Role contributed by artist. Overridden by allroles parameter" } }, "additionalProperties": false },
          { "$ref": "List.Filter.Artists" }
        ]
      },
      { "name": "allroles", "type": "boolean", "default":false, "description": "Whether or not to include all artists irrespective of the role they contributed. When true it overrides any role filter value." }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "artists": { "type": "array",
          "items": { "$ref": "Audio.Details.Artist" }
        }
      }
    }
  },
  "AudioLibrary.GetArtistDetails": {
    "type": "method",
    "description": "Retrieve details about a specific artist",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "artistid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Audio.Fields.Artist" }
    ],
    "returns": { "type": "object",
      "properties": {
        "artistdetails": { "$ref": "Audio.Details.Artist" }
      }
    }
  },
  "AudioLibrary.GetAlbums": {
    "type": "method",
    "description": "Retrieve all albums from specified artist (and role) or that has songs of the specified genre",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Audio.Fields.Album" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true, "description": "Song genre. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true, "description": "Song genre. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "artistid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "artistid": { "$ref": "Library.Id", "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "artistid": { "$ref": "Library.Id", "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "$ref": "List.Filter.Albums" }
        ]
      },
      { "name": "includesingles", "type": "boolean", "default": false },
      { "name": "allroles", "type": "boolean", "default":false, "description": "Whether or not to include all roles when filtering by artist, rather than the default of excluding other contributions. When true it overrides any role filter value." }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "albums": { "type": "array",
          "items": { "$ref": "Audio.Details.Album" }
        }
      }
    }
  },
  "AudioLibrary.GetAlbumDetails": {
    "type": "method",
    "description": "Retrieve details about a specific album",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "albumid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Audio.Fields.Album" }
    ],
    "returns": { "type": "object",
      "properties": {
        "albumdetails": { "$ref": "Audio.Details.Album" }
      }
    }
  },
  "AudioLibrary.GetSongs": {
    "type": "method",
    "description": "Retrieve all songs from specified album, artist or genre",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Audio.Fields.Song" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true, "description": "Song genre. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true, "description": "Song genre. Filter for existence of songs with this genre" } }, "additionalProperties": false },
          { "type": "object", "properties": { "artistid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "artistid": { "$ref": "Library.Id", "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "artistid": { "$ref": "Library.Id", "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true },
                                              "roleid": { "$ref": "Library.Id", "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true },
                                              "role": { "type": "string", "minLength": 1, "required": true }}, "additionalProperties": false },
          { "type": "object", "properties": { "albumid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "album": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "$ref": "List.Filter.Songs" }
        ]
      },
      { "name": "includesingles", "type": "boolean", "default": true, "description": "Only songs from albums are returned when false, but overidden when singlesonly parameter is true" },
      { "name": "allroles", "type": "boolean", "default":false, "description": "Whether or not to include all roles when filtering by artist, rather than default of excluding other contributors. When true it overrides any role filter value." },
      { "name": "singlesonly", "type": "boolean", "default": false, "description": "Only singles are returned when true, and overides includesingles parameter" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "songs": { "type": "array",
          "items": { "$ref": "Audio.Details.Song" }
        }
      }
    }
  },
  "AudioLibrary.GetSongDetails": {
    "type": "method",
    "description": "Retrieve details about a specific song",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "songid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Audio.Fields.Song" }
    ],
    "returns": { "type": "object",
      "properties": {
        "songdetails": { "$ref": "Audio.Details.Song" }
      }
    }
  },
  "AudioLibrary.GetRecentlyAddedAlbums": {
    "type": "method",
    "description": "Retrieve recently added albums",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Audio.Fields.Album" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "albums": { "type": "array",
          "items": { "$ref": "Audio.Details.Album" }
        }
      }
    }
  },
  "AudioLibrary.GetRecentlyAddedSongs": {
    "type": "method",
    "description": "Retrieve recently added songs",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "albumlimit", "$ref": "List.Amount", "description": "The amount of recently added albums from which to return the songs" },
      { "name": "properties", "$ref": "Audio.Fields.Song" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "songs": { "type": "array",
          "items": { "$ref": "Audio.Details.Song" }
        }
      }
    }
  },
    "AudioLibrary.GetRecentlyPlayedAlbums": {
    "type": "method",
    "description": "Retrieve recently played albums",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Audio.Fields.Album" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "albums": { "type": "array",
          "items": { "$ref": "Audio.Details.Album" }
        }
      }
    }
  },
  "AudioLibrary.GetRecentlyPlayedSongs": {
    "type": "method",
    "description": "Retrieve recently played songs",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Audio.Fields.Song" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "songs": { "type": "array",
          "items": { "$ref": "Audio.Details.Song" }
        }
      }
    }
  },
  "AudioLibrary.GetGenres": {
    "type": "method",
    "description": "Retrieve all genres",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Library.Fields.Genre" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "genres": { "type": "array", "required": true,
          "items": { "$ref": "Library.Details.Genre" }
        }
      }
    }
  },
  "AudioLibrary.GetSources": {
    "type": "method",
    "description": "Get all music sources, including unique ID",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Library.Fields.Source" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "sources": { "type": "array", "required": true,
          "items": { "$ref": "Library.Details.Source" }
        }
      }
    }
  },
  "AudioLibrary.GetRoles": {
    "type": "method",
    "description": "Retrieve all contributor roles",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Audio.Fields.Role" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "roles": { "type": "array", "required": true,
          "items": { "$ref": "Audio.Details.Role" }
        }
      }
    }
  },
  "AudioLibrary.SetArtistDetails": {
    "type": "method",
    "description": "Update the given artist with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "artistid", "$ref": "Library.Id", "required": true },
      { "name": "artist", "$ref": "Optional.String" },
      { "name": "instrument", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "style", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "mood", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "born", "$ref": "Optional.String" },
      { "name": "formed", "$ref": "Optional.String" },
      { "name": "description", "$ref": "Optional.String" },
      { "name": "genre", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "died", "$ref": "Optional.String" },
      { "name": "disbanded", "$ref": "Optional.String" },
      { "name": "yearsactive", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "musicbrainzartistid", "$ref": "Optional.String" },
      { "name": "sortname", "$ref": "Optional.String" },
      { "name": "type", "$ref": "Optional.String" },
      { "name": "gender", "$ref": "Optional.String" },
      { "name": "disambiguation", "$ref": "Optional.String" },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "AudioLibrary.SetAlbumDetails": {
    "type": "method",
    "description": "Update the given album with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "albumid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "artist", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "description", "$ref": "Optional.String" },
      { "name": "genre", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "theme", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "mood", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "style", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "type", "$ref": "Optional.String" },
      { "name": "albumlabel", "$ref": "Optional.String" },
      { "name": "rating", "$ref": "Optional.Number" },
      { "name": "year", "$ref": "Optional.Integer" },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "votes", "$ref": "Optional.Integer" },
      { "name": "musicbrainzalbumid", "$ref": "Optional.String" },
      { "name": "musicbrainzreleasegroupid", "$ref": "Optional.String" },
      { "name": "sortartist", "$ref": "Optional.String" },
      { "name": "displayartist", "$ref": "Optional.String" },
      { "name": "musicbrainzalbumartistid", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "AudioLibrary.SetSongDetails": {
    "type": "method",
    "description": "Update the given song with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "songid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "artist", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "genre", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "year", "$ref": "Optional.Integer" },
      { "name": "rating", "$ref": "Optional.Number" },
      { "name": "track", "$ref": "Optional.Integer" },
      { "name": "disc", "$ref": "Optional.Integer" },
      { "name": "duration", "$ref": "Optional.Integer" },
      { "name": "comment", "$ref": "Optional.String" },
      { "name": "musicbrainztrackid", "$ref": "Optional.String" },
      { "name": "musicbrainzartistid", "$ref": "Optional.String" },
      { "name": "playcount", "$ref": "Optional.Integer" },
      { "name": "lastplayed", "$ref": "Optional.String" },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "votes", "$ref": "Optional.Integer" },
      { "name": "displayartist", "$ref": "Optional.String" },
      { "name": "sortartist", "$ref": "Optional.String" },
      { "name": "mood", "$ref": "Optional.String" },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "AudioLibrary.Scan": {
    "type": "method",
    "description": "Scans the audio sources for new library items",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "directory", "type": "string", "default": "" },
      { "name": "showdialogs", "type": "boolean", "default": true, "description": "Whether or not to show the progress bar or any other GUI dialog" }
    ],
    "returns": "string"
  },
  "AudioLibrary.Export": {
    "type": "method",
    "description": "Exports all items from the audio library",
    "transport": "Response",
    "permission": "WriteFile",
    "params": [
      { "name": "options", "type": [
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "path": { "type": "string", "required": true, "minLength": 1, "description": "Path to the directory to where the data should be exported" }
            }
          },
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "overwrite": { "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
              "images": { "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" }
            }
          }
        ]
      }
    ],
    "returns": "string"
  },
  "AudioLibrary.Clean": {
    "type": "method",
    "description": "Cleans the audio library from non-existent items",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "showdialogs", "type": "boolean", "default": true, "description": "Whether or not to show the progress bar or any other GUI dialog" }
    ],
    "returns": "string"
  },
  "VideoLibrary.GetMovies": {
    "type": "method",
    "description": "Retrieve all movies",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.Movie" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "year": { "type": "integer", "minimum": 0, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "actor": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "director": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "studio": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "country": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "setid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "set": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "tag": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "$ref": "List.Filter.Movies" }
        ]
      }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "movies": { "type": "array",
          "items": { "$ref": "Video.Details.Movie" }
        }
      }
    }
  },
  "VideoLibrary.GetMovieDetails": {
    "type": "method",
    "description": "Retrieve details about a specific movie",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "movieid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Video.Fields.Movie" }
    ],
    "returns": { "type": "object",
      "properties": {
        "moviedetails": { "$ref": "Video.Details.Movie" }
      }
    }
  },
  "VideoLibrary.GetMovieSets": {
    "type": "method",
    "description": "Retrieve all movie sets",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.MovieSet" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "sets": { "type": "array",
          "items": { "$ref": "Video.Details.MovieSet" }
        }
      }
    }
  },
  "VideoLibrary.GetMovieSetDetails": {
    "type": "method",
    "description": "Retrieve details about a specific movie set",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "setid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Video.Fields.MovieSet" },
      { "name": "movies", "type": "object",
        "properties": {
          "properties": { "$ref": "Video.Fields.Movie" },
          "limits": { "$ref": "List.Limits" },
          "sort": { "$ref": "List.Sort" }
        }
      }
    ],
    "returns": { "type": "object",
      "properties": {
        "setdetails": { "$ref": "Video.Details.MovieSet.Extended" }
      }
    }
  },
  "VideoLibrary.GetTVShows": {
    "type": "method",
    "description": "Retrieve all tv shows",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.TVShow" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "year": { "type": "integer", "minimum": 0, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "actor": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "studio": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "tag": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "$ref": "List.Filter.TVShows" }
        ]
      }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "tvshows": { "type": "array",
          "items": { "$ref": "Video.Details.TVShow" }
        }
      }
    }
  },
  "VideoLibrary.GetTVShowDetails": {
    "type": "method",
    "description": "Retrieve details about a specific tv show",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "tvshowid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Video.Fields.TVShow" }
    ],
    "returns": { "type": "object",
      "properties": {
        "tvshowdetails": { "$ref": "Video.Details.TVShow" }
      }
    }
  },
  "VideoLibrary.GetSeasons": {
    "type": "method",
    "description": "Retrieve all tv seasons",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "tvshowid", "$ref": "Library.Id" },
      { "name": "properties", "$ref": "Video.Fields.Season" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "seasons": { "type": "array",
          "items": { "$ref": "Video.Details.Season" }
        }
      }
    }
  },
  "VideoLibrary.GetSeasonDetails": {
    "type": "method",
    "description": "Retrieve details about a specific tv show season",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "seasonid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Video.Fields.Season" }
    ],
    "returns": { "type": "object",
      "properties": {
        "seasondetails": { "$ref": "Video.Details.Season" }
      }
    }
  },
  "VideoLibrary.GetEpisodes": {
    "type": "method",
    "description": "Retrieve all tv show episodes",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "tvshowid", "$ref": "Library.Id" },
      { "name": "season", "type": "integer", "minimum": 0, "default": -1 },
      { "name": "properties", "$ref": "Video.Fields.Episode" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true, "description": "Requires tvshowid to be set" } }, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true, "description": "Requires tvshowid to be set" } }, "additionalProperties": false },
          { "type": "object", "properties": { "year": { "type": "integer", "minimum": 0, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "actor": { "type": "string", "minLength": 1, "required": true, "description": "Requires tvshowid to be set" } }, "additionalProperties": false },
          { "type": "object", "properties": { "director": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "$ref": "List.Filter.Episodes" }
        ]
      }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "episodes": { "type": "array",
          "items": { "$ref": "Video.Details.Episode" }
        }
      }
    }
  },
  "VideoLibrary.GetEpisodeDetails": {
    "type": "method",
    "description": "Retrieve details about a specific tv show episode",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "episodeid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Video.Fields.Episode" }
    ],
    "returns": { "type": "object",
      "properties": {
        "episodedetails": { "$ref": "Video.Details.Episode" }
      }
    }
  },
  "VideoLibrary.GetMusicVideos": {
    "type": "method",
    "description": "Retrieve all music videos",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.MusicVideo" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" },
      { "name": "filter",
        "type": [
          { "type": "object", "properties": { "artist": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "genreid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "genre": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "year": { "type": "integer", "minimum": 0, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "director": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "studio": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "type": "object", "properties": { "tag": { "type": "string", "minLength": 1, "required": true } }, "additionalProperties": false },
          { "$ref": "List.Filter.MusicVideos" }
        ]
      }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "musicvideos": { "type": "array",
          "items": { "$ref": "Video.Details.MusicVideo" }
        }
      }
    }
  },
  "VideoLibrary.GetMusicVideoDetails": {
    "type": "method",
    "description": "Retrieve details about a specific music video",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "musicvideoid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "Video.Fields.MusicVideo" }
    ],
    "returns": { "type": "object",
      "properties": {
        "musicvideodetails": { "$ref": "Video.Details.MusicVideo" }
      }
    }
  },
  "VideoLibrary.GetRecentlyAddedMovies": {
    "type": "method",
    "description": "Retrieve all recently added movies",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.Movie" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "movies": { "type": "array",
          "items": { "$ref": "Video.Details.Movie" }
        }
      }
    }
  },
  "VideoLibrary.GetRecentlyAddedEpisodes": {
    "type": "method",
    "description": "Retrieve all recently added tv episodes",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.Episode" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "episodes": { "type": "array",
          "items": { "$ref": "Video.Details.Episode" }
        }
      }
    }
  },
  "VideoLibrary.GetRecentlyAddedMusicVideos": {
    "type": "method",
    "description": "Retrieve all recently added music videos",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.MusicVideo" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "musicvideos": { "type": "array",
          "items": { "$ref": "Video.Details.MusicVideo" }
        }
      }
    }
  },
  "VideoLibrary.GetInProgressTVShows": {
    "type": "method",
    "description": "Retrieve all in progress tvshows",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Video.Fields.TVShow" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "tvshows": { "type": "array",
          "items": { "$ref": "Video.Details.TVShow" }
        }
      }
    }
  },
  "VideoLibrary.GetGenres": {
    "type": "method",
    "description": "Retrieve all genres",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "type", "type": "string", "required": true, "enum": [ "movie", "tvshow", "musicvideo"] },
      { "name": "properties", "$ref": "Library.Fields.Genre" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "genres": { "type": "array", "required": true,
          "items": { "$ref": "Library.Details.Genre" }
        }
      }
    }
  },
  "VideoLibrary.GetTags": {
    "type": "method",
    "description": "Retrieve all tags",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "type", "type": "string", "required": true, "enum": [ "movie", "tvshow", "musicvideo" ] },
      { "name": "properties", "$ref": "Library.Fields.Tag" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "tags": { "type": "array", "required": true,
          "items": { "$ref": "Library.Details.Tag" }
        }
      }
    }
  },
  "VideoLibrary.SetMovieDetails": {
    "type": "method",
    "description": "Update the given movie with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "movieid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "playcount", "$ref": "Optional.Integer" },
      { "name": "runtime", "$ref": "Optional.Integer", "description": "Runtime in seconds" },
      { "name": "director", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "studio", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "year", "$ref": "Optional.Integer", "description": "linked with premiered. Overridden by premiered parameter" },
      { "name": "plot", "$ref": "Optional.String" },
      { "name": "genre", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "rating", "$ref": "Optional.Number" },
      { "name": "mpaa", "$ref": "Optional.String" },
      { "name": "imdbnumber", "$ref": "Optional.String" },
      { "name": "votes", "$ref": "Optional.String" },
      { "name": "lastplayed", "$ref": "Optional.String" },
      { "name": "originaltitle", "$ref": "Optional.String" },
      { "name": "trailer", "$ref": "Optional.String" },
      { "name": "tagline", "$ref": "Optional.String" },
      { "name": "plotoutline", "$ref": "Optional.String" },
      { "name": "writer", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "country", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "top250", "$ref": "Optional.Integer" },
      { "name": "sorttitle", "$ref": "Optional.String" },
      { "name": "set", "$ref": "Optional.String" },
      { "name": "showlink", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "thumbnail", "$ref": "Optional.String" },
      { "name": "fanart", "$ref": "Optional.String" },
      { "name": "tag", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
      { "name": "resume", "type": [ "null", { "$ref": "Video.Resume", "required": true } ], "default": null },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "ratings", "$ref": "Video.Ratings.Set" },
      { "name": "dateadded", "$ref": "Optional.String" },
      { "name": "premiered", "$ref": "Optional.String", "description": "linked with year. Overrides year" },
      { "name": "uniqueid", "type": [ "null", { "$ref": "Media.UniqueID.Set", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "VideoLibrary.SetMovieSetDetails": {
    "type": "method",
    "description": "Update the given movie set with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "setid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
      { "name": "plot", "$ref": "Optional.String" }
    ],
    "returns": "string"
  },
  "VideoLibrary.SetTVShowDetails": {
    "type": "method",
    "description": "Update the given tvshow with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "tvshowid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "playcount", "$ref": "Optional.Integer" },
      { "name": "studio", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "plot", "$ref": "Optional.String" },
      { "name": "genre", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "rating", "$ref": "Optional.Number" },
      { "name": "mpaa", "$ref": "Optional.String" },
      { "name": "imdbnumber", "$ref": "Optional.String" },
      { "name": "premiered", "$ref": "Optional.String" },
      { "name": "votes", "$ref": "Optional.String" },
      { "name": "lastplayed", "$ref": "Optional.String" },
      { "name": "originaltitle", "$ref": "Optional.String" },
      { "name": "sorttitle", "$ref": "Optional.String" },
      { "name": "episodeguide", "$ref": "Optional.String" },
      { "name": "thumbnail", "$ref": "Optional.String" },
      { "name": "fanart", "$ref": "Optional.String" },
      { "name": "tag", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "ratings", "$ref": "Video.Ratings.Set" },
      { "name": "dateadded", "$ref": "Optional.String" },
      { "name": "runtime", "$ref": "Optional.Integer", "description": "Runtime in seconds" },
      { "name": "status", "$ref": "Optional.String" },
      { "name": "uniqueid", "type": [ "null", { "$ref": "Media.UniqueID.Set", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "VideoLibrary.SetSeasonDetails": {
    "type": "method",
    "description": "Update the given season with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "seasonid", "$ref": "Library.Id", "required": true },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "title", "$ref": "Optional.String" }
    ],
    "returns": "string"
  },
  "VideoLibrary.SetEpisodeDetails": {
    "type": "method",
    "description": "Update the given episode with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "episodeid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "playcount", "$ref": "Optional.Integer" },
      { "name": "runtime", "$ref": "Optional.Integer", "description": "Runtime in seconds" },
      { "name": "director", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "plot", "$ref": "Optional.String" },
      { "name": "rating", "$ref": "Optional.Number" },
      { "name": "votes", "$ref": "Optional.String" },
      { "name": "lastplayed", "$ref": "Optional.String" },
      { "name": "writer", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "firstaired", "$ref": "Optional.String" },
      { "name": "productioncode", "$ref": "Optional.String" },
      { "name": "season", "$ref": "Optional.Integer" },
      { "name": "episode", "$ref": "Optional.Integer" },
      { "name": "originaltitle", "$ref": "Optional.String" },
      { "name": "thumbnail", "$ref": "Optional.String" },
      { "name": "fanart", "$ref": "Optional.String" },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
      { "name": "resume", "type": [ "null", { "$ref": "Video.Resume", "required": true } ], "default": null },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "ratings", "$ref": "Video.Ratings.Set" },
      { "name": "dateadded", "$ref": "Optional.String" },
      { "name": "uniqueid", "type": [ "null", { "$ref": "Media.UniqueID.Set", "required": true } ], "default": null }
    ],
    "returns": "string"
  },
  "VideoLibrary.SetMusicVideoDetails": {
    "type": "method",
    "description": "Update the given music video with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "musicvideoid", "$ref": "Library.Id", "required": true },
      { "name": "title", "$ref": "Optional.String" },
      { "name": "playcount", "$ref": "Optional.Integer" },
      { "name": "runtime", "$ref": "Optional.Integer", "description": "Runtime in seconds" },
      { "name": "director", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "studio", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "year", "$ref": "Optional.Integer", "description": "linked with premiered. Overridden by premiered parameter" },
      { "name": "plot", "$ref": "Optional.String" },
      { "name": "album", "$ref": "Optional.String" },
      { "name": "artist", "type": [ "null", { "$ref": "Array.String", "required": true } ] },
      { "name": "genre", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "track", "$ref": "Optional.Integer" },
      { "name": "lastplayed", "$ref": "Optional.String" },
      { "name": "thumbnail", "$ref": "Optional.String" },
      { "name": "fanart", "$ref": "Optional.String" },
      { "name": "tag", "type": [ "null", { "$ref": "Array.String", "required": true } ], "default": null },
      { "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
      { "name": "resume", "type": [ "null", { "$ref": "Video.Resume", "required": true } ], "default": null },
      { "name": "rating", "$ref": "Optional.Number" },
      { "name": "userrating", "$ref": "Optional.Integer" },
      { "name": "dateadded", "$ref": "Optional.String" },
      { "name": "premiered", "$ref": "Optional.String", "description": "linked with year. Overrides year" }
    ],
    "returns": "string"
  },
  "VideoLibrary.RefreshMovie": {
    "type": "method",
    "description": "Refresh the given movie in the library",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "movieid", "$ref": "Library.Id", "required": true },
      { "name": "ignorenfo", "type": "boolean", "required": false, "default": false, "description": "Whether or not to ignore a local NFO if present." },
      { "name": "title", "type": "string", "required": "false", "default": "", "description": "Title to use for searching (instead of determining it from the item's filename/path)." }
    ],
    "returns": "string"
  },
  "VideoLibrary.RefreshTVShow": {
    "type": "method",
    "description": "Refresh the given tv show in the library",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "tvshowid", "$ref": "Library.Id", "required": true },
      { "name": "ignorenfo", "type": "boolean", "required": false, "default": false, "description": "Whether or not to ignore a local NFO if present." },
      { "name": "refreshepisodes", "type": "boolean", "required": false, "default": false, "description": "Whether or not to refresh all episodes belonging to the TV show." },
      { "name": "title", "type": "string", "required": "false", "default": "", "description": "Title to use for searching (instead of determining it from the item's filename/path)." }
    ],
    "returns": "string"
  },
  "VideoLibrary.RefreshEpisode": {
    "type": "method",
    "description": "Refresh the given episode in the library",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "episodeid", "$ref": "Library.Id", "required": true },
      { "name": "ignorenfo", "type": "boolean", "required": false, "default": false, "description": "Whether or not to ignore a local NFO if present." },
      { "name": "title", "type": "string", "required": "false", "default": "", "description": "Title to use for searching (instead of determining it from the item's filename/path)." }
    ],
    "returns": "string"
  },
  "VideoLibrary.RefreshMusicVideo": {
    "type": "method",
    "description": "Refresh the given music video in the library",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "musicvideoid", "$ref": "Library.Id", "required": true },
      { "name": "ignorenfo", "type": "boolean", "required": false, "default": false, "description": "Whether or not to ignore a local NFO if present." },
      { "name": "title", "type": "string", "required": "false", "default": "", "description": "Title to use for searching (instead of determining it from the item's filename/path)." }
    ],
    "returns": "string"
  },
  "VideoLibrary.RemoveMovie": {
    "type": "method",
    "description": "Removes the given movie from the library",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "movieid", "$ref": "Library.Id", "required": true }
    ],
    "returns": "string"
  },
  "VideoLibrary.RemoveTVShow": {
    "type": "method",
    "description": "Removes the given tv show from the library",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "tvshowid", "$ref": "Library.Id", "required": true }
    ],
    "returns": "string"
  },
  "VideoLibrary.RemoveEpisode": {
    "type": "method",
    "description": "Removes the given episode from the library",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "episodeid", "$ref": "Library.Id", "required": true }
    ],
    "returns": "string"
  },
  "VideoLibrary.RemoveMusicVideo": {
    "type": "method",
    "description": "Removes the given music video from the library",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "musicvideoid", "$ref": "Library.Id", "required": true }
    ],
    "returns": "string"
  },
  "VideoLibrary.Scan": {
    "type": "method",
    "description": "Scans the video sources for new library items",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "directory", "type": "string", "default": "" },
      { "name": "showdialogs", "type": "boolean", "default": true, "description": "Whether or not to show the progress bar or any other GUI dialog" }
    ],
    "returns": "string"
  },
  "VideoLibrary.Export": {
    "type": "method",
    "description": "Exports all items from the video library",
    "transport": "Response",
    "permission": "WriteFile",
    "params": [
      { "name": "options", "type": [
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "path": { "type": "string", "required": true, "minLength": 1, "description": "Path to the directory to where the data should be exported" }
            }
          },
          { "type": "object", "required": true, "additionalProperties": false,
            "properties": {
              "overwrite": { "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
              "images": { "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" },
              "actorthumbs": { "type": "boolean", "default": false, "description": "Whether to export actor thumbnails" }
            }
          }
        ]
      }
    ],
    "returns": "string"
  },
  "VideoLibrary.Clean": {
    "type": "method",
    "description": "Cleans the video library for non-existent items",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "showdialogs", "type": "boolean", "default": true, "description": "Whether or not to show the progress bar or any other GUI dialog" },
      { "name": "content", "type": "string", "default": "video", "enum": [ "video", "movies", "tvshows", "musicvideos" ], "description": "Content type to clean for" }
    ],
    "returns": "string"
  },
  "GUI.ActivateWindow": {
    "type": "method",
    "description": "Activates the given window",
    "transport": "Response",
    "permission": "ControlGUI",
    "params": [
      { "name": "window", "$ref": "GUI.Window", "required": true },
      { "name": "parameters", "type": "array", "items": { "type": "string", "minLength": 1, "required": true }, "minItems": 1 }
    ],
    "returns": "string"
  },
  "GUI.ShowNotification": {
    "type": "method",
    "description": "Shows a GUI notification",
    "transport": "Response",
    "permission": "ControlGUI",
    "params": [
      { "name": "title", "type": "string", "required": true },
      { "name": "message", "type": "string", "required": true },
      { "name": "image", "type": [
          { "type": "string", "required": true, "enum": [ "info", "warning", "error" ] },
          { "type": "string", "required": true }
        ], "default": ""
      },
      { "name": "displaytime", "type": "integer", "minimum": 1500, "default": 5000, "description": "The time in milliseconds the notification will be visible" }
    ],
    "returns": "string"
  },
  "GUI.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the given properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "GUI.Property.Name" } }
    ],
    "returns":  { "$ref": "GUI.Property.Value", "required": true }
  },
  "GUI.SetFullscreen": {
    "type": "method",
    "description": "Toggle fullscreen/GUI",
    "transport": "Response",
    "permission": "ControlGUI",
    "params": [
      { "name": "fullscreen", "required": true, "$ref": "Global.Toggle" }
    ],
    "returns": { "type": "boolean", "description": "Fullscreen state" }
  },
  "GUI.SetStereoscopicMode": {
    "type": "method",
    "description": "Sets the stereoscopic mode of the GUI to the given mode",
    "transport": "Response",
    "permission": "ControlGUI",
    "params": [
      { "name": "mode", "type": "string", "enum": [ "toggle", "tomono", "next", "previous", "select", "off", "split_vertical", "split_horizontal", "row_interleaved", "hardware_based", "anaglyph_cyan_red", "anaglyph_green_magenta", "monoscopic" ], "required": true }
    ],
    "returns": "string"
  },
  "GUI.GetStereoscopicModes": {
    "type": "method",
    "description": "Returns the supported stereoscopic modes of the GUI",
    "transport": "Response",
    "permission": "ReadData",
    "params": [],
    "returns": {
      "type": "object",
      "properties": {
        "stereoscopicmodes" : {
          "type": "array",
          "uniqueItems": true,
          "items": { "$ref": "GUI.Stereoscopy.Mode" }
        }
      }
    }
  },
  "Addons.GetAddons": {
    "type": "method",
    "description": "Gets all available addons",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "type", "$ref": "Addon.Types" },
      { "name": "content", "$ref": "Addon.Content", "description": "Content provided by the addon. Only considered for plugins and scripts." },
      { "name": "enabled", "type": [ { "type": "boolean" }, { "type": "string", "enum": [ "all" ] } ], "default": "all" },
      { "name": "properties", "$ref": "Addon.Fields" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "installed", "type": [ { "type": "boolean" }, { "type": "string", "enum": [ "all" ] } ], "default": true }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "addons": { "type": "array",
          "items": { "$ref": "Addon.Details" }
        }
      }
    }
  },
  "Addons.GetAddonDetails": {
    "type": "method",
    "description": "Gets the details of a specific addon",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "addonid", "type": "string", "required": true },
      { "name": "properties", "$ref": "Addon.Fields" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "addon": { "$ref": "Addon.Details", "required": true }
      }
    }
  },
  "Addons.SetAddonEnabled": {
    "type": "method",
    "description": "Enables/Disables a specific addon",
    "transport": "Response",
    "permission": "ManageAddon",
    "params": [
      { "name": "addonid", "type": "string", "required": true },
      { "name": "enabled", "$ref": "Global.Toggle", "required": true }
    ],
    "returns": "string"
  },
  "Addons.ExecuteAddon": {
    "type": "method",
    "description": "Executes the given addon with the given parameters (if possible)",
    "transport": "Response",
    "permission": "ExecuteAddon",
    "params": [
      { "name": "addonid", "type": "string", "required": true },
      { "name": "params", "type": [
          { "type": "object", "additionalProperties": { "type": "string" } },
          { "type": "array", "items": { "type": "string" } },
          { "type": "string", "description": "URL path (must start with / or ?" }
        ],
        "default": ""
      },
      { "name": "wait", "type": "boolean", "default": false }
    ],
    "returns": "string"
  },
  "PVR.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the given properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "PVR.Property.Name" } }
    ],
    "returns":  { "$ref": "PVR.Property.Value", "required": true }
  },
  "PVR.GetChannelGroups": {
    "type": "method",
    "description": "Retrieves the channel groups for the specified type",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "channeltype", "$ref": "PVR.Channel.Type", "required": true },
      { "name": "limits", "$ref": "List.Limits" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "channelgroups": { "type": "array", "required": true,
          "items": { "$ref": "PVR.Details.ChannelGroup" }
        }
      }
    }
  },
  "PVR.GetChannelGroupDetails": {
    "type": "method",
    "description": "Retrieves the details of a specific channel group",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "channelgroupid", "$ref": "PVR.ChannelGroup.Id", "required": true },
      { "name": "channels", "type": "object",
        "properties": {
          "properties": { "$ref": "PVR.Fields.Channel" },
          "limits": { "$ref": "List.Limits" }
        }
      }
    ],
    "returns": { "type": "object",
      "properties": {
        "channelgroupdetails": { "$ref": "PVR.Details.ChannelGroup.Extended" }
      }
    }
  },
  "PVR.GetChannels": {
    "type": "method",
    "description": "Retrieves the channel list",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "channelgroupid", "$ref": "PVR.ChannelGroup.Id", "required": true },
      { "name": "properties", "$ref": "PVR.Fields.Channel" },
      { "name": "limits", "$ref": "List.Limits" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "channels": { "type": "array", "required": true,
          "items": { "$ref": "PVR.Details.Channel" }
        }
      }
    }
  },
  "PVR.GetChannelDetails": {
    "type": "method",
    "description": "Retrieves the details of a specific channel",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "channelid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "PVR.Fields.Channel" }
    ],
    "returns": { "type": "object",
      "properties": {
        "channeldetails": { "$ref": "PVR.Details.Channel" }
      }
    }
  },
  "PVR.GetBroadcasts": {
    "type": "method",
    "description": "Retrieves the program of a specific channel",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "channelid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "PVR.Fields.Broadcast" },
      { "name": "limits", "$ref": "List.Limits" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "broadcasts": { "type": "array", "required": true,
          "items": { "$ref": "PVR.Details.Broadcast" }
        }
      }
    }
  },
  "PVR.GetBroadcastDetails": {
    "type": "method",
    "description": "Retrieves the details of a specific broadcast",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "broadcastid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "PVR.Fields.Broadcast" }
    ],
    "returns": { "type": "object",
      "properties": {
        "broadcastdetails": { "$ref": "PVR.Details.Broadcast" }
      }
    }
  },
  "PVR.GetTimers": {
    "type": "method",
    "description": "Retrieves the timers",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "PVR.Fields.Timer" },
      { "name": "limits", "$ref": "List.Limits" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "timers": { "type": "array", "required": true,
          "items": { "$ref": "PVR.Details.Timer" }
        }
      }
    }
  },
  "PVR.GetTimerDetails": {
    "type": "method",
    "description": "Retrieves the details of a specific timer",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "timerid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "PVR.Fields.Timer" }
    ],
    "returns": { "type": "object",
      "properties": {
        "timerdetails": { "$ref": "PVR.Details.Timer" }
      }
    }
  },
  "PVR.AddTimer": {
    "type": "method",
    "description": "Adds a timer to record the given show one times or a timer rule to record all showings of the given show",
    "transport": "Response",
    "permission": "ControlPVR",
    "params": [
      { "name": "broadcastid", "$ref": "Library.Id", "required": true, "description": "the broadcast id of the item to record" },
      { "name": "timerrule", "type": "boolean", "default": false, "description": "controls whether to create a timer rule or a onetime timer" }
    ],
    "returns":  "string"
  },
  "PVR.DeleteTimer": {
    "type": "method",
    "description": "Deletes a onetime timer or a timer rule",
    "transport": "Response",
    "permission": "ControlPVR",
    "params": [
      { "name": "timerid", "$ref": "Library.Id", "required": true, "description": "the id of the onetime timer or timer rule to delete" }
    ],
    "returns":  "string"
  },
  "PVR.ToggleTimer": {
    "type": "method",
    "description": "Creates or deletes a onetime timer or timer rule for a given show. If it exists, it will be deleted. If it does not exist, it will be created",
    "transport": "Response",
    "permission": "ControlPVR",
    "params": [
      { "name": "broadcastid", "$ref": "Library.Id", "required": true, "description": "the broadcast id of the item to toggle a onetime timer or time rule for" },
      { "name": "timerrule", "type": "boolean", "default": false, "description": "controls whether to create / delete a timer rule or a onetime timer" }
    ],
    "returns":  "string"
  },
  "PVR.GetRecordings": {
    "type": "method",
    "description": "Retrieves the recordings",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "PVR.Fields.Recording" },
      { "name": "limits", "$ref": "List.Limits" }
    ],
    "returns": { "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "recordings": { "type": "array", "required": true,
          "items": { "$ref": "PVR.Details.Recording" }
        }
      }
    }
  },
  "PVR.GetRecordingDetails": {
    "type": "method",
    "description": "Retrieves the details of a specific recording",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "recordingid", "$ref": "Library.Id", "required": true },
      { "name": "properties", "$ref": "PVR.Fields.Recording" }
    ],
    "returns": { "type": "object",
      "properties": {
        "recordingdetails": { "$ref": "PVR.Details.Recording" }
      }
    }
  },
  "PVR.Record": {
    "type": "method",
    "description": "Toggle recording of a channel",
    "transport": "Response",
    "permission": "ControlPVR",
    "params": [
      { "name": "record", "$ref": "Global.Toggle", "default": "toggle" },
      { "name": "channel", "type": [
          { "type": "string", "enum": [ "current" ], "required": true },
          { "$ref": "Library.Id", "required": true }
        ],
        "default": "current"
      }
    ],
    "returns":  "string"
  },
  "PVR.Scan": {
    "type": "method",
    "description": "Starts a channel scan",
    "transport": "Response",
    "permission": "ControlPVR",
    "params": [ ],
    "returns":  "string"
  },
  "Textures.GetTextures": {
    "type": "method",
    "description": "Retrieve all textures",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Textures.Fields.Texture" },
      { "name": "filter", "$ref": "List.Filter.Textures" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "textures": { "type": "array", "required": true,
          "items": { "$ref": "Textures.Details.Texture" }
        }
      }
    }
  },
  "Textures.RemoveTexture": {
    "type": "method",
    "description": "Remove the specified texture",
    "transport": "Response",
    "permission": "RemoveData",
    "params": [
      { "name": "textureid", "$ref": "Library.Id", "required": true, "description": "Texture database identifier" }
    ],
    "returns": "string"
  },
  "Profiles.GetProfiles": {
    "type": "method",
    "description": "Retrieve all profiles",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Profiles.Fields.Profile" },
      { "name": "limits", "$ref": "List.Limits" },
      { "name": "sort", "$ref": "List.Sort" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "profiles": { "type": "array", "required": true,
          "items": { "$ref": "Profiles.Details.Profile" }
        }
      }
    }
  },
  "Profiles.GetCurrentProfile": {
    "type": "method",
    "description": "Retrieve the current profile",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "$ref": "Profiles.Fields.Profile" }
    ],
    "returns":  { "$ref": "Profiles.Details.Profile", "required": true }
  },
  "Profiles.LoadProfile": {
    "type": "method",
    "description": "Load the specified profile",
    "transport": "Response",
    "permission": "Navigate",
    "params": [
      { "name": "profile", "type": "string", "required": true, "description": "Profile name" },
      { "name": "prompt", "type": "boolean", "description": "Prompt for password" },
      { "name": "password", "$ref": "Profiles.Password" }
    ],
    "returns": "string"
  },
  "System.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the given properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "System.Property.Name" } }
    ],
    "returns":  { "$ref": "System.Property.Value", "required": true }
  },
  "System.EjectOpticalDrive": {
    "type": "method",
    "description": "Ejects or closes the optical disc drive (if available)",
    "transport": "Response",
    "permission": "ControlSystem",
    "params": [ ],
    "returns":  "string"
  },
  "System.Shutdown": {
    "type": "method",
    "description": "Shuts the system running Kodi down",
    "transport": "Response",
    "permission": "ControlPower",
    "params": [],
    "returns": "string"
  },
  "System.Suspend": {
    "type": "method",
    "description": "Suspends the system running Kodi",
    "transport": "Response",
    "permission": "ControlPower",
    "params": [],
    "returns": "string"
  },
  "System.Hibernate": {
    "type": "method",
    "description": "Puts the system running Kodi into hibernate mode",
    "transport": "Response",
    "permission": "ControlPower",
    "params": [],
    "returns": "string"
  },
  "System.Reboot": {
    "type": "method",
    "description": "Reboots the system running Kodi",
    "transport": "Response",
    "permission": "ControlPower",
    "params": [],
    "returns": "string"
  },
  "Input.SendText": {
    "type": "method",
    "description": "Send a generic (unicode) text",
    "transport": "Response",
    "permission": "Navigate",
    "params": [
      { "name": "text", "type": "string", "required": true, "description": "Unicode text" },
      { "name": "done", "type": "boolean", "default": true, "description": "Whether this is the whole input or not (closes an open input dialog if true)." }
    ],
    "returns": "string"
  },
  "Input.ExecuteAction": {
    "type": "method",
    "description": "Execute a specific action",
    "transport": "Response",
    "permission": "Navigate",
    "params": [
      { "name": "action", "$ref": "Input.Action", "required": true }
    ],
    "returns": "string"
  },
  "Input.Left": {
    "type": "method",
    "description": "Navigate left in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Right": {
    "type": "method",
    "description": "Navigate right in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Down": {
    "type": "method",
    "description": "Navigate down in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Up": {
    "type": "method",
    "description": "Navigate up in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Select": {
    "type": "method",
    "description": "Select current item in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Back": {
    "type": "method",
    "description": "Goes back in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.ContextMenu": {
    "type": "method",
    "description": "Shows the context menu",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Info": {
    "type": "method",
    "description": "Shows the information dialog",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.Home": {
    "type": "method",
    "description": "Goes to home window in GUI",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.ShowCodec": {
    "type": "method",
    "description": "Show codec information of the playing item",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.ShowOSD": {
    "type": "method",
    "description": "Show the on-screen display for the current player",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Input.ShowPlayerProcessInfo": {
    "type": "method",
    "description": "Show player process information of the playing item, like video decoder, pixel format, pvr signal strength, ...",
    "transport": "Response",
    "permission": "Navigate",
    "params": [],
    "returns": "string"
  },
  "Application.GetProperties": {
    "type": "method",
    "description": "Retrieves the values of the given properties",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Application.Property.Name" } }
    ],
    "returns":  { "$ref": "Application.Property.Value", "required": true }
  },
  "Application.SetVolume": {
    "type": "method",
    "description": "Set the current volume",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "volume", "type": [
          { "type": "integer", "minimum": 0, "maximum": 100, "required": true },
          { "$ref": "Global.IncrementDecrement", "required": true }
        ],
        "required": true
      }
    ],
    "returns": "integer"
  },
  "Application.SetMute": {
    "type": "method",
    "description": "Toggle mute/unmute",
    "transport": "Response",
    "permission": "ControlPlayback",
    "params": [
      { "name": "mute", "required": true, "$ref": "Global.Toggle" }
    ],
    "returns": { "type": "boolean", "description": "Mute state" }
  },
  "Application.Quit": {
    "type": "method",
    "description": "Quit application",
    "transport": "Response",
    "permission": "ControlPower",
    "params": [],
    "returns": "string"
  },
  "XBMC.GetInfoLabels": {
    "type": "method",
    "description": "Retrieve info labels about Kodi and the system",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "labels", "type": "array", "required": true, "items": { "type": "string" }, "minItems": 1, "description": "See http://kodi.wiki/view/InfoLabels for a list of possible info labels" }
    ],
    "returns": {
      "type": "object",
      "description": "Object containing key-value pairs of the retrieved info labels",
      "additionalProperties": { "type": "string" }
    }
  },
  "XBMC.GetInfoBooleans": {
    "type": "method",
    "description": "Retrieve info booleans about Kodi and the system",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "booleans", "type": "array", "required": true, "items": { "type": "string" }, "minItems": 1 }
    ],
    "returns": {
      "type": "object",
      "description": "Object containing key-value pairs of the retrieved info booleans",
      "additionalProperties": { "type": "string" }
    }
  },
  "Favourites.GetFavourites": {
    "type": "method",
    "description": "Retrieve all favourites",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "type", "type": [ "null", { "$ref": "Favourite.Type" } ], "default": null },
      { "name": "properties", "$ref": "Favourite.Fields.Favourite" }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "limits": { "$ref": "List.LimitsReturned", "required": true },
        "favourites": { "type": "array",
          "items": { "$ref": "Favourite.Details.Favourite" }
        }
      }
    }
  },
  "Favourites.AddFavourite": {
    "type": "method",
    "description": "Add a favourite with the given details",
    "transport": "Response",
    "permission": "UpdateData",
    "params": [
      { "name": "title", "type": "string", "required": true },
      { "name": "type", "$ref": "Favourite.Type", "required": true },
      { "name": "path", "$ref": "Optional.String", "description": "Required for media and script favourites types" },
      { "name": "window", "$ref": "Optional.String", "description": "Required for window favourite type" },
      { "name": "windowparameter", "$ref": "Optional.String" },
      { "name": "thumbnail", "$ref": "Optional.String" }
    ],
    "returns": "string"
  },
  "Settings.GetSections": {
    "type": "method",
    "description": "Retrieves all setting sections",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "level", "$ref": "Setting.Level", "default": "standard" },
      { "name": "properties", "extends": "Item.Fields.Base",
        "items": { "type": "string",
          "enum": [ "categories" ]
        }
      }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "sections": { "type": "array",
          "items": { "$ref": "Setting.Details.Section" }
        }
      }
    }
  },
  "Settings.GetCategories": {
    "type": "method",
    "description": "Retrieves all setting categories",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "level", "$ref": "Setting.Level", "default": "standard" },
      { "name": "section", "type": "string", "default": "" },
      { "name": "properties", "extends": "Item.Fields.Base",
        "items": { "type": "string",
          "enum": [ "settings" ]
        }
      }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "categories": { "type": "array",
          "items": { "$ref": "Setting.Details.Category" }
        }
      }
    }
  },
  "Settings.GetSettings": {
    "type": "method",
    "description": "Retrieves all settings",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "level", "$ref": "Setting.Level", "default": "standard" },
      { "name": "filter", "type": [
          { "type": "object",
            "properties": {
              "section": { "type": "string", "required": true, "minLength": 1 },
              "category": { "type": "string", "required": true, "minLength": 1 }
            },
            "additionalProperties": false,
            "required": true
          }
        ],
        "default": null
      }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "settings": { "type": "array",
          "items": { "$ref": "Setting.Details.Setting" }
        }
      }
    }
  },
  "Settings.GetSettingValue": {
    "type": "method",
    "description": "Retrieves the value of a setting",
    "transport": "Response",
    "permission": "ReadData",
    "params": [
      { "name": "setting", "type": "string", "required": true, "minLength": 1 }
    ],
    "returns": {
      "type": "object",
      "properties": {
        "value": { "$ref": "Setting.Value.Extended", "required": true }
      }
    }
  },
  "Settings.SetSettingValue": {
    "type": "method",
    "description": "Changes the value of a setting",
    "transport": "Response",
    "permission": "WriteSetting",
    "params": [
      { "name": "setting", "type": "string", "required": true, "minLength": 1 },
      { "name": "value", "$ref": "Setting.Value.Extended", "required": true }
    ],
    "returns": "boolean"
  },
  "Settings.ResetSettingValue": {
    "type": "method",
    "description": "Resets the value of a setting",
    "transport": "Response",
    "permission": "WriteSetting",
    "params": [
      { "name": "setting", "type": "string", "required": true, "minLength": 1 }
    ],
    "returns": "string"
  }
}
