You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Swagger V3 Export to Word

This page describes the process of exporting items to Word via Swagger.



Introduction

Since Codebeamer release 2.1 (IMPALA), a new Export endpoint is available in Swagger to export tracker items to Word:

POST/v3/export/exportToWord


Using this endpoint, any tracker items can be exported to Word regardless of what is configured in the Export to Word workflow action.

Usage

To export the items of a tracker to Word,

  1. Use the POST/v3/export/exportToWord endpoint in Swagger.
  2. Add the relevant details to the Request body.
    Example:
    {
      "currentItemAndItsChildren": true,
      "currentItemId": 1234,
      "exportTargetTrackerFolderId": 5679,
      "exportTargetTrackerId": 5678,
      "newVersion": true,
      "reportId": null,
      "wordFilename": "TestFileName",
      "wordTemplateName": "template-items-base.docx"
    }
    
  3. Click Execute. The jobId of the export is returned in the response.


    Clicking Execute triggers the file export by starting a background job which is indicated by a green pop-up notification displayed on the User Interface.
    Once the background job is finished, clicking the name of the exported .docx file on the green pop-up notification, displayed on the bottom right of the screen, opens the target documentation type tracker or the target folder defined in the Request body.
    To download the exported file, click the file name in the Document field.

  4. Use the Background job GET/v3/job/{jobId} endpoint to retrieve and monitor the status of the export based on the jobId.

Parameters of the Request Body

The following details need to be provided in the Request body. The same parameters must be provided in the Request body as if the export was executed on the user interface.

Parameter Description
"currentItemAndItsChildren"
If set to true, children items are exported along with the selected current item.
If set to false, only the current item is exported.
"currentItemId"
The ID of the item to be exported.
"exportTargetTrackerFolderId"
The ID of the folder within the document type tracker in which the exported file is to be stored.
To store the exported file in the root directory of the selected document type tracker, set the value to null.
"exportTargetTrackerId"
The ID of the target document type tracker in which the exported file is to be stored. To get the tracker ID, open the tracker and click the context menu > Configuration.
"newVersion"
If set to true, each time the export is executed a new version of the file is created with a timestamp appended to the file name.
If set to false, the existing file is overwritten every time the export is executed.
"reportId"
In case the source of the document to be exported is a report, the report ID needs to be provided. This is an alternative of the "currentItemId" parameter.
"wordFilename"
The name of the Word file to be exported with the .docx extension.
"wordTemplateName"
The name of the Word template to be used for the export.

To find out the exact Word template file names,
  1. On the UI, go to the Export to Word workflow action configuration overlay.
  2. In the Word template field, click the selector and hover the mouse pointer over the relevant template to have the template file name displayed in a tooltip.

By default, the "currentItemId", "exportTargetTrackerFolderId", "exportTargetTrackerId" and "reportId" values are set to 0. In case any of these parameters is not relevant, change the related value from 0 to null, otherwise, the API call will not be executed.



Since Codebeamer release 2.1 (IMPALA), the Export to Word workflow action is available as well. For further information, see page Export to Word Workflow Action.