API XML Methods
API XML Methods
Let's go through come calls and examples that you can do for each XML method.
Parameters may be sent as a query string, or (for POST/PUT/PATCH/DELETE) as a form-encoded or application/json request body. See API for details.
Valid responses will always return a HTTP 200 response.
Error responses return codes based on the error type:
- HTTP 400
- Error '4710': BAD_REQUEST
- Error '4705': MISSING
- HTTP 401
- Error '4701': INVALID_HANDSHAKE
- HTTP 403
- Error '4700': ACCESS_CONTROL_NOT_ENABLED
- Error '4703': ACCESS_DENIED
- Error '4742': FAILED_ACCESS_CHECK
- HTTP 404
- Error '4704': NOT_FOUND
- HTTP 410
- Error '4706': DEPRECATED
- HTTP 500
- Error '4702': GENERIC_ERROR
Binary data methods will not return JSON; just the file/data you have requested.
Binary methods will also return:
- HTTP 400 responses for a bad or incomplete request
- HTTP 404 responses where the requests data was not found
- HTTP 416 responses where the stream is unable to return the requested content-range
For information about about how playback works and what a client can expect from Ampache check out API Media Methods
Auth Methods
Auth methods are used for authenticating or checking the status of your session in an Ampache server.
Remember that the auth parameter does not need to be sent as a parameter in the URL.
HTTP header authentication is supported for the auth parameter where present.
handshake
This is the function that handles verifying a new handshake Takes a timestamp, auth key, and username.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'auth' | string | $passphrase (Timestamp . Password SHA hash) OR (API Key) | NO |
| 'user' | string | $username (Required if login/password authentication) | YES |
| 'timestamp' | integer | UNIXTIME() The timestamp used in seed of password hash | YES |
| (Required if login/password authentication) | |||
| 'version' | string | $version (API Version that the application understands) | YES |
NOTE For privacy, send auth in a request body or the Authorization: Bearer header rather than the query string. Query-string support for auth is deprecated but still accepted for backward compatibility.
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| auth | string | YES | NO | |
| streamtoken | string | YES | NO | |
| api | string | NO | NO | |
| session_expire | integer | string | NO | NO | |
| update | string | NO | NO | |
| add | string | NO | NO | |
| clean | string | NO | NO | |
| max_song | integer | NO | NO | |
| max_album | integer | NO | NO | |
| max_artist | integer | NO | NO | |
| max_video | integer | NO | NO | |
| max_podcast | integer | NO | NO | |
| max_podcast_episode | integer | NO | NO | |
| songs | integer | NO | NO | |
| albums | integer | NO | NO | |
| artists | integer | NO | NO | |
| genres | integer | NO | NO | |
| playlists | integer | NO | NO | |
| searches | integer | NO | NO | |
| playlists_searches | integer | NO | NO | |
| users | integer | NO | NO | |
| catalogs | integer | NO | NO | |
| videos | integer | NO | NO | |
| podcasts | integer | NO | NO | |
| podcast_episodes | integer | NO | NO | |
| shares | integer | NO | NO | |
| licenses | integer | NO | NO | |
| live_streams | integer | NO | NO | |
| labels | integer | NO | NO | |
| username | string | NO | NO |
- throws
<root><error></root>
quickconnect_initiate
No authentication. Starts a QuickConnect pairing request: a device with no session yet asks for a short code, shows it to the person signing in, then polls quickconnect_status with the returned secret until it comes back authorized. Off unless the quickconnect_enable preference is on.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'device_id' | string | An id the caller makes up and keeps, so its own initiate rate limit applies | YES |
| 'device_name' | string | Shown to the approving user alongside the code | YES |
| 'client' | string | The app name, shown to the approving user | YES |
| 'version' | string | The app version, shown to the approving user | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| secret | string | NO | NO | |
| code | string | NO | NO | |
| device_id | string | NO | NO | |
| device_name | string | NO | NO | |
| app_name | string | NO | NO | |
| app_version | string | NO | NO | |
| date_added | integer | NO | NO | |
| authorized | boolean | NO | NO |
- throws
<root><error></root>
quickconnect_status
No authentication. Polls a QuickConnect pairing request started by quickconnect_initiate. The caller has no session until this comes back authorized: true, at which point the response also carries a minted session, the same shape handshake returns.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'secret' | string | The value quickconnect_initiate returned | NO |
NOTE For privacy, send secret in a request body rather than the query string — it is a bearer credential for the pairing, the same as auth.
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
authorized is always returned. Once the code is approved it is true and every handshake field (auth, session_expire, server counts, ...) is added alongside it.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| authorized | boolean | NO | NO | |
| auth | string | YES | YES | |
| streamtoken | string | YES | YES | |
| api | string | NO | YES | |
| session_expire | integer | string | NO | YES | |
| update | string | NO | YES | |
| add | string | NO | YES | |
| clean | string | NO | YES | |
| max_song | integer | NO | YES | |
| max_album | integer | NO | YES | |
| max_artist | integer | NO | YES | |
| max_video | integer | NO | YES | |
| max_podcast | integer | NO | YES | |
| max_podcast_episode | integer | NO | YES | |
| songs | integer | NO | YES | |
| albums | integer | NO | YES | |
| artists | integer | NO | YES | |
| genres | integer | NO | YES | |
| playlists | integer | NO | YES | |
| searches | integer | NO | YES | |
| playlists_searches | integer | NO | YES | |
| users | integer | NO | YES | |
| catalogs | integer | NO | YES | |
| videos | integer | NO | YES | |
| podcasts | integer | NO | YES | |
| podcast_episodes | integer | NO | YES | |
| shares | integer | NO | YES | |
| licenses | integer | NO | YES | |
| live_streams | integer | NO | YES | |
| labels | integer | NO | YES | |
| username | string | NO | YES |
- throws
<root><error></root>
goodbye
Destroy a session using the auth parameter.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'auth' | string | (Session ID) destroys the session if it exists | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
lost_password
Email a new password to the user (if allowed) using a reset token. Requires allow_lost_password to
be enabled and a working mail configuration; not available to Content Manager, Manager or Admin
accounts.
$username;
$key = hash('sha256', 'email');
auth = hash('sha256', $username . $key);
| Input | Type | Description | Optional |
|---|---|---|---|
| 'auth' | string | password reset token | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| success | string | NO | YES |
- throws
<root><error></root>
ping
This can be called without being authenticated, it is useful for determining if what the status of the server is, and what version it is running/compatible with
| Input | Type | Description | Optional |
|---|---|---|---|
| 'auth' | string | (Session ID) returns version information and extends the session if passed | YES |
| 'version' | string | $version (API Version that the application understands) | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
server, version and compatible are always returned. Sending a valid auth extends the session and adds the handshake fields (session_expire, server counts, ...).
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| server | string | NO | NO | |
| version | string | NO | NO | |
| compatible | string | NO | NO | |
| auth | string | YES | YES | |
| streamtoken | string | YES | YES | |
| api | string | NO | YES | |
| session_expire | integer | string | NO | YES | |
| update | string | NO | YES | |
| add | string | NO | YES | |
| clean | string | NO | YES | |
| max_song | integer | NO | YES | |
| max_album | integer | NO | YES | |
| max_artist | integer | NO | YES | |
| max_video | integer | NO | YES | |
| max_podcast | integer | NO | YES | |
| max_podcast_episode | integer | NO | YES | |
| songs | integer | NO | YES | |
| albums | integer | NO | YES | |
| artists | integer | NO | YES | |
| genres | integer | NO | YES | |
| playlists | integer | NO | YES | |
| searches | integer | NO | YES | |
| playlists_searches | integer | NO | YES | |
| users | integer | NO | YES | |
| catalogs | integer | NO | YES | |
| videos | integer | NO | YES | |
| podcasts | integer | NO | YES | |
| podcast_episodes | integer | NO | YES | |
| shares | integer | NO | YES | |
| licenses | integer | NO | YES | |
| live_streams | integer | NO | YES | |
| labels | integer | NO | YES | |
| username | string | NO | YES |
- throws
<root>
<server>
<version>
<compatible>
</root>
register
Register as a new user if allowed. (Requires the username, password and email.)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'username' | string | $username | NO |
| 'password' | string | hash('sha256', $password) | NO |
| 'email' | string | e.g. [email protected] | NO |
| 'fullname' | string | YES |
NOTE For privacy, send password in a form or JSON request body rather than the query string. Query-string support for password is deprecated but still accepted for backward compatibility.
- return
<root>
<success>
</root>
- throws
<root><error></root>
Non-Data Methods
These methods take no parameters beyond your auth key to return information
system_update
Check Ampache for updates and run the update if there is one.
ACCESS REQUIRED: 100 (Admin)
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| success | string | NO | YES |
- throws
<root><error></root>
system_preferences
Get your server preferences
ACCESS REQUIRED: 100 (Admin)
-
You can modify and update your preferences using the following methods
-
return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a preference list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| preference | array<PreferenceObject> | NO | NO | see PreferenceObject fields |
Each preference entry (PreferenceObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| value | string | NO | NO | |
| description | string | NO | NO | |
| level | integer | NO | NO | |
| type | string | NO | NO | |
| category | string | NO | NO | |
| subcategory | string | YES | NO | |
| has_access | boolean | NO | YES | |
| values | array<string> | array<integer> | NO | YES |
- throws
<root><error></root>
users
Get ids and usernames for your site
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a user list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| user | array<UserSummaryObject> | NO | NO | see UserSummaryObject fields |
Each user entry (UserSummaryObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| username | string | YES | NO |
- throws
<root><error></root>
user_preferences
Get your user preferences
-
You can modify and update your preferences using the following methods
-
return
<root>
<preference>
</root>
Data Methods
Data methods require additional information and parameters to return information
advanced_search
Perform an advanced search given passed rules. This works in a similar way to the web/UI search pages. You can pass multiple rules as well as joins to create in depth search results.
Rules must be sent in groups of 3 using an int (starting from 1) to designate which rules are combined. Use operator ('and', 'or') to choose whether to join or separate each rule when searching.
Refer to the Advanced Search page for details about creating searches.
NOTE the rules part can be confusing but essentially you can include as many 'arrays' of rules as you want. Just add 1 to the rule value to create a new group of rules.
- Mandatory Rule Values
- rule_1
- rule_1_operator
- rule_1_input
- Optional (Metadata searches only)
- rule_1_subtype
| Input | Type | Description | Optional |
|---|---|---|---|
| operator | string | and, or (whether to match one rule or all) | NO |
| rule_* | array | [rule_1, rule_1_operator, rule_1_input] | NO |
| rule_* | array | [rule_2, rule_2_operator, rule_2_input], [etc] | YES |
| type | string | song, album, artist, label, playlist | NO |
podcast, podcast_episode, genre, user, video | |||
| random | boolean | 0, 1 (random order of results; default to 0) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<song>|<album>|<artist>|<playlist>|<label>|<user>|<video>
</root>
- throws
<root><error></root>
SONG Example
ARTIST Example
ALBUM Example
albums
This returns albums based on the provided search filters
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Filter results to match this string | YES |
| 'include' | string | albums, songs (include child objects in the response) | YES |
| 'exact' | boolean | 0, 1 (if true filter is exact = rather than fuzzy LIKE) | YES |
| 'add' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date | YES |
| 'update' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a album list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| album | array<AlbumObject> | NO | NO | see AlbumObject fields |
Each album entry (AlbumObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| artist | object | YES | YES | {id, name, prefix, basename} |
| artists | array<NamedReference> | NO | YES | see NamedReference fields |
| songartists | array<NamedReference> | NO | YES | see NamedReference fields |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| tracks | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| diskcount | integer | NO | NO | |
| type | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| mbid_group | string | YES | NO | |
| catalog | string | NO | NO |
- throws
<root><error></root>
album
This returns a single album based on the UID provided
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Album, returns album XML | NO |
| 'include' | string | songs (include child objects in the response) | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| artist | object | YES | YES | {id, name, prefix, basename} |
| artists | array<NamedReference> | NO | YES | see NamedReference fields |
| songartists | array<NamedReference> | NO | YES | see NamedReference fields |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| tracks | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| diskcount | integer | NO | NO | |
| type | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| mbid_group | string | YES | NO | |
| catalog | string | NO | NO |
- throws
<root><error></root>
album_songs
This returns the songs of a specified album
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Album, returns song XML | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated | YES |
| comma string pairs (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a song list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| song | array<SongObject> | NO | NO | see SongObject fields |
Each song entry (SongObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| title | string | YES | NO | |
| name | string | YES | NO | |
| artist | NamedReference | NO | NO | see NamedReference fields |
| artists | array<NamedReference> | NO | NO | see NamedReference fields |
| album | NamedReference | NO | NO | see NamedReference fields |
| albumartist | NamedReference | NO | YES | see NamedReference fields |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| bpm | number | YES | NO | |
| track | integer | NO | NO | |
| filename | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| mood | array<object> | NO | NO | {id, name} |
| playlisttrack | integer | NO | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| format | string | YES | NO | |
| stream_format | string | YES | NO | |
| bitrate | integer | YES | NO | |
| stream_bitrate | integer | YES | NO | |
| rate | integer | NO | NO | |
| mode | string | YES | NO | |
| mime | string | YES | NO | |
| stream_mime | string | YES | NO | |
| url | string | NO | NO | |
| size | integer | NO | NO | |
| mbid | string | YES | NO | |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| playcount | integer | NO | NO | |
| last_played | string | YES | NO | |
| catalog | string | NO | NO | |
| composer | string | YES | NO | |
| channels | integer | YES | NO | |
| comment | string | YES | NO | |
| license | string | YES | NO | |
| publisher | string | YES | NO | |
| language | string | YES | NO | |
| lyrics | string | YES | NO | |
| replaygain_album_gain | number | YES | NO | |
| replaygain_album_peak | number | YES | NO | |
| replaygain_track_gain | number | YES | NO | |
| replaygain_track_peak | number | YES | NO | |
| r128_album_gain | number | YES | NO | |
| r128_track_gain | number | YES | NO | |
| metadata | object<string, string> | NO | YES |
- throws
<root><error></root>
album_disks
This returns the disks of a specified album
Album disks are the browsing unit whenever the album_group preference is disabled. This method is
API 8 only; albums and album never change shape based on that preference.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Album, returns album_disk JSON | NO |
| 'include' | string | songs (include child objects in the response) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated | YES |
| comma string pairs (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a album_disk list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| album_disk | array<AlbumDiskObject> | NO | NO | see AlbumDiskObject fields |
Each album_disk entry (AlbumDiskObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| album | object | NO | NO | {id, name, prefix, basename} |
| artist | object | NO | YES | {id, name, prefix, basename} |
| artists | array<object> | NO | YES | {id, name, prefix, basename} |
| songartists | array<object> | NO | YES | {id, name, prefix, basename} |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| tracks | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| type | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| mbid_group | string | YES | NO | |
| catalog | string | NO | NO |
- throws object
"error": ""
album_disk
This returns a single album disk based on the UID provided
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of AlbumDisk, returns album_disk JSON | NO |
| 'include' | string | songs (include child objects in the response) | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| album | object | NO | NO | {id, name, prefix, basename} |
| artist | object | NO | YES | {id, name, prefix, basename} |
| artists | array<object> | NO | YES | {id, name, prefix, basename} |
| songartists | array<object> | NO | YES | {id, name, prefix, basename} |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| tracks | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| type | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| mbid_group | string | YES | NO | |
| catalog | string | NO | NO |
- throws object
"error": ""
album_disk_songs
This returns the songs of a specified album disk
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of AlbumDisk, returns song JSON | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated | YES |
| comma string pairs (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a song list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| song | array<SongObject> | NO | NO | see SongObject fields |
Each song entry (SongObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| title | string | YES | NO | |
| name | string | YES | NO | |
| artist | NamedReference | NO | NO | see NamedReference fields |
| artists | array<NamedReference> | NO | NO | see NamedReference fields |
| album | NamedReference | NO | NO | see NamedReference fields |
| albumartist | NamedReference | NO | YES | see NamedReference fields |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| bpm | number | YES | NO | |
| track | integer | NO | NO | |
| filename | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| mood | array<object> | NO | NO | {id, name} |
| playlisttrack | integer | NO | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| format | string | YES | NO | |
| stream_format | string | YES | NO | |
| bitrate | integer | YES | NO | |
| stream_bitrate | integer | YES | NO | |
| rate | integer | NO | NO | |
| mode | string | YES | NO | |
| mime | string | YES | NO | |
| stream_mime | string | YES | NO | |
| url | string | NO | NO | |
| size | integer | NO | NO | |
| mbid | string | YES | NO | |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| playcount | integer | NO | NO | |
| last_played | string | YES | NO | |
| catalog | string | NO | NO | |
| composer | string | YES | NO | |
| channels | integer | YES | NO | |
| comment | string | YES | NO | |
| license | string | YES | NO | |
| publisher | string | YES | NO | |
| language | string | YES | NO | |
| lyrics | string | YES | NO | |
| replaygain_album_gain | number | YES | NO | |
| replaygain_album_peak | number | YES | NO | |
| replaygain_track_gain | number | YES | NO | |
| replaygain_track_peak | number | YES | NO | |
| r128_album_gain | number | YES | NO | |
| r128_track_gain | number | YES | NO | |
| metadata | object<string, string> | NO | YES |
- throws object
"error": ""
artists
This takes a collection of inputs and returns artist objects.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Filter results to match this string | YES |
| 'exact' | boolean | 0, 1 (if true filter is exact = rather than fuzzy LIKE) | YES |
| 'add' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date | YES |
| 'update' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date | YES |
| 'include' | string | albums, songs (include child objects in the response) | YES |
| 'album_artist' | boolean | 0, 1 (if true filter for album artists only) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a artist list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| artist | array<ArtistObject> | NO | NO | see ArtistObject fields |
Each artist entry (ArtistObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| albums | array<AlbumObject> | NO | NO | see AlbumObject fields |
| albumcount | integer | NO | NO | |
| songs | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| summary | string | YES | NO | |
| time | integer | NO | NO | |
| yearformed | integer | NO | NO | |
| placeformed | string | YES | NO |
- throws
<root><error></root>
artist
This returns a single artist based on the UID of said artist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Artist, returns artist XML | NO |
| 'include' | string | albums, songs (include child objects in the response) | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| albums | array<AlbumObject> | NO | NO | see AlbumObject fields |
| albumcount | integer | NO | NO | |
| songs | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| summary | string | YES | NO | |
| time | integer | NO | NO | |
| yearformed | integer | NO | NO | |
| placeformed | string | YES | NO |
- throws
<root><error></root>
artist_albums
This returns the albums of an artist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Artist, returns Album XML | NO |
| 'album_artist' | boolean | 0, 1 (if true filter for album artists only) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a album list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| album | array<AlbumObject> | NO | NO | see AlbumObject fields |
Each album entry (AlbumObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| artist | object | YES | YES | {id, name, prefix, basename} |
| artists | array<NamedReference> | NO | YES | see NamedReference fields |
| songartists | array<NamedReference> | NO | YES | see NamedReference fields |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| tracks | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| diskcount | integer | NO | NO | |
| type | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| mbid_group | string | YES | NO | |
| catalog | string | NO | NO |
- throws
<root><error></root>
artist_songs
This returns the songs of the specified artist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Artist, returns Song XML | NO |
| 'top50' | boolean | 0, 1 (if true filter to the artist top 50) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a song list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| song | array<SongObject> | NO | NO | see SongObject fields |
Each song entry (SongObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| title | string | YES | NO | |
| name | string | YES | NO | |
| artist | NamedReference | NO | NO | see NamedReference fields |
| artists | array<NamedReference> | NO | NO | see NamedReference fields |
| album | NamedReference | NO | NO | see NamedReference fields |
| albumartist | NamedReference | NO | YES | see NamedReference fields |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| bpm | number | YES | NO | |
| track | integer | NO | NO | |
| filename | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| mood | array<object> | NO | NO | {id, name} |
| playlisttrack | integer | NO | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| format | string | YES | NO | |
| stream_format | string | YES | NO | |
| bitrate | integer | YES | NO | |
| stream_bitrate | integer | YES | NO | |
| rate | integer | NO | NO | |
| mode | string | YES | NO | |
| mime | string | YES | NO | |
| stream_mime | string | YES | NO | |
| url | string | NO | NO | |
| size | integer | NO | NO | |
| mbid | string | YES | NO | |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| playcount | integer | NO | NO | |
| last_played | string | YES | NO | |
| catalog | string | NO | NO | |
| composer | string | YES | NO | |
| channels | integer | YES | NO | |
| comment | string | YES | NO | |
| license | string | YES | NO | |
| publisher | string | YES | NO | |
| language | string | YES | NO | |
| lyrics | string | YES | NO | |
| replaygain_album_gain | number | YES | NO | |
| replaygain_album_peak | number | YES | NO | |
| replaygain_track_gain | number | YES | NO | |
| replaygain_track_peak | number | YES | NO | |
| r128_album_gain | number | YES | NO | |
| r128_track_gain | number | YES | NO | |
| metadata | object<string, string> | NO | YES |
- throws
<root><error></root>
bookmarks
Get information about bookmarked media this user is allowed to manage.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'client' | string | filter by the agent/client name | YES |
| 'include' | integer | 0,1, if true include the object in the bookmark | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a bookmark list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| bookmark | array<BookmarkObject> | NO | NO | see BookmarkObject fields |
Each bookmark entry (BookmarkObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| owner | string | NO | NO | |
| object_type | string | YES | NO | |
| object_id | string | NO | NO | |
| position | integer | NO | NO | |
| client | string | YES | NO | |
| creation_date | integer | NO | NO | |
| update_date | integer | NO | NO | |
| song | array<SongObject> | NO | YES | see SongObject fields |
| podcast_episode | array<PodcastEpisodeObject> | NO | YES | see PodcastEpisodeObject fields |
| video | array<VideoObject> | NO | YES | see VideoObject fields |
- throws
<root><error></root>
Example Example (with include)
bookmark
Get a single bookmark by bookmark_id
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | bookmark_id | YES |
| 'include' | integer | 0,1, if true include the object in the bookmark | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| owner | string | NO | NO | |
| object_type | string | YES | NO | |
| object_id | string | NO | NO | |
| position | integer | NO | NO | |
| client | string | YES | NO | |
| creation_date | integer | NO | NO | |
| update_date | integer | NO | NO | |
| song | array<SongObject> | NO | YES | see SongObject fields |
| podcast_episode | array<PodcastEpisodeObject> | NO | YES | see PodcastEpisodeObject fields |
| video | array<VideoObject> | NO | YES | see VideoObject fields |
- throws
<root><error></root>
Example Example (with include)
bookmark_create
Create a placeholder for the current media that you can return to later.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | $object_id to find | NO |
| 'type' | string | song, video, podcast_episode (object_type) | NO |
| 'position' | integer | current track time in seconds | NO |
| 'client' | string | Agent string. | YES |
| 'date' | integer | update time (Default: UNIXTIME()) | YES |
| 'include' | integer | 0,1, if true include the object in the bookmark | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| owner | string | NO | NO | |
| object_type | string | YES | NO | |
| object_id | string | NO | NO | |
| position | integer | NO | NO | |
| client | string | YES | NO | |
| creation_date | integer | NO | NO | |
| update_date | integer | NO | NO | |
| song | array<SongObject> | NO | YES | see SongObject fields |
| podcast_episode | array<PodcastEpisodeObject> | NO | YES | see PodcastEpisodeObject fields |
| video | array<VideoObject> | NO | YES | see VideoObject fields |
- throws
<root><error></root>
bookmark_delete
Delete an existing bookmark. (if it exists)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | $object_id to delete | NO |
| 'type' | string | bookmark, song, video, podcast_episode, default: bookmark | NO |
| 'client' | string | Agent string. | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
bookmark_edit
Edit a placeholder for the current media that you can return to later.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | $object_id to find | NO |
| 'type' | string | bookmark, song, video, podcast_episode (object_type) | NO |
| 'position' | integer | current track time in seconds | NO |
| 'client' | string | Agent string. | YES |
| 'date' | integer | update time (Default: UNIXTIME()) | YES |
| 'include' | integer | 0,1, if true include the object in the bookmark | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| owner | string | NO | NO | |
| object_type | string | YES | NO | |
| object_id | string | NO | NO | |
| position | integer | NO | NO | |
| client | string | YES | NO | |
| creation_date | integer | NO | NO | |
| update_date | integer | NO | NO | |
| song | array<SongObject> | NO | YES | see SongObject fields |
| podcast_episode | array<PodcastEpisodeObject> | NO | YES | see PodcastEpisodeObject fields |
| video | array<VideoObject> | NO | YES | see VideoObject fields |
- throws
<root><error></root>
browse
Return children of a parent object in a folder traversal/browse style. If you don't send any parameters you'll get a catalog list (the 'root' path)
NOTE From API version 8 the catalog ID is optional on 'album_artist', 'artist', 'album', 'album_disk' and 'podcast'. Send it to restrict the children to a single catalog; omit it to get the children from every catalog you can see. API version 6 still requires it on those types.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | object_id | YES |
| 'type' | string | 'root', 'catalog', 'album_artist', 'artist', 'album', 'album_disk', 'podcast' | YES |
| 'catalog' | string | catalog ID you are browsing | YES |
| 'add' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date | YES |
| 'update' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a browse list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| catalog_id | string | NO | NO | |
| parent_id | string | NO | NO | |
| parent_type | string | NO | NO | |
| child_type | string | NO | NO | |
| browse | array<BrowseObject> | NO | NO | see BrowseObject fields |
Each browse entry (BrowseObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| prefix | string | YES | NO | |
| basename | string | NO | NO |
- throws
<root><error></root>
catalogs
This searches the catalogs and returns... catalogs
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | music, clip, tvshow, movie, personal_video, podcast (Catalog type) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a catalog list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| catalog | array<CatalogObject> | NO | NO | see CatalogObject fields |
Each catalog entry (CatalogObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| type | string | YES | NO | |
| gather_types | string | YES | NO | |
| enabled | boolean | NO | NO | |
| last_add | integer | NO | NO | |
| last_clean | integer | YES | NO | |
| last_update | integer | NO | NO | |
| path | string | NO | NO | |
| rename_pattern | string | YES | NO | |
| sort_pattern | string | YES | NO |
- throws
<root><error></root>
catalog
Return catalog by UID
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Catalog | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| type | string | YES | NO | |
| gather_types | string | YES | NO | |
| enabled | boolean | NO | NO | |
| last_add | integer | NO | NO | |
| last_clean | integer | YES | NO | |
| last_update | integer | NO | NO | |
| path | string | NO | NO | |
| rename_pattern | string | YES | NO | |
| sort_pattern | string | YES | NO |
- throws
<root><error></root>
catalog_action
Kick off a catalog update or clean for the selected catalog
ACCESS REQUIRED: 75 (Catalog Manager)
NOTE filter is available in Ampache 7.9.0 and higher. catalog is deprecated and will be removed in API9.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'task' | string | add_to_catalog, clean_catalog, verify_catalog, update_catalog, gather_art, garbage_collect, scan_catalog_folders | NO |
| 'filter' | string | $catalog_id | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
catalog_add
Create a new catalog.
ACCESS REQUIRED: 75 (Catalog Manager)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'name' | string | Name for the catalog | NO |
| 'path' | string | URL or folder path for your catalog | NO |
| 'type' | string | 'local', 'beets', 'remote', 'subsonic', 'seafile', 'beetsremote' Default: local | YES |
| 'media_type' | string | 'music', 'podcast', 'clip', 'tvshow', 'movie', 'personal_video' Default: 'music' | YES |
| 'file_pattern' | string | Pattern used identify tags from the file name. Default: '%T - %t' | YES |
| 'folder_pattern' | string | Pattern used identify tags from the folder name. Default: '%a/%A' | YES |
| 'username' | string | login to remote catalog ('remote', 'subsonic', 'seafile', 'beetsremote') | YES |
| 'password' | string | password to remote catalog ('remote', 'subsonic', 'seafile', 'beetsremote') | YES |
NOTE For privacy, send password in a form or JSON request body rather than the query string. Query-string support for password is deprecated but still accepted for backward compatibility.
- return
<root>
<total_count>
<catalog>
</root>
- throws
<root><error></root>
catalog_delete
Delete an existing catalog.
ACCESS REQUIRED: 75 (Catalog Manager)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of catalog to delete | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
catalog_file
Perform actions on local catalog files. Single file versions of catalog add, clean, verify and remove (delete) Make sure you remember to urlencode those file names!
ACCESS REQUIRED: 50 (Content Manager)
NOTE filter is available in Ampache 7.9.0 and higher. catalog is deprecated and will be removed in API9.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'file' | string | FULL path to local file | NO |
| 'task' | string | add, clean, verify, remove (can include comma-separated values) | NO |
| 'filter' | string | $catalog_id | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
catalog_folder
Perform actions on local catalog folders. Single folder versions of catalog add, clean, verify and remove (delete) Make sure you remember to urlencode those folder names!
ACCESS REQUIRED: 50 (Content Manager)
NOTE filter is available in Ampache 7.9.0 and higher. catalog is deprecated and will be removed in API9.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'folder' | string | FULL path to local folder | NO |
| 'task' | string | add, clean, verify, remove (can include comma-separated values) | NO |
| 'filter' | string | $catalog_id | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| success | string | NO | YES |
- throws
<root><error></root>
collections
A collection is a hand-curated list of objects of any type: the static counterpart to a search, and the non-media counterpart to a playlist. Playing one expands its members, so an album contributes its songs and anything that cannot be streamed is skipped.
This returns every collection you own, plus every public collection on the server.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | Only return collections pinned to this object_type | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a collection list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| collection | array<CollectionObject> | NO | NO | see CollectionObject fields |
Each collection entry (CollectionObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| owner | string | YES | NO | |
| type | string | YES | NO | |
| object_type | string | YES | NO | |
| items | integer | NO | NO | |
| has_art | boolean | NO | NO | |
| playlist_folder_id | string | NO | YES | |
| playlist_folder_sort_order | integer | NO | YES |
- throws
<root><error></root>
collection
Return a collection by UID, without its contents.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Collection | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a collection list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| collection | array<CollectionObject> | NO | NO | see CollectionObject fields |
Each collection entry (CollectionObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| owner | string | YES | NO | |
| type | string | YES | NO | |
| object_type | string | YES | NO | |
| items | integer | NO | NO | |
| has_art | boolean | NO | NO | |
| playlist_folder_id | string | NO | YES | |
| playlist_folder_sort_order | integer | NO | YES |
- throws
<root><error></root>
collection_items
A collection's members, in curated order.
The order is the data. A collection records the order its members were curated into, so <contents> holds one <item> per member in that order and a client should render them exactly as they arrive. Each <item> carries track (the 1-based position), track_id (the membership row, which is what identifies one member when the same object appears more than once) and object_type as attributes, and nests that type's own element inside:
<contents>
<item track="1" track_id="7" object_type="album">
<album id="21">...</album>
</item>
<item track="2" track_id="8" object_type="song">
<song id="60">...</song>
</item>
</contents>
Positions are dense and 1-based. They are renumbered whenever a member is added, removed or moved, so a position is only meaningful against the collection as it was when you read it.
offset and limit page the list without disturbing the order. The scalar items on the collection stays the total member count, so it is not reduced by paging.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Collection | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| collection | object | NO | NO | {id, name, owner, type, object_type, items, has_art, playlist_folder_id, playlist_folder_sort_order, contents} |
- throws
<root><error></root>
collection_create
Create a new, empty collection.
Leave object_type out for a mixed collection, or set it to pin the collection to a single type so anything else is refused when it is added.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'name' | string | Collection name | NO |
| 'type' | string | public, private (Default: private) | YES |
| 'object_type' | string | Pin the collection to a single object_type | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a collection list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| collection | array<CollectionObject> | NO | NO | see CollectionObject fields |
Each collection entry (CollectionObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| owner | string | YES | NO | |
| type | string | YES | NO | |
| object_type | string | YES | NO | |
| items | integer | NO | NO | |
| has_art | boolean | NO | NO | |
| playlist_folder_id | string | NO | YES | |
| playlist_folder_sort_order | integer | NO | YES |
- throws
<root><error></root>
collection_edit
Change a collection's name, visibility, pinned type, collaborators or member order.
Only the values you send are changed. Send an empty object_type to un-pin a collection back to mixed; pinning is refused while the collection still holds a different type.
Reordering
items and tracks reorder the members the same way playlist_edit does: the two lists are paired in order, and each pair puts one member at one position, replacing whatever held that position before. Send only the pairs you want to change for a partial reorder, or every pair for a whole one.
Because a collection is heterogeneous, each entry in items carries its type as object_type:object_id:
items=album:21,song:60,album:44
tracks=1,2,3
The two lists must name the same number of entries or the call is refused. Pairs naming an unknown type, a non-positive id or a non-positive position are skipped rather than failing the whole request. Positions are renumbered afterwards so the order stays dense.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Collection | NO |
| 'name' | string | Collection name | YES |
| 'type' | string | public, private | YES |
| 'object_type' | string | Pinned object_type, or an empty string to un-pin | YES |
| 'collaborate' | string | Comma separated list of user ids allowed to curate the contents | YES |
| 'items' | string | Comma separated object_type:object_id pairs | YES |
| 'tracks' | string | Comma separated positions matched to items in order | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a collection list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| collection | array<CollectionObject> | NO | NO | see CollectionObject fields |
Each collection entry (CollectionObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | NO | NO | |
| owner | string | YES | NO | |
| type | string | YES | NO | |
| object_type | string | YES | NO | |
| items | integer | NO | NO | |
| has_art | boolean | NO | NO | |
| playlist_folder_id | string | NO | YES | |
| playlist_folder_sort_order | integer | NO | YES |
- throws
<root><error></root>
collection_delete
Delete a collection and its membership rows. The objects it referenced are untouched.
ACCESS REQUIRED: collection owner or admin. A collaborator may curate the contents but not destroy the list.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Collection | NO |
- return object
<root><success></root>
- throws
<root><error></root>
collection_add
Add one object to the end of a collection.
The new member takes the next free position, so an add never disturbs the order of what is already there.
Whether a collection may hold the same object twice is the user's unique_playlist preference, the same one that governs duplicates in their playlists. It is off by default, so duplicates are allowed by default; with it on, adding an object that is already a member is refused with an error rather than silently doing nothing.
A pinned collection refuses anything but its own type, and an object that does not exist is refused rather than stored as a dangling id.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Collection | NO |
| 'id' | string | UID of the object to add | NO |
| 'object_type' | string | type of the object to add | NO |
- return object
<root><success></root>
- throws
<root><error></root>
collection_remove
Remove members from a collection. The objects themselves are untouched, and removing something that was never a member is not an error.
Name either a position or an object:
trackremoves exactly the one member holding that position.idwithobject_typeremoves every member pointing at that object. With duplicates allowed that can be more than one, which is what naming an object rather than a position means.
Either way the remaining positions close up, so the order stays dense and 1-based. Positions you read before the call are stale afterwards.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Collection | NO |
| 'track' | integer | position of the member to remove | YES |
| 'id' | string | UID of the object to remove | YES |
| 'object_type' | string | type of the object to remove | YES |
track takes precedence. Without it, both id and object_type are required.
- return object
<root><success></root>
- throws
<root><error></root>
deleted_podcast_episodes
This returns the episodes for a podcast that have been deleted
| Input | Type | Description | Optional |
|---|---|---|---|
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a deleted_podcast_episode list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| deleted_podcast_episode | array<DeletedPodcastEpisodeObject> | NO | NO | see DeletedPodcastEpisodeObject fields |
Each deleted_podcast_episode entry (DeletedPodcastEpisodeObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| addition_time | integer | NO | NO | |
| delete_time | integer | NO | NO | |
| title | string | YES | NO | |
| file | string | NO | NO | |
| catalog | string | NO | NO | |
| total_count | integer | NO | NO | |
| total_skip | integer | NO | NO | |
| podcast | string | NO | NO |
- throws
<root><error></root>
deleted_songs
Returns songs that have been deleted from the server
| Input | Type | Description | Optional |
|---|---|---|---|
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a deleted_song list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| deleted_song | array<DeletedSongObject> | NO | NO | see DeletedSongObject fields |
Each deleted_song entry (DeletedSongObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| addition_time | integer | NO | NO | |
| delete_time | integer | NO | NO | |
| title | string | YES | NO | |
| file | string | NO | NO | |
| catalog | string | NO | NO | |
| total_count | integer | NO | NO | |
| total_skip | integer | NO | NO | |
| update_time | integer | NO | NO | |
| album | string | NO | NO | |
| artist | string | NO | NO |
- throws
<root><error></root>
deleted_videos
This returns video objects that have been deleted
| Input | Type | Description | Optional |
|---|---|---|---|
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a deleted_video list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| deleted_video | array<DeletedVideoObject> | NO | NO | see DeletedVideoObject fields |
Each deleted_video entry (DeletedVideoObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| addition_time | integer | NO | NO | |
| delete_time | integer | NO | NO | |
| title | string | YES | NO | |
| file | string | NO | NO | |
| catalog | string | NO | NO | |
| total_count | integer | NO | NO | |
| total_skip | integer | NO | NO |
- throws
<root><error></root>
flag
This flags a library item as a favorite
- Setting flag to true (1) will set the flag
- Setting flag to false (0) will remove the flag
NOTE filter is available in Ampache 7.9.0 and higher. id is deprecated and will be removed in API9.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | song, album, artist, playlist, podcast | NO |
podcast_episode, video, tvshow, tvshow_season | |||
| 'filter' | string | $object_id | NO |
| 'filter' | string | Alias of id (Ampache 7.9.0+) | YES |
| 'flag' | boolean | 0, 1 | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
folders
Return children of a parent object in a folder traversal style Ampache 8.0.0+
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Path name or folder UID filter (Default: '/', the root folder; -1 is also the root) | YES |
| 'exact' | boolean | 0, 1 (if true filter is exact rather than fuzzy; default: 1) | YES |
| 'add' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date | YES |
| 'update' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| folder | FolderBrowseNode | NO | NO | see FolderBrowseNode fields |
- throws
<root><error></root>
followers
This gets the followers for the requested username
| Input | Type | Description | Optional |
|---|---|---|---|
| 'username' | string | Username of the user for who to get followers list | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a user list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| user | array<UserSummaryObject> | NO | NO | see UserSummaryObject fields |
Each user entry (UserSummaryObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| username | string | YES | NO |
- throws
<root><error></root>
following
Get a list of people that this user follows
| Input | Type | Description | Optional |
|---|---|---|---|
| 'username' | string | (Username of the user for who to get following list | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a user list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| user | array<UserSummaryObject> | NO | NO | see UserSummaryObject fields |
Each user entry (UserSummaryObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| username | string | YES | NO |
- throws
<root><error></root>
friends_timeline
This get current user friends timeline
| Input | Type | Description | Optional |
|---|---|---|---|
| 'limit' | integer | Maximum number of results to return | YES |
| 'since' | integer | UNIXTIME() | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a activity list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| activity | array<ActivityObject> | NO | NO | see ActivityObject fields |
Each activity entry (ActivityObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| date | integer | NO | NO | |
| object_type | string | YES | NO | |
| object_id | string | NO | NO | |
| action | string | NO | NO | |
| user | UserSummaryObject | NO | NO | see UserSummaryObject fields |
- throws
<root><error></root>
genres
This returns the genres (Tags) based on the specified filter
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Filter results to match this string | YES |
| 'exact' | boolean | 0, 1 (if true filter is exact = rather than fuzzy LIKE) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a genre list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| genre | array<GenreObject> | NO | NO | see GenreObject fields |
Each genre entry (GenreObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| albums | integer | NO | NO | |
| artists | integer | NO | NO | |
| songs | integer | NO | NO | |
| videos | integer | NO | NO | |
| playlists | integer | NO | NO | |
| live_streams | integer | NO | NO | |
| is_hidden | boolean | NO | NO | |
| merge | array<GenreReference> | NO | NO | see GenreReference fields |
- throws
<root><error></root>
genre
This returns a single genre based on UID.
All XML Documents that have a <genre></genre> element may have 0 or more genre elements associated with them.
Each genre element has an attribute "count" that indicates the number of people who have specified this genre.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of genre, returns genre XML | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a single object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| albums | integer | NO | NO | |
| artists | integer | NO | NO | |
| songs | integer | NO | NO | |
| videos | integer | NO | NO | |
| playlists | integer | NO | NO | |
| live_streams | integer | NO | NO | |
| is_hidden | boolean | NO | NO | |
| merge | array<GenreReference> | NO | NO | see GenreReference fields |
- throws
<root><error></root>
genre_albums
This returns the albums associated with the genre in question
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of genre, returns album XML | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a album list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| album | array<AlbumObject> | NO | NO | see AlbumObject fields |
Each album entry (AlbumObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| artist | object | YES | YES | {id, name, prefix, basename} |
| artists | array<NamedReference> | NO | YES | see NamedReference fields |
| songartists | array<NamedReference> | NO | YES | see NamedReference fields |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| tracks | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| diskcount | integer | NO | NO | |
| type | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| mbid_group | string | YES | NO | |
| catalog | string | NO | NO |
- throws
<root><error></root>
genre_artists
This returns the artists associated with the genre in question as defined by the UID
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of genre, returns artist XML | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a artist list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| artist | array<ArtistObject> | NO | NO | see ArtistObject fields |
Each artist entry (ArtistObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| name | string | YES | NO | |
| prefix | string | YES | NO | |
| basename | string | YES | NO | |
| albums | array<AlbumObject> | NO | NO | see AlbumObject fields |
| albumcount | integer | NO | NO | |
| songs | array<SongObject> | NO | NO | see SongObject fields |
| songcount | integer | NO | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| mbid | string | YES | NO | |
| summary | string | YES | NO | |
| time | integer | NO | NO | |
| yearformed | integer | NO | NO | |
| placeformed | string | YES | NO |
- throws
<root><error></root>
genre_songs
returns the songs for this genre
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of genre, returns song XML | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a song list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| song | array<SongObject> | NO | NO | see SongObject fields |
Each song entry (SongObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| title | string | YES | NO | |
| name | string | YES | NO | |
| artist | NamedReference | NO | NO | see NamedReference fields |
| artists | array<NamedReference> | NO | NO | see NamedReference fields |
| album | NamedReference | NO | NO | see NamedReference fields |
| albumartist | NamedReference | NO | YES | see NamedReference fields |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| bpm | number | YES | NO | |
| track | integer | NO | NO | |
| filename | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| mood | array<object> | NO | NO | {id, name} |
| playlisttrack | integer | NO | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| format | string | YES | NO | |
| stream_format | string | YES | NO | |
| bitrate | integer | YES | NO | |
| stream_bitrate | integer | YES | NO | |
| rate | integer | NO | NO | |
| mode | string | YES | NO | |
| mime | string | YES | NO | |
| stream_mime | string | YES | NO | |
| url | string | NO | NO | |
| size | integer | NO | NO | |
| mbid | string | YES | NO | |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| playcount | integer | NO | NO | |
| last_played | string | YES | NO | |
| catalog | string | NO | NO | |
| composer | string | YES | NO | |
| channels | integer | YES | NO | |
| comment | string | YES | NO | |
| license | string | YES | NO | |
| publisher | string | YES | NO | |
| language | string | YES | NO | |
| lyrics | string | YES | NO | |
| replaygain_album_gain | number | YES | NO | |
| replaygain_album_peak | number | YES | NO | |
| replaygain_track_gain | number | YES | NO | |
| replaygain_track_peak | number | YES | NO | |
| r128_album_gain | number | YES | NO | |
| r128_track_gain | number | YES | NO | |
| metadata | object<string, string> | NO | YES |
- throws
<root><error></root>
get_bookmark
Get the bookmark from it's object_id and object_type.
By default; get only the most recent bookmark. Use all to retrieve all media bookmarks for the object.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | $object_id to find | NO |
| 'type' | string | song, video, podcast_episode (object_type) | NO |
| 'include' | integer | 0,1, if true include the object in the bookmark | YES |
| 'all' | integer | 0,1, if true include every bookmark for the object | YES |
- return
<root>
<bookmark>
</root>
- throws
<root><error></root>
Example Example (with include)
get_external_metadata
Return External plugin metadata searching by object id and type
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | $object_id to find | NO |
| 'type' | string | song, album, artist, label (object_type) | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns the plugin payloads when at least one metadata plugin answered, and the empty list envelope for the requested type when none did.
plugin is keyed by metadata-retriever plugin name; each value is that plugin's payload.
plugin is keyed by metadata-retriever plugin name; each value is that plugin's payload.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| object_id | string | NO | NO | |
| object_type | string | NO | NO | |
| plugin | _PluginMap | NO | NO | see _PluginMap fields |
The standard empty envelope, with an empty list keyed by the requested type.
The standard empty envelope, with an empty list keyed by the requested type.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO |
- throws
<root><error></root>
get_indexes
This takes a collection of inputs and returns ID + name for the object type
NOTE This method was removed in API8 (Use list)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | song, album, artist, album_artist, song_artist, playlist, podcast | NO |
podcast_episode, live_stream, catalog | |||
| 'filter' | string | Value is Alpha Match for returned results, may be more than one letter/number | YES |
| 'hide_search' | integer | 0, 1 (if true do not include searches/smartlists in the result) | YES |
| 'update' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date | YES |
| 'include' | boolean | 0, 1 (include songs in a playlist or episodes in a podcast) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
<root>
<total_count>
<song>|<album>|<artist>|<playlist>|<podcast>
</root>
- throws
<root><error></root>
SONGS Example
ARTIST Example
ALBUM Example
PLAYLIST Example
PODCAST Example
get_lyrics
Return Database lyrics or search with plugins by Song id
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | $song_id to find | NO |
| 'plugins' | string | 0, 1, if false disable plugin lookup (default: 1) | NO |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
plugin is keyed by lyric source (database plus any lyric-retriever plugin that answered). When nothing answered it is serialised as an empty array, not an empty object.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| object_id | string | NO | NO | |
| object_type | string | NO | NO | |
| plugin | _PluginMap | NO | NO | see _PluginMap fields |
- throws
<root><error></root>
get_similar
Return similar artist id's or similar song ids compared to the input filter
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | song, artist | NO |
| 'filter' | string | artist id or song id | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Returns a song list.
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| total_count | integer | NO | NO | |
| md5 | string | NO | NO | |
| song | array<SongObject> | NO | NO | see SongObject fields |
Each song entry (SongObject):
| Field | Type | Nullable | Optional | Notes |
|---|---|---|---|---|
| id | string | NO | NO | |
| title | string | YES | NO | |
| name | string | YES | NO | |
| artist | NamedReference | NO | NO | see NamedReference fields |
| artists | array<NamedReference> | NO | NO | see NamedReference fields |
| album | NamedReference | NO | NO | see NamedReference fields |
| albumartist | NamedReference | NO | YES | see NamedReference fields |
| disk | integer | NO | NO | |
| disksubtitle | string | YES | NO | |
| bpm | number | YES | NO | |
| track | integer | NO | NO | |
| filename | string | YES | NO | |
| genre | array<GenreReference> | NO | NO | see GenreReference fields |
| mood | array<object> | NO | NO | {id, name} |
| playlisttrack | integer | NO | NO | |
| time | integer | NO | NO | |
| year | integer | NO | NO | |
| format | string | YES | NO | |
| stream_format | string | YES | NO | |
| bitrate | integer | YES | NO | |
| stream_bitrate | integer | YES | NO | |
| rate | integer | NO | NO | |
| mode | string | YES | NO | |
| mime | string | YES | NO | |
| stream_mime | string | YES | NO | |
| url | string | NO | NO | |
| size | integer | NO | NO | |
| mbid | string | YES | NO | |
| art | string | YES | NO | |
| has_art | boolean | NO | NO | |
| flag | boolean | NO | NO | |
| rating | integer | YES | NO | |
| averagerating | number | YES | NO | |
| playcount | integer | NO | NO | |
| last_played | string | YES | NO | |
| catalog | string | NO | NO | |
| composer | string | YES | NO | |
| channels | integer | YES | NO | |
| comment | string | YES | NO | |
| license | string | YES | NO | |
| publisher | string | YES | NO | |
| language | string | YES | NO | |
| lyrics | string | YES | NO | |
| replaygain_album_gain | number | YES | NO | |
| replaygain_album_peak | number | YES | NO | |
| replaygain_track_gain | number | YES | NO | |
| replaygain_track_peak | number | YES | NO | |
| r128_album_gain | number | YES | NO | |
| r128_track_gain | number | YES | NO | |
| metadata | object<string, string> | NO | YES |
- throws
<root><error></root>
index
This takes a collection of inputs and returns ID + name for the object type
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | catalog, song, album, artist, album_artist, song_artist | NO |
playlist, podcast, podcast_episode, share, video, live_stream | |||
| 'filter' | string | Value is Alpha Match for returned results, may be more than one letter/number | YES |
| 'hide_search' | integer | 0, 1 (if true do not include searches/smartlists in the result) | YES |
| 'exact' | boolean | 0, 1 (if true filter is exact = rather than fuzzy LIKE) | YES |
| 'add' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'add' date newer than the specified date | YES |
| 'update' | set_filter | ISO 8601 Date Format (2020-09-16) Find objects with an 'update' time newer than the specified date | YES |
| 'include' | boolean | 0, 1 (include songs in a playlist or episodes in a podcast) | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'cond' | string | Apply additional filters to the browse using ; separated comma string pairs | YES |
| (e.g. 'filter1,value1;filter2,value2') | |||
| 'sort' | string | Sort name or comma-separated key pair. (e.g. 'name,order') | YES |
| Default order 'ASC' (e.g. 'name,ASC' == 'name') |
- return
XML structure: serialised inside a
<root>element. Each object is an element (e.g.<song>) withidas an attribute; nested objects are child elements (also carrying anidattribute), array/list fields are emitted as repeated elements, booleans are0/1, and text values are wrapped in CDATA. Field names match the JSON model below, but element nesting/repetition differs from the JSON representation.
Keyed by the requested type (e.g. album, artist, song). Without include the value is an array of object ids; with include it is an array of {id, type} references, or a map of parent id -> reference array for parent types such as playlists.
Open map — each value is: array<string> | array<IndexReferenceObject> | object<string, array<IndexReferenceObject>>.
- throws
<root><error></root>
SONGS Example
ARTIST Example
ALBUM Example
PLAYLIST Example
PODCAST Example
ARTIST Example (with include)
ALBUM Example (with include)
PLAYLIST Example (with include)