XML 4.1

Lets go through come calls and examples that you can do for each XML method.

Remember that Binary data methods will not return xml; just the file/data you have requested.

Non-Data Methods

handshake

  • MINIMUM_API_VERSION=380001

This is the function that handles verifying a new handshake Takes a timestamp, auth key, and username.

@param array $input @return boolean

InputTypeDescriptionOptional
'auth'string$passphrase (Timestamp . Password SHA hash) OR (API Key)NO
'user'string$username (Required if login/password authentication)YES
'timestamp'integerUNIXTIME() (Timestamp used in seed of password hash. Required if login/password authentication)YES
'version'string$version (API Version that the application understands)YES

Example

ping

  • MINIMUM_API_VERSION=380001

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 @param array $input

InputTypeDescriptionOptional
'auth'string(Session ID) returns version information and extends the session if passedYES

Example

goodbye

  • MINIMUM_API_VERSION=400001

Destroy a session using the auth parameter.

@param array $input

InputTypeDescriptionOptional
'auth'string(Session ID) destroys the session if it existsNO

Example

url_to_song

  • MINIMUM_API_VERSION=380001

This takes a url and returns the song object in question @param array $input

InputTypeDescriptionOptional
'url'stringFull Ampache URL from server, translates back into a song XMLNO

Example

Data Methods

get_indexes

  • MINIMUM_API_VERSION=400001

This takes a collection of inputs and returns ID + name for the object type @param array $input @return boolean

InputTypeDescriptionOptional
'type'string'song', 'album', 'artist', 'playlist'NO
'filter'stringYES
'add'set_filterISO 8601 Date Format (2020-09-16) add date is newer then specified dateYES
'update'set_filterISO 8601 Date Format (2020-09-16) update itme is newer then specified dateYES
'offset'integerYES
'limit'integerYES

SONGS

Example

ARTIST

Example

ALBUM

Example

PLAYLIST

Example

  • MINIMUM_API_VERSION=380001
  • CHANGED_IN_API_VERSION=400001
  • CHANGED_IN_API_VERSION=410001

Changes to text searches for 410001

  • Metadata Search is combined with text and numeric. Refer to the Metadata operator table to see the new order after adding regex to text fields.

Changes to text searches for 400001

  • 'is not' has been added shifting values down the list. 0=contains, 1=does not contain, 2=starts with, 3=ends with 4=is, 5=is not, 6=sounds like, 7=does not sound like
  • rule_1['name'] is depreciated. Instead of rule_1['name'] use rule_1['title'] (I have put a temp workaround into the search rules to alleviate this change for any existing apps)
  • Metadata Search is combined with text and numeric. Meaning that changes to text lists push the numeric fields down.

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.

  • Rule arrays must contain the following:
    • rule name (e.g. rule_1['title'], rule_2['album'])
    • rule operator (e.g. rule_1_operator[0], rule_2_operator[3])
    • rule input (e.g. rule_1_input['Prodigy'], rule_2_input['Land'])

Available search rules

Select the type of search based on the type of data you are searching for. (songs, playlists, etc)

rule_1TitleTypeValid Items
anywhereAny searchable texttextsong
titleTitle / Nametextsong,album,artist,playlist,label
favoriteFavoritestextsong, album, artist
playlist_namePlaylist Nametextsong
albumAlbumtextsong
artistArtisttextsong,album
composerComposertextsong
commentCommenttextsong
labelLabeltextsong
lyricsLyricstextsong
tagTagtagssong,album,artist
album_tagAlbum tagtagssong
artist_tagArtist tagtagssong
filenameFilenametextsong,video
placeformedPlacetextartist
usernameUsernametextuser
yearYearnumericsong,album
timeLength (in minutes)numericsong,album
ratingRating (Average)numericsong,album,artist
myratingMy Ratingnumericsong,album,artist
artistratingMy Rating (Artist)numericsong,album
albumratingMy Rating (Album)numericsong
played_times# Playednumericsong,album,artist
bitrateBitratenumericsong
has imageghtLocal Imagebooleanalbum,artist
image heightImage Heightnumericalbum,artist
image widthImage Widthnumericalbum,artist
yearformedYearnumericartist
playedPlayedbooleansong
myplayedPlayed by Mebooleansong
myplayedartistPlayed by Me (Artist)booleansong
myplayedalbumPlayed by Me (Album)booleansong
last_playMy Last Playdayssong,album,artist
addedAddeddatesong
updatedUpdateddatesong
catalogCatalogboolean_numericsong,album
other_userAnother Useruser_numericsong,album,artist
other_user_albumAnother Useruser_numericsong
other_user_artistAnother Useruser_numericsong
playlistPlaylistboolean_numericsong
licensingMusic Licenseboolean_numericsong
smartplaylistSmart Playlistboolean_subsearchsong
metadataMetadatametadata (multiple types)song

