In this page

Note that there are three techniques to implement automatic processes with Better PDF Exporter for Jira. To be sure that the REST API is the best for you, read the Automation article before this one.

The REST API

Better PDF Exporter for Jira provides a REST API for developers for PDF document generation purposes. Although the primary aim of the API is to provide back-end for the app's own user-interface, you are also welcome to use it for your own needs.

The Better PDF Exporter for Jira's REST API is a natural extension to Jira's core REST API. It uses the same semantics: you can authenticate to Jira and call REST methods the same exact way with both of those. Learn more about using the Jira REST API in the Jira Developer Documentation.

Please note that the set of the API methods is fairly limited at the moment, but we are open to requests to extend it.

REST API reference

/pdf/pdf-view/{pdf-view-id}/render

Description
Renders a PDF document from the result of a JQL query or a filter. If the selected PDF view is not visible in the specified context, the rendering will fail.
Request Parameters
context: Jira context where the rendering is initiated from. Possible values: SINGLE_ISSUE_VIEW, ISSUE_NAVIGATOR, DASHBOARD, JIRA_AGILE_BOARD, JIRA_AGILE_BACKLOG, JIRA_SERVICE_DESK, STRUCTURE, TEMPO.
jql: JQL query to select the issues to render. Ignored if filterId is set.
filterId: ID of the saved filter to select the issues to render.
tempMax: maximum number of issues allowed (more details).
Since
4.0.0
URL
http://jira.mycompany.com/rest/com.midori.jira.plugin.pdfview/1.0/pdf/pdf-view/7/render?context=SINGLE_ISSUE_VIEW&jql=key+%3D+DEMO-4&tempMax=1000
Method
GET
Returns
The rendered PDF document (HTTP response type: application/pdf).

/pdf/pdf-view/{pdf-view-id}/dashboard/{dashboard-id}/render

Description
Renders a PDF document from a Jira dashboard.
Since
4.0.0
URL
http://jira.mycompany.com/rest/com.midori.jira.plugin.pdfview/1.0/pdf/pdf-view/10/dashboard/10100/render
Method
GET
Returns
The rendered PDF document (HTTP response type: application/pdf).

Description
Returns the "Export" menu items with respect to the specified context, alongside with their general weight to use in bigger menus.
Request Parameters
context: Jira context where the rendering is initiated from. See possible values in the table above.
jql: (optional) JQL query that select the issues visible in the context. It is used to check the visibility of the menu items.
dashboardId: mandatory in DASHBOARD contexts.
Since
4.0.0
URL
http://jira.mycompany.com/rest/com.midori.jira.plugin.pdfview/1.0/menu?context=SINGLE_ISSUE_VIEW&jql=key+%3D+DEMO-2
Method
GET
Returns
Sample JSON response:
{
	"weight": 100,
	"items": [
		{
			"label": "PDF",
			"url": "/rest/com.midori.jira.plugin.pdfview/1.0/pdf/pdf-view/7/render?tempMax=1000"
		},
		{
			"label": "PDF (All fields)",
			"url": "/rest/com.midori.jira.plugin.pdfview/1.0/pdf/pdf-view/5/render?tempMax=1000"
		}
	]
}

Questions?

Ask us any time.