Currently wheter xml/html/json is requested, when maintenance_mode is enabled, it returns the standard piwik html error page.
But the API should return the exception in the right format (eg. XML)
(In [5202]) Fixes #2675
Also updated FAQ http://piwik.org/faq/how-to/#faq_111