Issues

Export

Download API definition:

GET https://sampleHostName/issues/storageExport?ids[&includeHeader][&fileType][&folderId]

Requests that anywhere from 1 to 5 issues be exported to a file and saved in cloud-based project storage (accessible through the Storage API). Currently 'pdf' is the only supported file type. The IDs of the issues must be specified in a query string parameter named "ids", separated by commas if there is more than one. A sample request URL that exports 3 issues to a PDF is as follows--

https://api.bentley.com/issues/exportPdfToStorage?ids=abab23524535,89458jjlij,32636wtewtwt&folderId=090909877987&includeHeader=true

Note that unlike most GET requests, this is not an idempotent operation; each time it is called, a new file will be generated. The response will not contain the file itself, but links to download it from Storage.

All issues specified in the request must come from the same project, or the request will fail. The client may also specify the ID of a destination folder where the file should be saved; otherwise, it will be saved in the project's root folder. They can also specify whether to include a textual header with issue metadata at the top of each page (default) or exclude it.

Authentication

Requires Authorization header with valid Bearer token for scope issues:read.

For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.


Request parameters

Name
In
Required?
Description
ids
query
Yes

Instance IDs of issues to export. Must include at least 1, but no more than 5, IDs, separated by commas, and they all must come from the same project.

includeHeader
query
No

If exporting to PDF, indicates whether to include metadata on top of each page. Default is true.

fileType
query
No

Indicates the type of file to create. Right now PDF is the only valid option, and is the default if not specified.

folderId
query
No

The ID, as retrieved from the Storage API, of the folder where the produced file should be saved. If not set, will default to the project's root folder.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with scope issues:read

Accept
No

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Response 200 OK

Indicates that the file was generated successfully. The response includes the generated file's filename as well as links for using the Storage API to retrieve it.

json

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json

Response 404 Not Found

Either one of the issues specified does not exist (code = 'IssueNotFound') or the destination folder does not exist (code = 'FolderNotFound').

json

Response 422 Unprocessable Entity

This response indicates that there is a problem with the request parameters. Depending on the problem, the 'details' array may include specific errors.

json

Response 429 Too many requests

This response indicates that the user has sent too many requests in a given amount of time.

json

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.