JSON-RPC API/v4

Version 4 is a stable version of XBMC's JSON-RPC API and is published with the release of Eden. It is a complete re-write and re-structuring of version 2 and therefore isn't backwards compatible to it. The main reason for this was the need to make this version fully compatible with all the functionality, features and requirements of the JSON-RPC 2.0 specification. This was a main concern during early development to make it easier for third party developers and applications to interact with XBMC's JSON-RPC API by using existing JSON-RPC libraries.

An rough and incomplete list of changes compared to version 2 can be found here. A more complete and detailed list can be found in the forum.

1 JSON-RPC 2.0 compatibility

Version

Method calls

Notifications(server-side)

Notifications(client-side)

Parametersby-name

Parametersby-position

Batch requests

Version 4

Yes

Yes

Yes

Yes

Yes

Yes

2 Documentation (JSON Schema)

Starting with JSON-RPC API version 3 a new way of API documentation has been introduced. All methods and data types are described using JSON Schema. This provides third party developers with an always complete and up-to-date documentation by calling JSONRPC.Introspect even during periods of heavy development. Furthermore the same method and data type specification that can be used by third party developers as a documentation is used by XBMC to check and verify method parameters and their values on every JSON-RPC request and allows to provide detailed error messages in case of a bad or missing parameter.

5.1.1 Application.GetProperties

{"returns":{"$ref":"Application.Property.Value"},"params":[{"uniqueItems":true,"items":{"$ref":"Application.Property.Name"},"required":true,"type":"array","name":"properties"}],"description":"Retrieves the values of the given properties"}

5.2.2 AudioLibrary.Export

Exports all items from the audio libraryPermissions:

WriteFile

Parameters:

[ mixed options ]

Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[{"type":[{"additionalProperties":false,"type":"object","properties":{"path":{"minLength":1,"required":true,"type":"string","description":"Path to the directory to where the data should be exported"}}},{"additionalProperties":false,"type":"object","properties":{"images":{"default":false,"type":"boolean","description":"Whether to export thumbnails and fanart images"},"overwrite":{"default":false,"type":"boolean","description":"Whether to overwrite existing exported files"}}}],"name":"options"}],"description":"Exports all items from the audio library"}

{"returns":{"type":"object","properties":{"albumdetails":{"$ref":"Audio.Details.Album"}}},"params":[{"required":true,"name":"albumid","$ref":"Library.Id"},{"name":"properties","$ref":"Audio.Fields.Album"}],"description":"Retrieve details about a specific album"}

