Standard advice - don't, you're using an unsupported and insecure version of JIRA for which there are no patches and you should upgrade and use the REST interface.
However, if you insist, there were some docs for this, but they've been deprecated and I can't find them any more. However, https://answers.atlassian.com/questions/43386 should get you started.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot