views:

6669

answers:

4

I'm building some custom tools to work against a JIRA install, and the exposed SOAP API is great, except that none of the arguments are named.

For example, the prototype for getIssue is:

RemoteIssue getIssue (string in0, string in1);

All of the SOAP RPC methods follow this convention, so without documentation I'm pretty hardpressed to figure out what to pass on a lot of these.

Does anyone know of a definitive API documentation guide?

+8  A: 

Found the javadoc:

http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/index.html?com/atlassian/jira/rpc/soap/JiraSoapService.html

FlySwat
I must be a bit unskilled but I'm not totally satisfied with this doc. I'm nearly in the same configuration as yours and I want to use the createIssue method.In that purpose I create an instance of a RemoteIssue object and I set the following parameters : type, summary, project, assignee, description and priority which are all string.but what value do I have to set for type? RemoteIssueType.name ? RemoteIssueType.id ? and what about summary, project etc?Where can I find precise documentation about this? Thanks for your help
PierrOz
I do a lot of work with this API - personally it's documentation is next to useless once you start getting into details of how it works, rather then what methods are exposed.Best way is to grab the source for Jira (if you don't have access to the source because you're developing against a trial version then I suggest buying the $10 US starter edition, so you can then get access to all the source).With the source it's pretty easy to see what each argument is used for, and what each call expects.
Bittercoder
+3  A: 

The javadoc link you found is the correct one. You should also know that not everything is exposed via the SOAP or RPC interfaces, but you can do just about anything using the REST interface. Unfortunately, the REST interface isn't well documented, but you can use an HTML traffic inspector tool (like Fiddler for IE) to grab the actual POST data sent to the server from the web interface and piece together the interface for the particular call you need. Not always the easiest way but it does work.

Scott Dorman
+2  A: 

I've found that it's pretty simple to intuit what the parameters are supposed to be. Depending on how complicated you're going, you might be able to guess what you're supposed to pass.

There's one super important one though (this is Python with SOAPpy):

self.proxy = WSDL.Proxy( jiraUrl )
self.token = self.proxy.login(self.username, self.password)
...
issues = self.proxy.getIssuesFromFilter(self.token, args[0])

After getting the token from the login() method, you need to pass it in as a parameter to all of the other SOAP calls. After figuring that out, it's been pretty straightforward to figure out what the parameters should be (for example, getIssuesFromFilter should take the filterId as its other parameter)

Tony Arkles
+2  A: 

See http://confluence.atlassian.com/display/JIRA/JIRA+RPC+Services for all JIRA RPC services

Synesso