{"returns":{"type":"object","properties":{"albums":{"items":{"$ref":"Audio.Details.Album"},"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"default":-1,"name":"artistid","$ref":"Library.Id"},{"default":-1,"name":"genreid","$ref":"Library.Id"},{"name":"properties","$ref":"Audio.Fields.Album"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all albums from specified artist or genre"}

{"returns":{"type":"object","properties":{"artistdetails":{"$ref":"Audio.Details.Artist"}}},"params":[{"required":true,"name":"artistid","$ref":"Library.Id"},{"name":"properties","$ref":"Audio.Fields.Artist"}],"description":"Retrieve details about a specific artist"}

{"returns":{"type":"object","properties":{"limits":{"required":true,"$ref":"List.LimitsReturned"},"artists":{"items":{"$ref":"Audio.Details.Artist"},"type":"array"}}},"params":[{"default":null,"description":"Whether or not to include artists only appearing in compilations. If the parameter is not passed or is passed as null the GUI setting will be used","name":"albumartistsonly","$ref":"Optional.Boolean"},{"default":-1,"name":"genreid","$ref":"Library.Id"},{"name":"properties","$ref":"Audio.Fields.Artist"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all artists"}

{"returns":{"type":"object","properties":{"genres":{"items":{"$ref":"Library.Details.Genre"},"required":true,"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"name":"properties","$ref":"Library.Fields.Genre"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all genres"}

{"returns":{"type":"object","properties":{"limits":{"required":true,"$ref":"List.LimitsReturned"},"songs":{"items":{"$ref":"Audio.Details.Song"},"type":"array"}}},"params":[{"default":-1,"description":"The amount of recently added albums from which to return the songs","name":"albumlimit","$ref":"List.Amount"},{"name":"properties","$ref":"Audio.Fields.Song"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve recently added songs"}

{"returns":{"type":"object","properties":{"songdetails":{"$ref":"Audio.Details.Song"}}},"params":[{"required":true,"name":"songid","$ref":"Library.Id"},{"name":"properties","$ref":"Audio.Fields.Song"}],"description":"Retrieve details about a specific song"}

{"returns":{"type":"object","properties":{"limits":{"required":true,"$ref":"List.LimitsReturned"},"songs":{"items":{"$ref":"Audio.Details.Song"},"type":"array"}}},"params":[{"default":-1,"name":"artistid","$ref":"Library.Id"},{"default":-1,"name":"albumid","$ref":"Library.Id"},{"default":-1,"name":"genreid","$ref":"Library.Id"},{"name":"properties","$ref":"Audio.Fields.Song"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all songs from specified album, artist or genre"}

5.2.12 AudioLibrary.Scan

Scans the audio sources for new library itemsPermissions:

UpdateData

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Scans the audio sources for new library items"}

5.3 Files

5.3.1 Files.Download

Provides a way to download a given file (e.g. providing an URL to the real file location)Permissions:

ReadData

Parameters:

string path

Returns:

Type:objectProperties:

string path

JSON Schema Description

{"returns":{"type":"object","properties":{"path":{"required":true,"type":"string"}}},"params":[{"required":true,"type":"string","name":"path"}],"description":"Provides a way to download a given file (e.g. providing an URL to the real file location)"}

{"returns":{"type":"object","properties":{"files":{"items":{"$ref":"List.Item.File"},"required":true,"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"required":true,"type":"string","name":"directory"},{"default":"files","name":"media","$ref":"Files.Media"},{"name":"properties","$ref":"List.Fields.All"},{"name":"sort","$ref":"List.Sort"}],"description":"Get the directories and files in the given directory"}

{"returns":{"type":"object","properties":{"sources":{"required":true,"$ref":"List.Items.Sources"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"required":true,"name":"media","$ref":"Files.Media"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Get the sources of the media windows"}

5.4 Input

5.4.1 Input.Back

Goes back in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Goes back in GUI"}

5.4.2 Input.Down

Navigate down in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Navigate down in GUI"}

5.4.3 Input.Home

Goes to home window in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Goes to home window in GUI"}

5.4.4 Input.Left

Navigate left in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Navigate left in GUI"}

5.4.5 Input.Right

Navigate right in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Navigate right in GUI"}

5.4.6 Input.Select

Select current item in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Select current item in GUI"}

5.4.7 Input.Up

Navigate up in GUIPermissions:

Navigate

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Navigate up in GUI"}

5.5 JSONRPC

5.5.1 JSONRPC.Introspect

Enumerates all actions and descriptionsPermissions:

ReadData

Parameters:

[ boolean getdescriptions = True ]

[ boolean getmetadata = False ]

[ boolean filterbytransport = True ]

[ object filter ]

Properties:

string type

string id

[ boolean getreferences = True ]

Returns:

Type:object

JSON Schema Description

{"returns":{"type":"object"},"params":[{"default":true,"type":"boolean","name":"getdescriptions"},{"default":false,"type":"boolean","name":"getmetadata"},{"default":true,"type":"boolean","name":"filterbytransport"},{"type":"object","name":"filter","properties":{"type":{"enums":["method","namespace","type","notification"],"type":"string","description":"Type of the given name","required":true},"id":{"required":true,"type":"string","description":"Name of a namespace, method or type"},"getreferences":{"default":true,"type":"boolean","description":"Whether or not to print the schema for referenced types"}}}],"description":"Enumerates all actions and descriptions"}

5.5.2 JSONRPC.NotifyAll

Notify all other connected clientsPermissions:

ReadData

Parameters:

string sender

string message

[ any data = null ]

Returns:any

JSON Schema Description

{"returns":{"type":"any"},"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"string","name":"message"},{"default":null,"type":"any","name":"data"}],"description":"Notify all other connected clients"}

5.6.2 Player.GetItem

{"returns":{"type":"object","properties":{"item":{"required":true,"$ref":"List.Item.All"}}},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"name":"properties","$ref":"List.Fields.All"}],"description":"Retrieves the currently played item"}

5.6.3 Player.GetProperties

{"returns":{"$ref":"Player.Property.Value"},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"uniqueItems":true,"items":{"$ref":"Player.Property.Name"},"required":true,"type":"array","name":"properties"}],"description":"Retrieves the values of the given properties"}

5.6.6 Player.GoTo

{"returns":{"type":"string"},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"required":true,"name":"position","$ref":"Playlist.Position"}],"description":"Go to item at the given position in the playlist"}

5.6.11 Player.Open

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.Permissions:

ControlPlayback

Parameters:

[ mixed item ]

Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[{"type":[{"additionalProperties":false,"type":"object","properties":{"position":{"default":0,"$ref":"Playlist.Position"},"playlistid":{"required":true,"$ref":"Playlist.Id"}}},{"$ref":"Playlist.Item"},{"additionalProperties":false,"type":"object","properties":{"path":{"required":true,"type":"string"},"random":{"default":true,"type":"boolean"},"recursive":{"default":true,"type":"boolean"}}}],"name":"item"}],"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."}

5.6.13 Player.Repeat

{"returns":{"type":"string"},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"required":true,"name":"state","$ref":"Player.Repeat"}],"description":"Set the repeat mode of the player"}

{"returns":{"type":"object","properties":{"totaltime":{"$ref":"Global.Time"},"percentage":{"default":0,"$ref":"Player.Position.Percentage"},"time":{"$ref":"Global.Time"}}},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"required":true,"type":[{"description":"Percentage value to seek to","$ref":"Player.Position.Percentage"},{"additionalProperties":false,"type":"object","description":"Time to seek to","properties":{"hours":{"default":0,"minimum":0,"type":"integer","maximum":23},"seconds":{"default":0,"minimum":0,"type":"integer","maximum":59},"minutes":{"default":0,"minimum":0,"type":"integer","maximum":59},"milliseconds":{"default":0,"minimum":0,"type":"integer","maximum":999}}},{"enums":["smallforward","smallbackward","bigforward","bigbackward"],"type":"string","description":"Seek by predefined jumps"}],"name":"value"}],"description":"Seek through the playing item"}

5.6.16 Player.SetAudioStream

{"returns":{"type":"string"},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"required":true,"type":[{"enums":["previous","next"],"type":"string"},{"minimum":0,"type":"integer","description":"Index of the audio stream to play"}],"name":"stream"}],"description":"Set the audio stream played by the player"}

5.6.17 Player.SetSpeed

{"returns":{"$ref":"Player.Speed"},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"enums":[-32,-16,-8,-4,-2,-1,0,1,2,4,8,16,32,"increment","decrement"],"type":[{"minimum":0,"type":"integer"},{"type":"string"}],"name":"speed","required":true}],"description":"Set the speed of the current playback"}

5.6.18 Player.SetSubtitle

{"returns":{"type":"string"},"params":[{"required":true,"name":"playerid","$ref":"Player.Id"},{"required":true,"type":[{"enums":["previous","next","off","on"],"type":"string"},{"minimum":0,"type":"integer","description":"Index of the subtitle to display"}],"name":"subtitle"}],"description":"Set the subtitle displayed by the player"}

{"returns":{"type":"object","properties":{"items":{"items":{"$ref":"List.Item.All"},"required":true,"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"required":true,"name":"playlistid","$ref":"Playlist.Id"},{"name":"properties","$ref":"List.Fields.All"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Get all items from playlist"}

5.7.5 Playlist.GetProperties

{"returns":{"$ref":"Playlist.Property.Value"},"params":[{"required":true,"name":"playlistid","$ref":"Playlist.Id"},{"uniqueItems":true,"items":{"$ref":"Playlist.Property.Name"},"required":true,"type":"array","name":"properties"}],"description":"Retrieves the values of the given properties"}

5.7.6 Playlist.Insert

Insert item(s) into playlist. Does not work for picture playlists (aka slideshows).Permissions:

{"returns":{"type":"string"},"params":[{"required":true,"name":"playlistid","$ref":"Playlist.Id"},{"required":true,"name":"position","$ref":"Playlist.Position"},{"required":true,"name":"item","$ref":"Playlist.Item"}],"description":"Insert item(s) into playlist. Does not work for picture playlists (aka slideshows)."}

5.7.7 Playlist.Remove

Remove item from playlist. Does not work for picture playlists (aka slideshows).Permissions:

{"returns":{"type":"string"},"params":[{"required":true,"name":"playlistid","$ref":"Playlist.Id"},{"required":true,"name":"position","$ref":"Playlist.Position"}],"description":"Remove item from playlist. Does not work for picture playlists (aka slideshows)."}

5.7.8 Playlist.Swap

Swap items in the playlist. Does not work for picture playlists (aka slideshows).Permissions:

{"returns":{"type":"string"},"params":[{"required":true,"name":"playlistid","$ref":"Playlist.Id"},{"required":true,"name":"position1","$ref":"Playlist.Position"},{"required":true,"name":"position2","$ref":"Playlist.Position"}],"description":"Swap items in the playlist. Does not work for picture playlists (aka slideshows)."}

5.8 System

5.8.1 System.GetProperties

{"returns":{"$ref":"System.Property.Value"},"params":[{"uniqueItems":true,"items":{"$ref":"System.Property.Name"},"required":true,"type":"array","name":"properties"}],"description":"Retrieves the values of the given properties"}

5.8.2 System.Hibernate

Puts the system running XBMC into hibernate modePermissions:

ControlPower

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Puts the system running {{subst:Name}} into hibernate mode"}

5.8.3 System.Reboot

Reboots the system running XBMCPermissions:

ControlPower

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Reboots the system running XBMC"}

5.8.4 System.Shutdown

Shuts the system running XBMC downPermissions:

ControlPower

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Shuts the system running {{subst:Name}} down"}

5.8.5 System.Suspend

Suspends the system running XBMCPermissions:

ControlPower

Parameters: None
Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[],"description":"Suspends the system running XBMC"}

5.9.2 VideoLibrary.Export

Exports all items from the video libraryPermissions:

WriteFile

Parameters:

[ mixed options ]

Returns:string

JSON Schema Description

{"returns":{"type":"string"},"params":[{"type":[{"additionalProperties":false,"type":"object","properties":{"path":{"minLength":1,"required":true,"type":"string","description":"Path to the directory to where the data should be exported"}}},{"additionalProperties":false,"type":"object","properties":{"images":{"default":false,"type":"boolean","description":"Whether to export thumbnails and fanart images"},"overwrite":{"default":false,"type":"boolean","description":"Whether to overwrite existing exported files"},"actorthumbs":{"default":false,"type":"boolean","description":"Whether to export actor thumbnails"}}}],"name":"options"}],"description":"Exports all items from the video library"}

{"returns":{"type":"object","properties":{"episodedetails":{"$ref":"Video.Details.Episode"}}},"params":[{"required":true,"name":"episodeid","$ref":"Library.Id"},{"name":"properties","$ref":"Video.Fields.Episode"}],"description":"Retrieve details about a specific tv show episode"}

{"returns":{"type":"object","properties":{"episodes":{"items":{"$ref":"Video.Details.Episode"},"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"default":-1,"name":"tvshowid","$ref":"Library.Id"},{"default":-1,"minimum":0,"type":"integer","name":"season"},{"name":"properties","$ref":"Video.Fields.Episode"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all tv show episodes"}

{"returns":{"type":"object","properties":{"genres":{"items":{"$ref":"Library.Details.Genre"},"required":true,"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"enums":["movie","tvshow","musicvideo"],"type":"string","name":"type","required":true},{"name":"properties","$ref":"Library.Fields.Genre"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all genres"}

{"returns":{"type":"object","properties":{"moviedetails":{"$ref":"Video.Details.Movie"}}},"params":[{"required":true,"name":"movieid","$ref":"Library.Id"},{"name":"properties","$ref":"Video.Fields.Movie"}],"description":"Retrieve details about a specific movie"}

{"returns":{"type":"object","properties":{"movies":{"items":{"$ref":"Video.Details.Movie"},"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"name":"properties","$ref":"Video.Fields.Movie"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all movies"}

{"returns":{"type":"object","properties":{"musicvideodetails":{"$ref":"Video.Details.MusicVideo"}}},"params":[{"required":true,"name":"musicvideoid","$ref":"Library.Id"},{"name":"properties","$ref":"Video.Fields.MusicVideo"}],"description":"Retrieve details about a specific music video"}

{"returns":{"type":"object","properties":{"musicvideos":{"items":{"$ref":"Video.Details.MusicVideo"},"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"default":-1,"name":"artistid","$ref":"Library.Id"},{"default":-1,"name":"albumid","$ref":"Library.Id"},{"name":"properties","$ref":"Video.Fields.MusicVideo"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all music videos"}

{"returns":{"type":"object","properties":{"musicvideos":{"items":{"$ref":"Video.Details.MusicVideo"},"type":"array"},"limits":{"required":true,"$ref":"List.LimitsReturned"}}},"params":[{"name":"properties","$ref":"Video.Fields.MusicVideo"},{"name":"limits","$ref":"List.Limits"},{"name":"sort","$ref":"List.Sort"}],"description":"Retrieve all recently added music videos"}

5.9.18 VideoLibrary.Scan

{"returns":{"type":"string"},"params":[],"description":"Scans the video sources for new library items"}

5.10 XBMC

5.10.1 XBMC.GetInfoBooleans

Retrieve info booleans about XBMC and the systemPermissions:

ReadData

Parameters:

array[1..X] booleans

Returns:

Type:object

JSON Schema Description

{"returns":{"type":"object","description":"List of key-value pairs of the retrieved info booleans"},"params":[{"minItems":1,"items":{"type":"string"},"required":true,"type":"array","name":"booleans"}],"description":"Retrieve info booleans about {{subst:Name}} and the system"}

5.10.2 XBMC.GetInfoLabels

Retrieve info labels about XBMC and the systemPermissions:

ReadData

Parameters:

array[1..X] labels

Returns:

Type:object

JSON Schema Description

{"returns":{"type":"object","description":"List of key-value pairs of the retrieved info labels"},"params":[{"description":"See http://wiki.xbmc.org/index.php?title=InfoLabels for a list of possible info labels","minItems":1,"items":{"type":"string"},"required":true,"type":"array","name":"labels"}],"description":"Retrieve info labels about {{subst:Name}} and the system"}

6.12.5 Player.Notifications.Item

Type:mixed

JSON Schema Description

{"type":[{"type":"object","description":"An unknown item does not have any additional information.","properties":{"type":{"required":true,"$ref":"Player.Notifications.Item.Type"}}},{"type":"object","description":"An item known to the database has an identification.","properties":{"type":{"required":true,"$ref":"Player.Notifications.Item.Type"},"id":{"required":true,"$ref":"Library.Id"}}},{"type":"object","description":"A movie item has a title and may have a release year.","properties":{"year":{"default":0,"type":"integer"},"type":{"required":true,"$ref":"Player.Notifications.Item.Type"},"title":{"required":true,"type":"string"}}},{"type":"object","description":"A tv episode has a title and may have an episode number, season number and the title of the show it belongs to.","properties":{"season":{"default":0,"type":"integer"},"type":{"required":true,"$ref":"Player.Notifications.Item.Type"},"episode":{"default":0,"type":"integer"},"showtitle":{"default":"","type":"string"},"title":{"required":true,"type":"string"}}},{"type":"object","description":"A music video has a title and may have an album and an artist.","properties":{"album":{"default":"","type":"string"},"title":{"required":true,"type":"string"},"type":{"required":true,"$ref":"Player.Notifications.Item.Type"},"artist":{"default":"","type":"string"}}},{"type":"object","description":"A song has a title and may have an album, an artist and a track number.","properties":{"album":{"default":"","type":"string"},"track":{"default":0,"type":"integer"},"title":{"required":true,"type":"string"},"type":{"required":true,"$ref":"Player.Notifications.Item.Type"},"artist":{"default":"","type":"string"}}}],"id":"Player.Notifications.Item"}

6.13 Playlist

6.13.1 Playlist.Id

6.13.2 Playlist.Item

Type:mixed

JSON Schema Description

{"type":[{"additionalProperties":false,"type":"object","properties":{"file":{"required":true,"type":"string","description":"Path to a file (not a directory) to be added to the playlist"}}},{"additionalProperties":false,"type":"object","properties":{"directory":{"required":true,"type":"string"}}},{"additionalProperties":false,"type":"object","properties":{"movieid":{"required":true,"$ref":"Library.Id"}}},{"additionalProperties":false,"type":"object","properties":{"episodeid":{"required":true,"$ref":"Library.Id"}}},{"additionalProperties":false,"type":"object","properties":{"musicvideoid":{"required":true,"$ref":"Library.Id"}}},{"additionalProperties":false,"type":"object","properties":{"artistid":{"required":true,"$ref":"Library.Id"}}},{"additionalProperties":false,"type":"object","properties":{"albumid":{"required":true,"$ref":"Library.Id"}}},{"additionalProperties":false,"type":"object","properties":{"songid":{"required":true,"$ref":"Library.Id"}}},{"additionalProperties":false,"type":"object","properties":{"genreid":{"required":true,"description":"Identification of a genre from the AudioLibrary","$ref":"Library.Id"}}}],"id":"Playlist.Item"}

6.15.13 Video.Fields.Episode

{"items":{"enums":["title","plot","votes","rating","writer","firstaired","playcount","runtime","director","productioncode","season","episode","originaltitle","showtitle","cast","streamdetails","lastplayed","fanart","thumbnail","file","resume","tvshowid"],"type":"string","description":"Requesting the cast and/or resume field will result in increased response times"},"extends":"Item.Fields.Base","id":"Video.Fields.Episode"}

6.15.14 Video.Fields.Movie

{"items":{"enums":["title","genre","year","rating","director","trailer","tagline","plot","plotoutline","originaltitle","lastplayed","playcount","writer","studio","mpaa","cast","country","imdbnumber","premiered","productioncode","runtime","set","showlink","streamdetails","top250","votes","fanart","thumbnail","file","sorttitle","resume","setid"],"type":"string","description":"Requesting the cast, set, showling and/or resume field will result in increased response times"},"extends":"Item.Fields.Base","id":"Video.Fields.Movie"}

6.15.16 Video.Fields.MusicVideo

{"items":{"enums":["title","playcount","runtime","director","studio","year","plot","album","artist","genre","track","streamdetails","lastplayed","fanart","thumbnail","file","resume"],"type":"string","description":"Requesting the resume field will result in increased response times"},"extends":"Item.Fields.Base","id":"Video.Fields.MusicVideo"}

6.15.18 Video.Fields.TVShow

{"items":{"enums":["title","genre","year","rating","plot","studio","mpaa","cast","playcount","episode","imdbnumber","premiered","votes","lastplayed","fanart","thumbnail","file","originaltitle","sorttitle","episodeguide"],"type":"string","description":"Requesting the cast field will result in increased response times"},"extends":"Item.Fields.Base","id":"Video.Fields.TVShow"}

7 Notifications

7.1 AudioLibrary

7.1.1 AudioLibrary.OnRemove

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"object","name":"data","properties":{"type":{"required":true,"$ref":"Notifications.Library.Audio.Type"},"id":{"required":true,"$ref":"Library.Id"}}}],"description":"An audio item has been removed."}

7.1.2 AudioLibrary.OnUpdate

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"object","name":"data","properties":{"type":{"enum":["song"],"type":"string","id":"Notifications.Library.Audio.Type","required":true},"id":{"required":true,"$ref":"Library.Id"}}}],"description":"An audio item has been updated."}

7.2 Player

7.2.1 Player.OnPause

Playback of a media item has been paused. If there is no ID available extra information will be provided.Parameters:

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"name":"data","$ref":"Player.Notifications.Data"}],"description":"Playback of a media item has been paused. If there is no ID available extra information will be provided."}

7.2.2 Player.OnPlay

Playback of a media item has been started or the playback speed has changed. If there is no ID available extra information will be provided.Parameters:

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"name":"data","$ref":"Player.Notifications.Data"}],"description":"Playback of a media item has been started or the playback speed has changed. If there is no ID available extra information will be provided."}

7.2.3 Player.OnSeek

The playback position has been changed. If there is no ID available extra information will be provided.Parameters:

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"object","name":"data","properties":{"item":{"$ref":"Player.Notifications.Item"},"player":{"required":true,"$ref":"Player.Notifications.Player.Seek"}}}],"description":"The playback position has been changed. If there is no ID available extra information will be provided."}

7.2.4 Player.OnSpeedChanged

Speed of the playback of a media item has been changed. If there is no ID available extra information will be provided.Parameters:

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"name":"data","$ref":"Player.Notifications.Data"}],"description":"Speed of the playback of a media item has been changed. If there is no ID available extra information will be provided."}

7.2.5 Player.OnStop

Playback of a media item has been stopped. If there is no ID available extra information will be provided.Parameters:

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"object","name":"data","properties":{"item":{"$ref":"Player.Notifications.Item"}}}],"description":"Playback of a media item has been stopped. If there is no ID available extra information will be provided."}

7.3 System

7.3.1 System.OnLowBattery

The system is on low battery.Parameters:

string sender

null data

JSON Schema Description

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"null","name":"data"}],"description":"The system is on low battery."}