Available search operators

Select your operator (integer only!) based on the type or your selected search

rule_1_operatorText / Tags / MetadataNumeric / user_numericDateBoolean, Numeric, Subsearch / Days
0containsis greater than or equal to / has lovedbeforeis true / before (x) days ago
1does not containis less than or equal to / has rated 5 starsafteris false / after (x) days ago
2starts withequals / has rated 4 stars
3ends withdoes not equal / has rated 3 stars
4isis greater than / has rated 2 stars
5is notis less than / has rated 1 stars
6sounds like (Text Only)
7does not sound like (Text Only)
8matches regular expression (Text Only)
9does not match regular expression (Text Only)

Send the correct input based on the type of search.

rule_1_input
text
integer
boolean

NOTE To search metadata you need to add a 4th rule "rule_X_subtype" Operators for metadata are using the text/tag types AND numeric types in a single list as they can be ints/strings/dates. Currently there is not a simple way to identify what metadata types you have saved. New methods will be created for this.

Metadata operator table

rule_1_operatorMetadata
0contains
1does not contain
2starts with
3ends with
4is
5is not
6sounds like (Text Only)
7does not sound like (Text Only)
8matches regular expression (Text Only)
9does not match regular expression (Text Only)
10is greater than or equal to
11is less than or equal to
12is
13is not
14is greater than
15is less than

To search a mixed type like metadata you must search using 4 rules.

  • Search rule 1 for band containing 'Prodigy', Search Rule 2 for bbm > 120
    • rule name (e.g. rule_1['metadata'], rule_2['metadata'])
    • rule operator (e.g. rule_1_operator[0], rule_2_operator[12])
    • rule input (e.g. rule_1_input['Prodigy'], rule_2_input['120'])
    • rule subtype (e.g. rule_1_subtype['4'], rule_2_subtype['9'])

advanced_search parameters

@param array $input

INPUTS
* ampache_url = (string)
* ampache_API = (string)
* operator = (string) 'and', 'or' (whether to match one rule or all)
* rules = (array) = [[rule_1,rule_1_operator,rule_1_input], [rule_2,rule_2_operator,rule_2_input], [etc]]
* type = (string) 'song', 'album', 'artist', 'playlist', 'label', 'user', 'video'
* offset = (integer)
* limit' = (integer)

SONG

Example

ARTIST

Example

ALBUM

Example

artists

  • MINIMUM_API_VERSION=380001

This takes a collection of inputs and returns artist objects.

@param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for returned results, may be more than one letter/numberYES
'exact'boolean(0, 1) if true filter is exact rather then fuzzyYES
'add'set_filterISO 8601 Date Format (2020-09-16) add date is newer then specified dateYES
'update'set_filterISO 8601 Date Format (2020-09-16) update itme is newer then specified dateYES
'offset'integerYES
'limit'integerYES
'include'string'albums', 'songs' and will include the corresponding XML nested in the artist XMLYES

Example

artist

  • MINIMUM_API_VERSION=380001

This returns a single artist based on the UID of said artist @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Artist, returns artist XMLNO
'include'string'albums', 'songs' and will include the corresponding XML nested in the artist XMLYES

Example

artist_albums

  • MINIMUM_API_VERSION=380001

This returns the albums of an artist @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Artist, returns Album XMLNO
'offset'integerYES
'limit'integerYES

Example

artist_songs

  • MINIMUM_API_VERSION=380001

This returns the songs of the specified artist @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Artist, returns Song XMLNO
'offset'integerYES
'limit'integerYES

Example

albums

  • MINIMUM_API_VERSION=380001

