Single Export API
Overview
Xporter provides a REST API to enable you to do a single export outside of the Jira context.
Base URL
The base URL to call the Single Export endpoint is: /plugins/servlet/jiraxporter
Required Parameters
Parameter | Explanation |
---|---|
issueKey | This is the key of the issue that is being exported. |
outputType | This is the output type of the document being exported. Word templates can be exported to the following output types: docx, docm, dotx, dotm, odt, rtf, png, svg and pdf. Excel templates can be exported to the following output types: xlsx, xlsm and pdf. |
template | This is the name of the template being exported. |
An example of usage is:
http://<JIRA-URL>/plugins/servlet/jiraxporter?issueKey=TEST1-3&outputType=docx&template=Basic%20Release%20Notes
Optional Parameters
Parameter | Explanation | Example |
---|---|---|
filename | This is used if you want to customize the name of your output document. You can also use the default Xporter mappings.* | http://<JIRA-URL>/plugins/servlet/jiraxporter?issueKey=TEST1-3&outputType=docx&template=Basic%20Release%20Notes&filename=Test-filename |
context |
| http://<JIRA-URL>/plugins/servlet/jiraxporter?issueKey=TEST1-3&outputType=docx&template=Basic%20Release%20Notes&context=project&filename=Test-filename |
* The way this can be achieved is similar to naming the output document in the Xporter for Jira Workflow Post-Functions. The syntax is as follows: ${<Field>}. Example: ...&filename=Test-${Key} (where ${Key} will be replace by the Issue Key).
Please be aware, we can have the template with the same name on different projects or on the administration section.
If you want to use a template defined by a specific project where the current issues belongs, you should use the parameter context=project in order to ensure the correct template is used.
Furthermore, keep in mind, if you want to use a project template ensure the issues you are exporting belong only to the project where the template belongs. Otherwise, you will only have the possibility to use the administration or profile user templates.
By default, it will assume the context administration.
JQL Export API
Overview
Xporter for Jira provides a REST API to enable you to export outside of the Jira context with a JQL clause.
Base URL
The base URL to call the Single export endpoint is: /plugins/servlet/jiraxporter
Required Parameters
Parameter | Explanation |
---|---|
template | This is the name of the template being exported. |
jql | This is a JQL clause. |
issueKey | This is the key of the issue that is being exported. |
outputType | This is the output type of the document being exported. Word templates can be exported to the following output types: docx, docm, dotx, dotm, odt, rtf, png, svg and pdf. Excel templates can be exported to the following output types: xlsx, xlsm and pdf. |
Optional Parameters
Parameter | Explanation |
---|---|
context |
|
An example of JQL usage is:
http://<JIRA-URL>/plugins/servlet/jiraxporter?template=Basic%20Release%20Notes&jql=project%20%3D%20XPT%20AND%20issueKey=TEST1-3&outputType=docx
Permission Schemes and Template Scopes
Xporter Permission Schemes and Template Scopes are validated.
To Use the API, your user must have permission to export the issue and the Template used must contain the Scopes Single or Bulk depending on the export type you want to make (Single export API or JQL export API respectively)
Export parameters
Overview
Xporter for Jira provides a REST API to enable you to export outside of the Jira context with parameters.
Base URL
The base URL to call the single export endpoint is: /plugins/servlet/jiraxporter
How to use
Pass the parameter name and value through the request URL.
On the template, call the mapping of your parameter like this: ${parameter_name}.
Example
URL - http://<JIRA-URL>/plugins/servlet/jiraxporter?template=Basic%20Release%20Notes&jql=project%20%3D%20XPT%20AND%20issuetype%20%3D%20Story&outputType=docx¶meter1=value1¶meter2=value2 Template - ${parameter1} ${parameter2}