7.3.2 System.OnQuit

XBMC will be closed.Parameters:

string sender

null data

JSON Schema Description

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"null","name":"data"}],"description":"XBMC will be closed."}

7.3.3 System.OnRestart

The system will be restarted.Parameters:

string sender

null data

JSON Schema Description

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"null","name":"data"}],"description":"The system will be restarted."}

7.3.4 System.OnSleep

The system will be suspended.Parameters:

string sender

null data

JSON Schema Description

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"null","name":"data"}],"description":"The system will be suspended."}

7.3.5 System.OnWake

The system woke up from suspension.Parameters:

string sender

null data

JSON Schema Description

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"null","name":"data"}],"description":"The system woke up from suspension."}

7.4 VideoLibrary

7.4.1 VideoLibrary.OnRemove

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"object","name":"data","properties":{"type":{"required":true,"$ref":"Notifications.Library.Video.Type"},"id":{"required":true,"$ref":"Library.Id"}}}],"description":"A video item has been removed."}

7.4.2 VideoLibrary.OnUpdate

{"params":[{"required":true,"type":"string","name":"sender"},{"required":true,"type":"object","name":"data","properties":{"playcount":{"default":-1,"minimum":0,"type":"integer"},"type":{"enum":["movie","tvshow","episode","musicvideo"],"type":"string","id":"Notifications.Library.Video.Type","required":true},"id":{"required":true,"$ref":"Library.Id"}}}],"description":"A video item has been updated."}