This returns albums based on the provided search filters @param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for returned results, may be more than one letter/numberYES
'exact'boolean(0, 1) if true filter is exact rather then fuzzyNO
'add'set_filterISO 8601 Date Format (2020-09-16) add date is newer then specified dateYES
'update'set_filterISO 8601 Date Format (2020-09-16) update itme is newer then specified dateYES
'offset'integerYES
'limit'integerYES
'include'string'albums', 'songs' will include the corresponding XML nested in the album XMLYES

Example

album

  • MINIMUM_API_VERSION=380001

This returns a single album based on the UID provided @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Album, returns album XMLNO
'include'string'songs' and will include the corresponding XML nested in the album XMLYES

Example

album_songs

  • MINIMUM_API_VERSION=380001

This returns the songs of a specified album @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Album, returns song XMLNO
'offset'integerYES
'limit'integerYES

Example

tags

  • MINIMUM_API_VERSION=380001

This returns the tags (Genres) based on the specified filter @param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for returned results, may be more than one letter/numberYES
'exact'booleanif true filter is exact rather then fuzzyYES
'offset'integerYES
'limit'integerYES

Example

tag

  • MINIMUM_API_VERSION=380001

This returns a single tag based on UID @param array $input

InputTypeDescriptionOptional
'filter'stringUID of tag, returns tag XMLNO

Example

tag_artists

  • MINIMUM_API_VERSION=380001

This returns the artists associated with the tag in question as defined by the UID @param array $input

InputTypeDescriptionOptional
'filter'stringUID of tag, returns artist XMLNO
'offset'integerYES
'limit'integerYES

Example

tag_albums

  • MINIMUM_API_VERSION=380001

This returns the albums associated with the tag in question @param array $input

InputTypeDescriptionOptional
'filter'stringUID of tag, returns album XMLNO
'offset'integerYES
'limit'integerYES

Example

tag_songs

  • MINIMUM_API_VERSION=380001

returns the songs for this tag @param array $input

InputTypeDescriptionOptional
'filter'stringUID of tag, returns song XMLNO
'offset'integerYES
'limit'integerYES

Example

songs

  • MINIMUM_API_VERSION=380001

Returns songs based on the specified filter @param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for returned results, may be more than one letter/numberNO
'exact'boolean(0, 1) if true filter is exact rather then fuzzyNO
'add'set_filterISO 8601 Date Format (2020-09-16) add date is newer then specified dateYES
'update'set_filterISO 8601 Date Format (2020-09-16) update itme is newer then specified dateYES
'offset'integerYES
'limit'integerYES

Example

song

  • MINIMUM_API_VERSION=380001

returns a single song @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Song, returns song XMLNO

Example

playlists

  • MINIMUM_API_VERSION=380001

This returns playlists based on the specified filter @param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for returned results, may be more than one letter/numberYES
'exact'boolean(0, 1) if true filter is exact rather then fuzzyYES
'add'set_filterISO 8601 Date Format (2020-09-16) add date is newer then specified dateYES
'update'set_filterISO 8601 Date Format (2020-09-16) update itme is newer then specified dateYES
'offset'integerYES
'limit'integerYES

Example

playlist

  • MINIMUM_API_VERSION=380001

This returns a single playlist @param array $input

InputTypeDescriptionOptional
'filter'stringUID of playlist, returns playlist XMLNO

Example

playlist_songs

  • MINIMUM_API_VERSION=380001

This returns the songs for a playlist @param array $input

InputTypeDescriptionOptional
'filter'stringUID of Playlist, returns song XMLNO
'offset'integerYES
'limit'integerYES

Example

playlist_create

  • MINIMUM_API_VERSION=380001

This create a new playlist and return it @param array $input

InputTypeDescriptionOptional
'name'stringPlaylist nameNO
'type'stringPlaylist type 'public', 'private'YES

Example

playlist_edit

  • MINIMUM_API_VERSION=400001
  • CHANGED_IN_API_VERSION=400003
  • CHANGED_IN_API_VERSION=420000

This modifies name and type of a playlist Previously name and type were mandatory while filter wasn't. this has been reversed. @param array $input

InputTypeDescriptionOptional
'filter'stringUID of PlaylistNO
'name'stringPlaylist nameYES
'type'stringPlaylist type 'public', 'private'YES
'items'stringcomma-separated song_id's (replace existing items with a new object_id)YES
'tracks'stringcomma-separated playlisttrack numbers matched to items in orderYES

Example

playlist_delete

  • MINIMUM_API_VERSION=380001

