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>