Workflow Analytics API simplifies workflow data integration by providing data that can be read and used directly by analytics tools such as Microsoft Power BI, as well as DocuWare integration solutions. These allow users to extract, analyze, and visualize key insights from their business processes.
Key features of Workflow Analytics API
Support analytics for process optimization, identification of bottlenecks, and management of workload and resources.
Provide data in JSON format for developers, enabling seamless integration and easier data manipulation.
Provide data in CSV format for out-of-the-box compatibility with common analytics tools.
Reduce the need for middleware, while benefiting from the compliance and security standards of the DocuWare Cloud.
Ensure data persistence per workflow for 90 days.
Automatically update data every 24 hours.
Efficiently handle large datasets for optimal performance.
Authentication & authorization
Authentication
To use the Workflow Analytics API, you must log in to DocuWare (Platform) and access the API with an OAuth2 Bearer Token.
More information on how to authenticate to DocuWare
Authorization
To access data from the Workflow Analytics API, the authenticated user must have either the "Designer" or "Controller" role for the specified workflow from which the data is being requested.
Enabling the collection of Workflow Analytics Data
To use Workflow Analytics, data collection must first be enabled for each specific workflow. You need to specify which workflows you want to activate data collection for and determine the type of data (data projections) that should be gathered for each workflow.
API Documentation
Analytics Configuration: A collection of endpoints to verify, activate, and deactivate data projections for specific workflows.
Workflow Analytics: A collection of endpoints to retrieve data from the data projections of specific workflows.
The API documentation can be accessed at the URL: …/DocuWare/Workflow/Analytics/index.html
Data Projections
To facilitate collecting relevant data, so called data projections are provided. Each data projection type is accessible via a dedicated endpoint.
Data projections are defined datasets intended to provide data for a specific purpose
Data Projection Types
Currently following data projection types are available:
Data Projection Type | Description |
---|---|
| Returns the duration for each processed task, from when it was assigned until it was confirmed up by a user. |
| Returns the decision chosen for each processed task, including the date/time when the decision was taken. |
| Returns the user who chose the decision for each processed task, including the date/time when the decision was taken. |
| Returns the data submitted (if available) with the decision chosen for each processed task. |
| Returns the duration for each task, from when it was assigned until it was picked up by a user (marked as read). |
| Returns the error exits (if available) that the workflow has taken. |
| Returns the duration of the workflow instance, including the start and end date/times, as well as the status: |
| Returns the data that has been stored in global variables (if available) throughout the workflow, including the date/time of storing. |
Data Persistence
Once a data projection is enabled, data collection begins immediately. The status of each data projection will indicate one of the following:
InProgress: Data collection is currently in progress.
Ready: Data has been collected and is available for use.
Data will be available within 24 hours after a projection is activated. Each data projection provides access to data from all active workflow instances, along with data from instances completed within the past 90 days. Workflow instances completed over 90 days ago will not be available.
Data Formats
Each data projection supports two types of data formats that can be requested by providing the query parameter format= (default value: JSON)
By offering both JSON and CSV formats, we ensure that our data projections meet the diverse needs of developers and end-users alike.
JSON
Purpose: JSON is designed to accommodate the needs of integrators and developers.
Usage: It produces a standard data set that developers can easily transform and integrate into their applications and solutions.
CSV
Purpose: CSV is meant to accommodate users who want to directly use the data set in Analytics/BI or spreadsheet applications.
Usage: Similar to a CSV export of a result list, it produces a data set that is commonly compatible with such applications. Additionally, it offers further customization options, such as encoding and timezone adjustments.
Additional Query Parameters for CSV format
csvIsUtc=
Purpose: To get dates either in UTC and default format or in the timezone and date format specified in the organization settings.
Default Value: false
. If set to true
, dates will be provided in UTC and default format
encodingName=
Purpose: To specify the encoding of the data.
Default Value: UTF8
Supported Encodings: UTF8, ANSI, ASCII, Big5, ShiftJIS, Unicode, UTF8WithoutBOM.
How to use the API
Enable data projections for specific workflows
Requirements:
OAuth2 Bearer Token
JSON Payload: (Required)
FileCabinetId: (string, required) The GUID of the file cabinet.
WorkflowNamesList: (array of strings, required) List of workflow names to enable
You can get the Workflow Names (Name) from:
.../DocuWare/Platform/Workflow/DesignerWorkflows
ProjectionTypesList: (array of strings, required)
API Endpoint:
POST /DocuWare/Workflow/Analytics/Configuration/EnableProjections
Example Request:
{
"FileCabinetId": "3938dcdd-d2c9-467a-b01a-5daf96c0ea0c",
"WorkflowNamesList": [
"Accounts Payable"
],
"ProjectionTypesList": [
"WorkflowRuntime","GeneralTaskExecutionTimes"
]
}
Possible Response:
200 OK: The data projections were successfully enabled.
{
"HasChanges": true,
"OperationSummaries": [
{
"WorkflowName": "Accounts Payable",
"WorkflowId": "bf8d21f9-4b0d-481e-95a2-e7f014adf3b7",
"ProjectionType": "WorkflowRuntime",
"Message": "Success"
}
]
}
400 Bad Request: Invalid input data.
401 Unauthorized: Missing or invalid authentication.
404 Not Found: The specified workflow or file cabinet does not exist.
Check enabled data projections
Requirements:
OAuth2 Bearer Token
API Endpoint:
GET /DocuWare/Workflow/Analytics/Configuration
Possible Response:
200 OK
[
{
"WorkflowId": "bf8d21f9-4b0d-481e-95a2-e7f014adf3b7",
"WorkflowName": "Accounts Payable",
"ProjectionType": "WorkflowRuntime",
"LastEventTimestamp": "/Date(1726493274127+0000)/",
"ProjectionProcessingState": "Ready"
}
]
400 Bad Request: Invalid input data.
401 Unauthorized: Missing or invalid authentication.
404 Not Found: The specified workflow or file cabinet does not exist.
500 Internal Server Error
Get data of a data projection
Requirements:
OAuth2 Bearer Token
WorkflowId: (string uuid, required) ID of the workflow
Get the Workflow ID (Id) from:
.../DocuWare/Platform/Workflow/DesignerWorkflows
format (string, optional)
csvIsUtc (boolean, optional)
encodingName (string, optional)
API Endpoint:
for example: GET /DocuWare/Workflow/Analytics/{workflowId}/WorkflowRuntime
Possible Response:
200 OK
[
{
"workflowVersion": 1,
"docId": 18,
"runtime": "00:00:34.6158214",
"state": "Completed",
"startTime": "/Date(1726493198284)/",
"timeOfCompletion": "/Date(1726493232900)/"
}
]
401 Unauthorized: Missing or invalid authentication.
500 Internal Server Error
Additional Workflow-Related API Endpoints
The following endpoints are part of the DocuWare Platform API, not the Workflow Analytics API. While the Workflow Analytics API focuses on historical data, these endpoints provide real-time data. They offer essential workflow-related information that supports and complements the insights from the Workflow Analytics API.
GET /DocuWare/Platform/Workflow/DesignerWorkflows
Returns a list of all published workflows where the current user has designer permissions.
GET /DocuWare/Platform/Workflow/Workflows
Provides a list of all workflows where the current user has open tasks assigned.
GET /DocuWare/Platform/Workflow/Workflows/{workflowId}/Tasks
Retrieves all tasks currently assigned in the specified workflow, identified by
workflowId
from the perspective of the current user.
GET DocuWare/Platform/Workflow/ControllerWorkflows/{workflowId}/Tasks
Returns a list of all workflows where the current user has tasks assigned, from the perspective of a workflow controller.
GET DocuWare/Platform/Workflow/ControllerWorkflows/{workflowId}/Tasks
Retrieves all tasks currently assigned to users in the specified workflow, identified by
workflowId
from the perspective of a workflow controller, including the Instance ID, Received Date, and Task Name.