This deletes a playlist @param array $input

InputTypeDescriptionOptional
'filter'stringUID of PlaylistNO

Example

playlist_add_song

  • MINIMUM_API_VERSION=380001
  • CHANGED_IN_API_VERSION=400001

This adds a song to a playlist. setting check=1 will not add duplicates to the playlist @param array $input

InputTypeDescriptionOptional
'filter'integerUID of PlaylistNO
'song'integerUID of song to add to playlistNO
'check'boolean0, 1 Whether to check and ignore duplicates (default = 0)YES

Example

playlist_remove_song

  • MINIMUM_API_VERSION=380001
  • CHANGED_IN_API_VERSION=400001

This remove a song from a playlist. Previous versions required 'track' instead of 'song'. @param array $input

InputTypeDescriptionOptional
'filter'stringUID of PlaylistNO
'song'stringUID of song to remove from playlistYES
'track'integerTrack number to remove from playlistYES

Example

playlist_generate

  • MINIMUM_API_VERSION=400001
  • CHANGED_IN_API_VERSION=400002

Get a list of song XML, indexes or id's based on some simple search criteria 'recent' will search for tracks played after 'Popular Threshold' days 'forgotten' will search for tracks played before 'Popular Threshold' days 'unplayed' added in 400002 for searching unplayed tracks

@param array $input

InputTypeDescriptionOptional
'mode'string'recent', 'forgotten', 'unplayed', 'random' (default = 'random')YES
'filter'stringstring LIKE matched to song titleYES
'album'integer$album_idYES
'artist'integer$artist_idYES
'flag'integerget flagged songs only 0, 1 (default = 0)YES
'format'string'song', 'index','id' (default = 'song')YES
'offset'integerYES
'limit'integerYES

SONG

Example

INDEX

Example

ID

Example

search_songs

  • MINIMUM_API_VERSION=380001

This searches the songs and returns... songs @param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for Name returns share XMLNO
'offset'integerYES
'limit'integerYES

Example

videos

  • MINIMUM_API_VERSION=380001

This returns video objects! @param array $input

InputTypeDescriptionOptional
'filter'stringValue is Alpha Match for returned results, may be more than one letter/numberNO
'exact'booleanif true filter is exact rather then fuzzyYES
'offset'integerYES
'limit'integerYES

Example

video

  • MINIMUM_API_VERSION=380001

This returns a single video @param array $input

InputTypeDescriptionOptional
'filter'stringUID of video, returns video XMLNO

Example

stats

  • MINIMUM_API_VERSION=380001
  • CHANGED_IN_API_VERSION=400001

Get some items based on some simple search types and filters. This method has partial backwards compatibility with older api versions but should be updated to follow the current input values. (Changed in 400001 'filter' added) @param array $input

InputTypeDescriptionOptional
'type'string'song', 'album', 'artist'NO
'filter'string'newest', 'highest', 'frequent', 'recent', 'forgotten', 'flagged', 'random'NO
'user_id'integerYES
'username'stringYES
'offset'integerYES
'limit'integerYES

SONG

Example

ARTIST

Example

ALBUM

Example

user

  • MINIMUM_API_VERSION=380001

This get an user public information @param array $input

InputTypeDescriptionOptional
'username'stringUsername of the user to get details forNO

Example

user_create

  • MINIMUM_API_VERSION=400001

Create a new user. (Requires the username, password and email.) @param array $input

InputTypeDescriptionOptional
'username'string$usernameNO
'password'stringhash('sha256', $password))NO
'email'string'user@gmail.com'NO
'fullname'stringYES
'disable'boolean0, 1YES

Example

user_update

  • MINIMUM_API_VERSION=400001

Update an existing user. @param array $input

InputTypeDescriptionOptional
'username'string$usernameNO
'password'stringhash('sha256', $password))YES
'email'string'user@gmail.com'YES
'fullname'stringYES
'website'stringYES
'state'stringYES
'city'stringYES
'disable'boolean0, 1YES
'maxbitrate'stringYES

Example

user_delete

  • MINIMUM_API_VERSION=400001

Delete an existing user. @param array $input

InputTypeDescriptionOptional
'username'stringNO

Example

followers

  • MINIMUM_API_VERSION=380001

This get an user followers @param array $input

InputTypeDescriptionOptional
'username'stringUsername of the user for who to get followers listNO

