Creating an XML-RPC Client

JIRA's SOAP and XML-RPC remote APIs were deprecated in JIRA 6.0.

Read the announcement for more information.


JIRA 3.0 and later

JIRA ships with the JIRA XML-RPC plugin which enables remote access through XML-RPC and SOAP. Using this feature with XML-RPC is easy with some help from the Apache XML-RPCpackage.In this tutorial, we write a basic XML-RPC client (using Apache XML-RPC) that logs in, retrieves projects and then logs out again. A Python client is also demonstrated.You may also be interested in the Creating a JIRA SOAP Client. More methods are exposed via SOAP than XML-RPC.

Getting the latest XML-RPC client

You can download the latest XML-RPC client with the Atlassian Plugin SDK – see Developing with the Atlassian Plugin SDK.

The methods exposed via XML-RPC are listed in the RPC plugin Javadoc for the XmlRpcService class. The JIRA XML-RPC Overview has more information (though not guaranteed to be up to date).

To run the Java client in this tutorial, you'll need to download the Apache XML-RPC libraries and make them available in your classpath.

Enabling the RPC plugin


This page has been archived, as it does not apply to the latest version of JIRA (Server or Cloud). The functionality described on this page may be unsupported or may not be present in JIRA at all.

JIRA's SOAP and XML-RPC remote APIs were removed in JIRA 7.0 for Server ( see announcement).
We encourage you to use JIRA's REST APIs to interact with JIRA remotely (see migration guide).

To invoke JIRA operations remotely, you should ensure that the RPC plugin is enabled on the JIRA installation you are targeting. If you simply want to create a client to then you can skip this step. First you need to check if the Accept Remote API Calls has been enabled in 'General Configuration' under 'Global Settings' in the left-hand menu:

Then you need to enable the JIRA RPC Plugin in 'Plugins' under 'System' in the left-hand menu:

(warning) To get the source code of the RPC plugin, see

Your server should now be ready to accept remote procedure calls.

Now that your server is ready to accept remote procedure calls, we begin creating a Java XML-RPC client.

Building a Python XML-RPC client

XML-RPC in Python is very easy. Here is a sample client that creates test issues on


# Sample Python client accessing JIRA via XML-RPC. Methods requiring
# more than basic user-level access are commented out.
# Refer to the XML-RPC Javadoc to see what calls are available:

import xmlrpclib

s = xmlrpclib.ServerProxy('')
print "Proxy exited"
auth = s.jira1.login('opsengineer', 'opsengineer')
print "login exited"
newissue = s.jira1.createIssue(auth, { "project": "MONOPS",
                                       "type": 26,
                                       "summary": "Issue Created via XML-RPC",
                                       "description": "Issue created with Python client remotelly",
                                       "customFieldValues" :
                                          {"customfieldId" : "customfield_10224", "values" : ["1 - Greater than 10,000 seats"]},
                                          {"customfieldId" : "customfield_10321", "values" : ["production"]},
                                          {"customfieldId" : "customfield_10320", "values" : ["capacity"]},
                                          {"customfieldId" : "customfield_10230", "values" : ["2 - Significant loss of customer productivity"]},
                                       "priority" : 1
print "Created %s/browse/%s" % (s.jira1.getServerInfo(auth)['baseUrl'], newissue['key'])

Building a Java client

The goal of this tutorial is to create a client that makes three simple remote calls to JIRA. Here we log in, retrieve the project information and then log out again. You can take a look at the full source code here (xmlrpc-2.x) or here (xmlrpc-3.x).

The first step is to configure your details.

public static final String JIRA_URI  = "";
public static final String RPC_PATH  = "/rpc/xmlrpc";
public static final String USER_NAME = "";
public static final String PASSWORD  = "yourpassword";

All XML-RPC calls are invoked at with the path /rpc/xmlrpc by default. You need to configure your username and password appropriately.

// Initialise RPC Client
XmlRpcClient rpcClient = new XmlRpcClient(JIRA_URI + RPC_PATH);

// Login and retrieve logon token
Vector loginParams = new Vector(2);
String loginToken = (String) rpcClient.execute("jira1.login", loginParams);

Method calls to JIRA via XML-RPC need to be prefixed with "jira1.". Parameters to methods are passed as sequenced Objects in a Vector. In the above code, we log into We receive back a loginToken which will need to be passed to all subsequent method calls.

// Retrieve projects
Vector loginTokenVector = new Vector(1);
List projects = (List)rpcClient.execute("jira1.getProjectsNoSchemes", loginTokenVector);

// Print projects
for (Iterator iterator = projects.iterator(); iterator.hasNext();-)
    Map project =  (Map);
    System.out.println(project.get("name") + " with lead " + project.get("lead"));

The RPC client calls the getProjectsNoSchemes() method passing the loginToken. This returns with a Vector of projects which are represented by HashTable objects. For information on what methods are available as well as what properties are available on returned projects, you'll again need to look at the JIRA XML-RPC API Spec.

// Log out
Boolean bool = (Boolean) rpcClient.execute("jira1.logout", loginTokenVector);
System.out.println("Logout successful: " + bool);

Lastly, we log out of the system, again passing the loginToken in a Vector form.

There it is! A simple client for JIRA XML-RPC. If you wish to extend or customise the JIRA XML-RPC plugin itself, you can download the latest source from the repository.

Building a Perl client

Here's an XML-RPC client that uses the XMLRPC::Lite module (distributed with ActivePerl and available for free on CPAN).


# toy jira perl client using XMLRPC
# logs in, creates an issue
# handles failure or prints issue fields
# logs out.

use strict;
use warnings;

use XMLRPC::Lite;
use Data::Dumper;

my $jira = XMLRPC::Lite->proxy('http://localhost:8080/jira/rpc/xmlrpc');
my $auth = $jira->call("jira1.login", "admin", "admin")->result();
my $call = $jira->call("jira1.createIssue", $auth, {
    'project' => 'CEL',
    'type' => 2,
    'summary' => 'Issue created via XMLRPC',
    'assignee' => 'admin',
    'fixVersions' => [{'id' => '10000'},{'id' => '10001'}],
    'customFieldValues' => [{'customfieldId' => 'customfield_10000', 'values' => ['Blah', 'Bling']}],
    'description' => 'Created with a Perl client'});
my $fault = $call->fault();
if (defined $fault) {
    die $call->faultstring();
} else {
    print "issue created:n";
    print Dumper($call->result());
$jira->call("jira1.logout", $auth);

XMLRPC::Lite is poorly documented. Using it for this simple example required reading the code. We do not recommend it for newbie Perl hackers.


Creating a JIRA SOAP Client

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport