Documentation for JIRA 4.0. Documentation for other versions of JIRA is available too.
More code examples can be found in the SVN repository. You may also try looking for them in the forum.
#!/usr/bin/perl use SOAP::Lite; use Data::Dumper; my $soap = SOAP::Lite->proxy("http://localhost:8090/rpc/soap/jirasoapservice-v2?wsdl"); my $auth = $soap->login("admin", "admin");
$issueMap = {"project" => SOAP::Data->type(string => "YQ"), "components" => [{"id" => SOAP::Data->type(string => "10010")}], # this is definitely not working as "10010" will be 'autotyped' to int: # "components" => [{"id" => "10010"}], "type" => SOAP::Data->type(string => "1"), "summary" => SOAP::Data->type(string => "Issue created via Perl/SOAP") }; my $issue = $soap->createIssue($auth->result(), $issueMap);
#!/usr/bin/python import SOAPpy, getpass, datetime, array, base64, random from SOAPpy import Types soap = SOAPpy.WSDL.Proxy('http://localhost:8090/rpc/soap/jirasoapservice-v2?wsdl') jirauser='admin' passwd='admin' auth = soap.login(jirauser, passwd)
group = soap.getGroup(auth, 'foo') user = soap.getUser(auth, 'admin') user = {'name': user['name']} # without this line, you might be facing some funny problems. see JRA-7920. soap.addUserToGroup(auth, group, user)
# List actions = soap.getAvailableActions(auth, 'MYC-28') print "actions:" for action in actions: print action fields = soap.getFieldsForAction(auth, 'MYC-28', action['id']) for field in fields: print field; print "-----" # Progress issue = soap.progressWorkflowAction(auth, 'MYC-28', '5', [{'id': 'resolution', 'values': ['2']}, {'id': 'assignee', 'values': ['admin']}, {'id': 'comment', 'values': ['testo!']}])