Documentation for JIRA 4.0. Documentation for other versions of JIRA is available too.
The JIRA API docs are available online. They are most useful for:
The latest API docs are available at http://docs.atlassian.com/software/jira/docs/api/latest/. The 4.0 docs are available at http://docs.atlassian.com/software/jira/docs/api/4.0/. For previous versions, substitute the appropriate version in the URL.