XML-RPC Client

From time to time we’ve had people wonder if the XML-RPC API is turned on for their Bugzilla installation. The answer is yes in all cases. Nevertheless it is difficult to verify as Bugzilla will not give you a meaningful response if you go to https://<mybugzilla>/xmlrpc.cgi in your browser.

Other clients want to verify some off error message they are getting from a tool that integrates with Bugzilla through the XML-RPC API.

To solve these questions we have deployed our online XML-RPC client.

xml-rpc client

By default it has the URL and credentials for our Bugzilla demo, but you can point it to any Bugzilla with XML-RPC enabled (even https://bugzilla.mozilla.org/).

The tricky bit is the parameter XML.

Bugzilla XML-RPC expects a single <struct> element. The names of the parameters listed in the API docs for each function are the <name> element for the struct <member>s. See Bugzilla::WebService::Server::XMLRPC and Bugzilla::WebService for more information.

For example

<param>
 <struct>
 <member>
 <name>Bugzilla_login</name>
 <value>demo@devzing.com</value>
 </member>
 <member>
 <name>Bugzilla_password</name>
 <value>password</value>
 </member> 
 </struct>
</param>

This is the minimum set of parameters for Bugzilla 4.4.x as almost all methods require authentication.

To retrieve a bug you need to set the method to Bug.get and parameter XML to something like the following:

<param>
 <struct>
 <member>
 <name>Bugzilla_login</name>
 <value>demo@devzing.com</value>
 </member>
 <member>
 <name>Bugzilla_password</name>
 <value>password</value>
 </member>
 <member>
 <name>ids</name>
 <value>
   <array>
     <data>
       <value><i4>12</i4></value>
     </data>
   </array>
</value>
 </member>
</struct> 
</param>

For more information on how to represent various data types see the XML-RPC specification.