XML Methods
API5.0 XML Methods
Let's go through come calls and examples that you can do for each XML method.
With the exception of Binary methods, all responses will return a HTTP 200 response.
Also remember that Binary data methods will not return xml; 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
Auth Methods
Auth methods are used for authenticating or checking the status of your session in an Ampache server
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 (Required if login/password authentication) | YES |
| 'version' | string | $version (API Version that the application understands) | YES |
- return
<root>
<auth>
<api>
<session_expire>
<update>
<add>
<clean>
<songs>
<albums>
<artists>
<genres>
<playlists>
<users>
<catalogs>
<videos>
<podcasts>
<podcast_episodes>
<shares>
<licenses>
<live_streams>
<labels>
</root>
- 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
<root>
<session_expire>
<server>
<version>
<compatible>
<auth>
<api>
<update>
<add>
<clean>
<songs>
<albums>
<artists>
<genres>
<playlists>
<users>
<catalogs>
<videos>
<podcasts>
<podcast_episodes>
<shares>
<licenses>
<live_streams>
<labels>
</root>
- throws
<root>
<server>
<version>
<compatible>
</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>
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
<root>
<success>
</root>
- throws
<root><error></root>
system_preferences
Get your server preferences
ACCESS REQUIRED: 100 (Admin)
- return
<root>
<preferences>
</root>
- throws
<root><error></root>
users
Get ids and usernames for your site
- return
<root>
<user>
</root>
- throws
<root><error></root>
user_preferences
Get your user preferences
- return
<root>
<preference>
</root>
bookmarks
Get information about bookmarked media this user is allowed to manage.
- return
<root>
<bookmark>
</root>
- throws
<root><error></root>
Data Methods
Data methods require additional information and parameters to return information
get_indexes
This takes a collection of inputs and returns ID + name for the object type
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | song, album, artist, album_artist, playlist, podcast, podcast_episode, live_stream | NO |
| 'filter' | string | Value is Alpha Match for returned results, may be more than one letter/number | 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 |
| 'hide_search' | integer | 0, 1 (if true do not include searches/smartlists in the result) | YES |
- return
<root>
<total_count>
<song>|<album>|<artist>|<playlist>|<podcast>
</root>
- throws
<root><error></root>
SONGS Example
ARTIST Example
ALBUM Example
PLAYLIST Example
PODCAST Example
advanced_search
Using 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, playlist, label, user, video | NO |
| 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
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 |
- return
<root>
<total_count>
<artist>
</root>
- 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
<root>
<total_count>
<artist>
</root>
- 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 |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<album>
</root>
- 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 |
- return
<root>
<total_count>
<song>
</root>
- throws
<root><error></root>
albums
This returns albums based on the provided search filters
| 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 |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'include' | string | albums, songs (include child objects in the response) | YES |
- return
<root>
<total_count>
<album>
</root>
- 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
<root>
<total_count>
<album>
</root>
- 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 |
| 'exact' | boolean | 0, 1 (if true don't group songs from different disks) | 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>
</root>
- 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 |
- return
<root>
<total_count>
<genre>
</root>
- 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
<root>
<total_count>
<genre>
</root>
- 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 | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<artist>
</root>
- 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 | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<album>
</root>
- throws
<root><error></root>
genre_songs
returns the songs for this genre
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of genre, returns song XML | 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>
</root>
- throws
<root><error></root>
songs
Returns songs 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 |
| '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 |
- return
<root>
<total_count>
<song>
</root>
- throws
<root><error></root>
song
returns a single song
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Song, returns song XML | NO |
- return
<root>
<total_count>
<song>
</root>
- throws
<root><error></root>
song_delete
Delete an existing song. (if you are allowed to)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of song to delete | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
url_to_song
This takes a url and returns the song object in question
| Input | Type | Description | Optional |
|---|---|---|---|
| 'url' | string | Full Ampache URL from server, translates back into a song XML | NO |
- return
<root>
<total_count>
<song>
</root>
- throws
<root><error></root>
playlists
This returns playlists 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 |
| '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 |
| 'hide_search' | integer | 0, 1 (if true do not include searches/smartlists in the result) | YES |
- return
<root>
<total_count>
<playlist>
</root>
- throws
<root><error></root>
playlist
This returns a single playlist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of playlist, returns playlist XML | NO |
- return
<root>
<total_count>
<playlist>
</root>
- throws
<root><error></root>
playlist_songs
This returns the songs for a playlist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Playlist, returns song XML | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<song>
</root>
- throws
<root><error></root>
playlist_create
This create a new playlist and return it
| Input | Type | Description | Optional |
|---|---|---|---|
| 'name' | string | Playlist name | NO |
| 'type' | string | public, private (Playlist type) | YES |
- return
<root>
<total_count>
<playlist>
</root>
- throws
<root><error></root>
playlist_edit
This modifies name and type of a playlist Previously name and type were mandatory while filter wasn't. this has been reversed.
NOTE items and tracks must be sent together and be of equal length
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Playlist | NO |
| 'name' | string | Playlist name | YES |
| 'type' | string | public, private (Playlist type) | YES |
| 'owner' | string | Change playlist owner to the user id (-1 = System playlist) | YES |
| 'items' | string | comma-separated song_id's (replaces existing items with a new id) | YES |
| 'tracks' | string | comma-separated playlisttrack numbers matched to 'items' in order | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
playlist_delete
This deletes a playlist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Playlist | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
playlist_add_song
This adds a song to a playlist. setting check=1 will not add duplicates to the playlist
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Playlist | NO |
| 'song' | string | UID of song to add to playlist | NO |
| 'check' | boolean | 0, 1 Whether to check and ignore duplicates (default = 0) | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
playlist_remove_song
This remove a song from a playlist. Previous versions required 'track' instead of 'song'.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Playlist | NO |
| 'song' | string | UID of song to remove from playlist | YES |
| 'track' | integer | Track number to remove from playlist | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
playlist_generate
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
Note when using the 'id' format total_count is not returned.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'mode' | string | recent, forgotten, unplayed, random (default = 'random') | YES |
| 'filter' | string | string LIKE matched to song title | YES |
| 'album' | integer | $album_id | YES |
| 'artist' | integer | $artist_id | YES |
| 'flag' | integer | 0, 1 (get flagged songs only. default = 0) | YES |
| 'format' | string | song, index, id (default = 'song') | 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>|<index>|<id>
</root>
- throws
<root><error></root>
SONG Example
INDEX Example
ID Example
shares
This searches the shares and returns... shares
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Filter results to match this string | YES |
| 'exact' | boolean | 0, 1 boolean to match the exact filter string | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<share>
</root>
- throws
<root><error></root>
share
Return shares by UID
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Share, returns song XML | NO |
- return
<root>
<total_count>
<share>
</root>
- throws
<root><error></root>
share_create
Create a public url that can be used by anyone to stream media. Takes the file id with optional description and expires parameters.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of object you are sharing | NO |
| 'type' | string | object_type | NO |
| 'description' | string | description (will be filled for you if empty) | YES |
| 'expires' | integer | days to keep active | YES |
- return
<root>
<total_count>
<share>
</root>
- throws
<root><error></root>
share_edit
Update the description and/or expiration date for an existing share. Takes the share id to update with optional description and expires parameters.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Alpha-numeric search term | NO |
| 'stream' | boolean | 0, 1 Allow streaming | YES |
| 'download' | boolean | 0, 1 Allow Downloading | YES |
| 'expires' | integer | number of whole days before expiry | YES |
| 'description' | string | update description | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
share_delete
Delete an existing share.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of Share to delete | NO |
- return
<root>
<success>
</root>
- 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' | integer | 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
<root>
<total_count>
<song>|<artist>
</root>
- throws
<root><error></root>
search_songs
This searches the songs and returns... songs
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Filter results to match this string | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<song>
</root>
- throws
<root><error></root>
videos
This returns video 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 |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<video>
</root>
- throws
<root><error></root>
video
This returns a single video
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of video, returns video XML | NO |
- return
<root>
<total_count>
<video>
</root>
- throws
<root><error></root>
stats
Get some items based on some simple search types and filters. (Random by default) This method HAD partial backwards compatibility with older api versions but it has now been removed
| Input | Type | Description | Optional |
|---|---|---|---|
| 'type' | string | song, album, artist | NO |
| 'filter' | string | newest, highest, frequent, recent, forgotten, flagged, random | YES |
| 'user_id' | integer | YES | |
| 'username' | string | 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>
</root>
- throws
<root><error></root>
SONG Example
ARTIST Example
ALBUM Example
podcasts
Get information about podcasts
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Value is Alpha Match for returned results, may be more than one letter/number | YES |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
| 'include' | string | episodes (include podcast_episodes in the response) | YES |
- return
<root>
<total_count>
<podcast>
</root>
- throws
<root><error></root>
podcast
Get the podcast from it's id.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of podcast, returns podcast XML | NO |
| 'include' | string | episodes (include podcast_episodes in the response) | YES |
- return
<root>
<total_count>
<podcast>
</root>
- throws
<root><error></root>
podcast_create
Create a podcast that can be used by anyone to stream media. Takes the url and catalog parameters.
ACCESS REQUIRED: 75 (Catalog Manager)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'url' | string | rss url for podcast | NO |
| 'catalog' | string | podcast catalog | NO |
- return
<root>
<total_count>
<podcast>
</root>
- throws
<root><error></root>
podcast_edit
Update the description and/or expiration date for an existing podcast. Takes the podcast id to update with optional description and expires parameters.
ACCESS REQUIRED: 50 (Content Manager)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | Alpha-numeric search term | NO |
| 'feed' | string | feed rss xml url | YES |
| 'title' | string | title string | YES |
| 'website' | string | source website url | YES |
| 'description' | string | YES | |
| 'generator' | string | YES | |
| 'copyright' | string | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
podcast_delete
Delete an existing podcast.
ACCESS REQUIRED: 75 (Catalog Manager)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of podcast to delete | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
podcast_episodes
This returns the episodes for a podcast
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of podcast | NO |
| 'offset' | integer | Return results starting from this index position | YES |
| 'limit' | integer | Maximum number of results to return | YES |
- return
<root>
<total_count>
<podcast_episode>
</root>
- throws
<root><error></root>
podcast_episode
Get the podcast_episode from it's id.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | podcast_episode ID number | NO |
- return
<root>
<total_count>
<podcast_episode>
</root>
- throws
<root><error></root>
podcast_episode_delete
Delete an existing podcast_episode.
| Input | Type | Description | Optional |
|---|---|---|---|
| 'filter' | string | UID of podcast_episode to delete | NO |
- return
<root>
<success>
</root>
- throws
<root><error></root>
user
This gets a user's public information
| Input | Type | Description | Optional |
|---|---|---|---|
| 'username' | string | Username of the user to get details for | NO |
- return
<root>
<user>
</root>
- throws
<root><error></root>
user_create
Create a new user. (Requires the username, password and email.)
ACCESS REQUIRED: 100 (Admin)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'username' | string | $username | NO |
| 'password' | string | hash('sha256', $password) | NO |
| 'email' | string | e.g.user@gmail.com | NO |
| 'fullname' | string | YES | |
| 'disable' | boolean | 0, 1 | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>
user_update
Update an existing user.
ACCESS REQUIRED: 100 (Admin)
| Input | Type | Description | Optional |
|---|---|---|---|
| 'username' | string | $username | NO |
| 'password' | string | hash('sha256', $password) | YES |
| 'email' | string | e.g.user@gmail.com | YES |
| 'fullname' | string | YES | |
| 'website' | string | YES | |
| 'state' | string | YES | |
| 'city' | string | YES | |
| 'disable' | boolean | 0, 1 | YES |
| 'maxbitrate' | string | YES |
- return
<root>
<success>
</root>
- throws
<root><error></root>