Example

following

  • MINIMUM_API_VERSION=380001

This get the user list followed by an user @param array $input

InputTypeDescriptionOptional
'username'string(Username of the user for who to get following listNO

Example

toggle_follow

  • MINIMUM_API_VERSION=380001

This follow/unfollow an user @param array $input

InputTypeDescriptionOptional
'username'stringUsername of the user to follow/unfollowNO

Example

last_shouts

  • MINIMUM_API_VERSION=380001

This get the latest posted shouts @param array $input

InputTypeDescriptionOptional
'username'stringUsername of the user for who to get latest shoutsYES
'limit'integerYES

Example

rate

  • MINIMUM_API_VERSION=380001

This rates a library item @param array $input

InputTypeDescriptionOptional
'type'stringlibrary item type, album, artist, song, videoNO
'id'stringlibrary item idNO
'rating'integerrating between 0-5NO

Example

flag

  • MINIMUM_API_VERSION=400001

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 @param array $input
InputTypeDescriptionOptional
'type'string'song', 'album', 'artist', 'video'NO
'id'integer$object_idNO
'flag'boolean0, 1NO

Example

record_play

  • MINIMUM_API_VERSION=400001

Take a song_id and update the object_count and user_activity table with a play. This allows other sources to record play history to ampache @param array $input

InputTypeDescriptionOptional
'id'integer$object_idNO
'user'integer$user_idNO
'client'string$agentYES

Example

scrobble

  • MINIMUM_API_VERSION=400001

Search for a song using text info and then record a play if found. This allows other sources to record play history to ampache @param array $input

InputTypeDescriptionOptional
'song'string$song_nameNO
'artist'string$artist_nameNO
'album'string$album_nameNO
'songmbid'string$song_mbidYES
'artistmbid'string$artist_mbidYES
'albummbid'string$album_mbidYES
'date'integerUNIXTIME()YES
'client'string$agentYES

Example

catalog_action

  • MINIMUM_API_VERSION=400001

Kick off a catalog update or clean for the selected catalog @param array $input

InputTypeDescriptionOptional
'task'string'add_to_catalog', 'clean_catalog'NO
'catalog'integer$catalog_idNO

Example: clean_catalog)

Example: add_to_catalog)

timeline

  • MINIMUM_API_VERSION=380001

This get an user timeline @param array $input

InputTypeDescriptionOptional
'username'stringUsername of the user for whom to get the timelineNO
'limit'integerYES
'since'integerUNIXTIME()YES

Example

friends_timeline

  • MINIMUM_API_VERSION=380001

This get current user friends timeline @param array $input

InputTypeDescriptionOptional
'limit'integerYES
'since'integerUNIXTIME()NO

Example

update_from_tags

  • MINIMUM_API_VERSION=400001

Update a single album, artist, song from the tag data @param array $input

InputTypeDescriptionOptional
'type'string'artist', 'album', 'song'NO
'id'integer$artist_id, $album_id, $song_idNO

Example

update_artist_info

  • MINIMUM_API_VERSION=400001

Update artist information and fetch similar artists from last.fm Make sure lastfm_API_key is set in your configuration file @param array $input

InputTypeDescriptionOptional
'id'integer$artist_idNO

Example

update_art

  • MINIMUM_API_VERSION=400001

Updates a single album, artist, song running the gather_art process Doesn't overwrite existing art by default. @param array $input

InputTypeDescriptionOptional
'id'integer$object_idNO
'type'string'song', 'podcast'NO
'overwrite'boolean0, 1YES

Example

update_podcast

  • MINIMUM_API_VERSION=410005

Sync and download new podcast episodes @param array $input

InputTypeDescriptionOptional
'id'integer$object_idNO

Example

Binary Data Methods

stream

  • MINIMUM_API_VERSION=400001

Streams a given media file. Takes the file id in parameter with optional max bit rate, file format, time offset, size and estimate content length option. @param array $input

InputTypeDescriptionOptional
'id'integer$object_idNO
'type'string'song', 'podcast'NO
'bitrate'integermax bitrate for transcodingYES
'format'string'mp3', 'ogg', 'raw', etcYES
'offset'integertime offset in secondsYES
'length'boolean0, 1YES

download

  • MINIMUM_API_VERSION=400001

Downloads a given media file. set format=raw to download the full file @param array $input

