As a rule, single value responses are "text/plain" and complex value responses support both "application/xml" and "application/json". Supply appropriate "Accept" header in the request to get necessary response type.
If you need to extend the plugin with your functionality, you can base your plugin on the current REST API plugin code, but ensure that your plugin does not interfere with the bundled REST plugin. To achieve this, change
teamcity-plugin.xml file to have different plugin name and different value for "api.path" parameter. Once this is done, your patched plugin and original REST api plugin can work in the single TeamCity installation.
[Builds|http://buildserver.labs.intellij.net/viewType.html?buildTypeId=bt638] at buildserver.