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.
It looks like you're new here. Sign in or register to get started.