Generating Reports

1. List all available report definitions

Compatibility: from Durst Workflow v1.7.8

Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print /  Durst Workflow Print +

List all available report definitions of the Durst Workflow. All reports configured in the Durst Workflow can be used with Rest-API to generate and download Reports of Articles and Print Items.

GET /api/v1/reportDefinitions

1.1. Responses

HTTP Code Description Schema
200 OK ReportDefinitionApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

1.2. Consumes

application/json

1.3. Produces

*/*

1.4. Tags

Report Definition Controller Api

1.5. Example HTTP request

/api/v1/reportDefinitions

1.6. Example HTTP response

Response 200

[
  {
    "id": 1,
    "name": "Print Item Summary Portrait"
  },
  {
    "id": 2,
    "name": "Print Item Summary Landscape"
  },
  {
    "id": 3,
    "name": "Ink Consumption Portrait"
  },
  {
    "id": 4,
    "name": "Ink Consumption Landscape"
  }
]
2. Get a report definition

Compatibility: from Durst Workflow v1.7.8

Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print /  Durst Workflow Print +

List a specific report definition by its ID.

GET /api/v1/reportDefinitions/{id}

2.1. Responses

HTTP Code Description Schema
200 OK ReportDefinitionApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

2.2. Consumes

application/json

2.3. Produces

*/*

2.4. Tags

Report Definition Controller Api

2.5. Example HTTP request

/api/v1/reportDefinitions/{id}

2.6. Example HTTP response

Response 200

{
  "id": 2,
  "name": "Print Item Summary Landscape"
}
3. Generate a Report

Compatibility: from Durst Workflow v1.7.8

Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print /  Durst Workflow Print +

Generate a Report of given definition with given parameters for a single Article or Print Item (Print Order). The additional parameters allow to define currency symbol and unit to be used, and if the original PDF should be attached to the generated Report, otherwise the default system settings will be used. The ID of the Article or Motif is required for generating a report.

POST /api/v1/reportDefinitions/{id}/generate

3.1. Parameters

Type Name Description Schema
Path ID required ID of the Report Definition to be used integer (int32)
Body ReportRequestApi required
Parameters to generate Report  ReportRequestApi

3.2. Responses

HTTP Code Description Schema
200 OK WorkflowApi
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

3.3. Consumes

application/json

3.4. Produces

*/*

3.5. Tags

Report Definition Controller Api

3.6. Example HTTP request

Request path

/api/v1/reportDefinitions/{id}/generate

Request Body

{
  "attachOriginalPdf": true,
  "currency": "€",
  "motifReference": {
    "id": 1866
  },
  "unit": "mm"
}

3.7. Example HTTP response

The response contains the id for a Workflow. This is the internal naming convention of the running process. As the Report Generation may take some time depending on the complexity of the Print Item, you can check the status of this running process with GET /api/v1/workflows/{id}. When the process is finished you can fetch the data as described in the next chapter.

Response 201

{
  "id": 3128,
  "name": "generate-report",
  "status": "RUNNING",
  "progress": 0,
  "currentStep": "renderImage",
  "startTimestamp": "2020-06-10T09:42:11.242993+02:00"
}
4. Download a Report

Compatibility: from Durst Workflow v1.7.8

Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print /  Durst Workflow Print +

After generating the Report it's possible to download the newest report of given definition with given parameters.

POST /api/v1/reportDefinitions/{id}/download

4.1. Parameters

Type Name Description Schema
Path ID required ID of the Report Definition to be used integer (int32)
Body ReportRequestApi required
Parameters to generate Report  ReportRequestApi

4.2. Responses

HTTP Code Description Schema
200 OK No Content
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

4.3. Consumes

application/json

4.4. Produces

*/*

4.5. Tags

Report Definition Controller Api

4.6. Example HTTP request

It is only possible to download the latest generated report of the given report definitions. This means only the current report e.g. the Approval Report or Ink Consumption Report can be downloaded.

Request path

/api/v1/reportDefinitions/{id}/download

Request Body

{
  "motifReference": {
    "id": 1866
  }
}	

4.7. Example HTTP response

Response 200

This response could not be previewed. Download the response to open it with an appropriate application.
5. Download a Preflight PDF Report of an Article

Compatibility: from Durst Workflow v1.8

Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print /  Durst Workflow Print +

Download a detailed Preflight PDF Report of an Article

GET /api/v1/articles/{id}/files/preflightPdfReport/direct

5.1. Parameters

Type Name Description Schema
Path id required
The id of the Article integer (int32)
Path downloadFormat required Download Format of the File enum (direct, base64)
Path
fileTypeKey required File Type preflightPdfReport

5.2. Responses

HTTP Code Description Schema
200 OK Download of the File
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

5.3. Consumes

application/json

5.4. Produces

*/*

5.5. Tags

Article Controller Api

5.6. Example HTTP request

/api/v1/articles/2112/files/preflightPdfReport/direct