Ampache's API

Ampache has an open, published API that can allow 3rd party applications to integrate with the music, meta-data, and album art held by Ampache. The primary use for this API is to expose your Ampache server to mobile devices while maintaining a native and fully functional client without having to rely on a web browser. Full documentation for developers on Ampache's API can be found at XML-API Development

Example API:

Access Control List example

This above example shows the information that will be required to allow your internal LAN (assuming 192.168.1.0/24) access to the API.

Enabling use of the API

The API is disabled out of the box in versions earlier Ampache 3.5.4. You will need to make a few modifications to the default Ampache configuration.

Creating the API/RPC ACL Entry

As of Ampache 3.5.4 the API should work out of the box without any modifications. If you are upgrading from a previous version you will need to add an API/RPC Access Control List for any IP addresses that you wish to use the API from.

In most cases people will want to open up all addresses to use the API, which can be accomplished by entering 0.0.0.0 for the Start IP and 255.255.255.255 for the end IP. When creating the ACL entry leave everything as default until you know what the settings are for. If you are familiar with the networks you will be connecting from, feel free to customize these ACL's for your setup. You should also check and make sure that

access_control=true

Is set in your config file. If you have upgraded Ampache from a version before 3.4.x access_control was disabled by default.

The 3.5.x and newer APIs use your web interface username and password. If you have recently upgraded from Ampache 3.4.x you will need to log into the web interface and reset your password before the API will work.
If you recieve an ACL error it is because your Ampache install is either missing the API/RPC Access Control List or the IP you are accessing from is outside the currently defined ACL. Verify your ACLs and, if needed enable logging to get more detailed debug information.
It's possible that an ACL error is an erroneous error message, particularly in regard to Amarok. Amarok fails because your RPC version is too old, but doesn't report it. It then attempts to get through the ACL and you get the ACL message not because the ACL itself is failing, but your client cannot connect do to the previous Version Too Old. Amarok only reports the last error it got, not the first.
 
xmlapi.txt · Last modified: 2010/02/24 16:34 by vollmerk
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki