JSON-RPC API/Examples

Examples
These examples take their base from v4. Any that require a higher version will be marked.

Introspect
If you require more detailed information about an API method use: "AudioLibrary.GetAlbums" being the method in this example.

What is playing?
Commands to control the players in Kodi will only work if that player is currently in use.

In the above we can see that the audio player is active. It is possible for more than one player to be active: picture and audio.

Now we know which player is active we can query the current item with: or

GetItem will ignore any properties that don't make sense for the specific player.

Query the libraries
Artists Albums Songs Movies TV Shows Music Videos Audio Playlist Video Playlist