InputTypeDescriptionOptional
'id'integer$object_idNO
'type'string'song', 'podcast'NO
'format'string'mp3', 'ogg', 'raw', etcYES

get_art

  • MINIMUM_API_VERSION=400001

Get an art image. @param array $input

Control Methods

localplay

  • MINIMUM_API_VERSION=380001

This is for controlling localplay @param array $input

TBC

democratic

  • MINIMUM_API_VERSION=380001

This is for controlling democratic play @param array $input

  • ACTION
    • method
      • vote
        • oid (Unique ID of the element you want to vote on)
        • type (Type of object, only song is currently accepted so this is optional)
      • devote
        • oid (Unique ID of the element you want to vote on)
        • type (Type of object, only song is currently accepted so this is optional)
      • playlist (Returns an array of song items with an additional \[VOTE COUNT]\ element)
      • play (Returns the URL for playing democratic play)
InputTypeDescriptionOptional
'oid'integerNO
'method'stringNO
'action'stringNO
TBC

All XML Documents that have a <tag></tag> element may have 0 or more tag elements associated with them. Each tag element has an attribute "count" that indicates the number of people who have specified this tag.

Artists XML Document. ID's are Ampache's unique Identifier for the artist.

<root>
<artist id="12039">
<name>Metallica</name>
<albums># of Albums</albums>
<songs># of Songs</songs>
<tag id="2481" count="2">Rock & Roll</tag>
<tag id="2482" count="1">Rock</tag>
<tag id="2483" count="1">Roll</tag>
<preciserating>3</preciserating>
<rating>2.9</rating>
</artist>
<artist id="129348">
<name>AC/DC</name>
<albums># of Albums</albums>
<songs># of Songs</songs>
<tag id="2481" count="2">Rock & Roll</tag>
<tag id="2482" count="2">Rock</tag>
<tag id="2483" count="1">Roll</tag>
<preciserating>3</preciserating>
<rating>2.9</rating>
</artist>
</root>

Album XML Document. ID's are Ampache's unique identifier for the album and artist associated.

<root>
<album id="2910">
<name>Back in Black</name>
<artist id="129348">AC/DC</artist>
<year>1984</year>
<tracks>12</tracks>
<disk>1</disk>
<tag id="2481" count="2">Rock & Roll</tag>
<tag id="2482" count="1">Rock</tag>
<tag id="2483" count="1">Roll</tag>
<art>http://localhost/image.php?id=129348</art>
<preciserating>3</preciserating>
<rating>2.9</rating>
</album>
</root>

Single Song XML document, includes references to its parent objects.

<root>
<song id="3180">
<title>Hells Bells</title>
<artist id="129348">AC/DC</artist>
<album id="2910">Back in Black</album>
<tag id="2481" count="3">Rock & Roll</tag>
<tag id="2482" count="1">Rock</tag>
<tag id="2483" count="1">Roll</tag>
<track>4</track>
<time>234</time>
<url>http://localhost/play/index.php?oid=123908...</url>
<size>Song Filesize in Bytes</size>
<art>http://localhost/image.php?id=129348</art>
<preciserating>3</preciserating>
<rating>2.9</rating>
</song>
</root>

Tag XML Document, includes counts for it's child objects

<root>
<tag id="2481">
<name>Rock & Roll</name>
<albums>84</albums>
<artists>29</artists>
<songs>239</songs>
<video>13</video>
<playlist>2</playlist>
<stream>6</stream>
</tag>
</root>

Playlist XML Document, includes counts for it's child objects

<root>
<playlist id="1234">
<name>The Good Stuff</name>
<owner>Karl Vollmer</owner>
<items>50</items>
<tag id="2481" count="2">Rock & Roll</tag>
<tag id="2482" count="2">Rock</tag>
<tag id="2483" count="1">Roll</tag>
<type>Public</type>
</playlist>
</root>

Video XML Document -- Attention UIDs for video elements are non-unique against song.id

<root>
<video id="1234">
<title>Futurama Bender's Big Score</title>
<mime>video/avi</mime>
<resolution>720x288</resolution>
<size>Video Filesize in Bytes</size>
<tag id="12131" count="3">Futurama</tag>
<tag id="32411" count="1">Movie</tag>
<url>http://localhost/play/index.php?oid=123908...</url>
</video>
</root>