Davide; The API is awesome. We use it to do automated uploading of files to data libraries as part of our post-processing pipeline. In addition to the docs Hans pointed out, here's a Python class that abstracts out some of the url handling:
http://github.com/chapmanb/bcbb/blob/master/nextgen/bcbio/galaxy/api.py
and a script using it to do uploads:
http://github.com/chapmanb/bcbb/blob/master/nextgen/scripts/upload_to_galaxy...
Hope this helps, Brad