com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

BPMN REST API

This guide addresses the core functionalities of the BPMN REST API. There are some additional functionalities provided via the Activiti REST API. For information on them, go to the Activiti User Guide.

If you want to create your own external web application using the BPMN REST API, see Sample BPMN Explorer Jaggery Application.

  Accessing the Business Process Profile REST services

Do the following to access the WSO2 Business Process Server REST services.

  1. Download WSO2 Enterprise Integrator and start the Business Process Profile.
  2. To access the BPMN REST service, you can use the following URL pattern: https://localhost:9445/bpmn/{serviceName}.

    The REST API is secured using http basic authentication mechanism. For example, the following service name lists all deployments: repository/deployments. So, the complete service URL to retrieve all deployments would be: https://localhost:9445/bpmn/repository/deployments

    If the user resides in a secondary userstore, in the HTTP basic authentication header the username should be in the following format: <DOMAIN>/<USER>. E.g., foo/user1

Following are the response codes you will receive as the output.

Response CodeDescription
200- OkIndicates that the response was found and returned.
401- Unauthorized

The operation failed.

The operation requires an Authentication header to be set. If this was present in the request, the supplied credentials are not valid or the user is not authorized to perform this operation.

404- Not FoundIndicates that the requested details were not found.
405 - Method Not AllowedThe operation failed. The used method is not allowed for this resource.
415 - Unsupported Media Type

The operation failed.

The request body contains an unsupported media type. This also occurs when the request-body JSON contains an unknown attribute or value that does not have the right format/type to be accepted.

500 - Internal Server ErrorThe operation failed. An unexpected exception occurred while executing the operation. The response-body contains details about the error.

The following sections expand on the various BPMN REST services.

Deployments

This REST service represents deployments already present in the process repository. A deployment is a container for resources such as process definitions, images, forms, etc. When a deployment is 'deployed' through the RuntimeService, the Activiti engine will recognize certain of such resource types and act upon them (e.g., process definitions will be parsed to an executable Java artifact). A deployment by itself is a read-only object and its content cannot be changed after deployment.

List all Deployments

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/repository/deployments
Sample URLhttps://localhost:9445/bpmn/repository/deployments
DetailsThis request retrieves all the deployments from the server.
Success Response Body
{
  "data": [
    {
      "id": "27501",
      "name": "sampleJavaServiceTask.bpmn20.xml",
      "deploymentTime": "2015-03-08T18:46:14.898+05:30",
      "category": null,
      "url": "https:\/\/localhost:9445\/bpmn\/repository\/deployments\/27501",
      "tenantId": ""
    }
  ],
  "total": 1,
  "start": 0,
  "sort": "id",
  "order": "asc",
  "size": 1
}

Get a Deployment

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/repository/deployments/{deploymentId}
Sample URLhttps://localhost:9445/bpmn/repository/deployments/27501
DetailsThis request retrieves a specific deployment from the server.
Success Response Body
{
  "id": "27501",
  "name": "sampleJavaServiceTask.bpmn20.xml",
  "deploymentTime": "2015-03-08T18:46:14.898+05:30",
  "category": null,
  "url": "https:\/\/localhost:9445\/bpmn\/repository\/deployments\/27501",
  "tenantId": ""
}

Process definitions

Process definitions are an object structure representing an executable process composed of activities and transitions. Business processes are often created with graphical editors that store the process definition in a certain file format. These files can be added to a deployment artifact, such as a Business Archive (.bar) file. At the time of deployment, the engine will then parse the process definition files to an executable instance of this class, that can be used to start a ProcessInstance.
 

List all Process Definitions

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/repository/process-definitions
Sample URLhttps://localhost:9445/bpmn/repository/process-definitions
Details

This request retrieves all the process definitions from the server.

Note: You can use this request when you need to find a processDefinitionID or processDefinitionKey to be sent with a request. In the response body below, 'id' is the processDefinitionId and 'key' is the processDefinitionKey.

Success Response Body
{
  "data": [
    {
      "id": "sampleJavaServiceTask:1:27503",
      "url": "https:\/\/localhost:9445\/bpmn\/repository\/process-definitions\/sampleJavaServiceTask%3A1%3A27503",
      "key": "sampleJavaServiceTask",
      "version": 1,
      "name": null,
      "description": null,
      "deploymentId": "27501",
      "deploymentUrl": "https:\/\/localhost:9445\/bpmn\/repository\/deployments\/27501",
      "resource": "https:\/\/localhost:9445\/bpmn\/repository\/deployments\/27501\/resources\/sampleJavaServiceTask.bpmn20.xml",
      "diagramResource": null,
      "category": "https:\/\/www.bpmnwithactiviti.org",
      "graphicalNotationDefined": false,
      "suspended": false,
      "startFormDefined": false
    }
  ],
  "total": 1,
  "start": 0,
  "sort": "name",
  "order": "asc",
  "size": 1
}

Get a Process Definition

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/repository/process-definitions/{processDefinitionId}
Sample URL

https://localhost:9445/bpmn/repository/process-definitions/sampleJavaServiceTask:1:27503

Details

This request retrieves a specific process definition based on the specified process definition Id.

Success Response Body
{
      "id": "sampleJavaServiceTask:1:27503",
      "url": "https:\/\/localhost:9445\/bpmn\/repository\/process-definitions\/sampleJavaServiceTask%3A1%3A27503",
      "key": "sampleJavaServiceTask",
      "version": 1,
      "name": null,
      "description": null,
      "deploymentId": "27501",
      "deploymentUrl": "https:\/\/localhost:9445\/bpmn\/repository\/deployments\/27501",
      "resource": "https:\/\/localhost:9445\/bpmn\/repository\/deployments\/27501\/resources\/sampleJavaServiceTask.bpmn20.xml",
      "diagramResource": null,
      "category": "https:\/\/www.bpmnwithactiviti.org",
      "graphicalNotationDefined": false,
      "suspended": false,
      "startFormDefined": false
 }

Process instances

This represents one execution of a process definition.

List all Process Instances

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances
Sample URLhttps://localhost:9445/bpmn/runtime/process-instances
Details

This request retrieves all the process instances from the server.

Success Response Body
 "data": [
    {
      "id": "27504",
      "url": "https:\/\/localhost:9445\/bpmn\/runtime\/process-instances\/27504",
      "businessKey": null,
      "suspended": false,
      "ended": false,
      "processDefinitionId": "sampleJavaServiceTask:1:27503",
      "processDefinitionUrl": "https:\/\/localhost:9445\/bpmn\/repository\/process-definitions\/sampleJavaServiceTask%3A1%3A27503",
      "activityId": "waitState",
      "variables": [
        
      ],
      "tenantId": "",
      "completed": false
    }
  ],
  "total": 1,
  "start": 0,
  "sort": "id",
  "order": "asc",
  "size": 1
}

Get a Process Instance

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances/{proccessInstanceId}
Sample URLhttps://localhost:9445/bpmn/runtime/process-instances/27504
Details

This request retrieves a specific process instance based on the specified process instance Id.

Success Response Body
{
  "id": "27504",
  "url": "https:\/\/localhost:9445\/bpmn\/runtime\/process-instances\/27504",
  "businessKey": null,
  "suspended": false,
  "ended": false,
  "processDefinitionId": "sampleJavaServiceTask:1:27503",
  "processDefinitionUrl": "https:\/\/localhost:9445\/bpmn\/repository\/process-definitions\/sampleJavaServiceTask%3A1%3A27503",
  "activityId": "waitState",
  "variables": [
    
  ],
  "tenantId": "",
  "completed": false
}

Start a Process Instance

Request TypePOST
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances
Details

This request starts a process instance. A process instance can be started using the process definition id or process definition key or message. You need to specify either the processDefinitionId, or the processDefinitionKey or the message in the request body. Parameters businessKey, variables and tenantId are optional.

Note: It is not necessary to send in all the variables to start the process instance, sending a request body with only the processDefinitionId, processDefinitionKey or message should suffice. When sending a request body with the processDefinitionKey or message, providing the tenantId is mandatory.

It is not recommended to start a process instance using a message because it might not be able to uniquely identify a process instance.

Request Body

Request body (start by process definition Id):

{
   "processDefinitionId":"sampleJavaServiceTask:1:27503",
   "businessKey":"myBusinessKey",
   "variables": [
      {
        "name":"myVar",
        "value":"This is a variable"
      }
   ]
}

Request body (start by process definition key):

{
   "processDefinitionKey":"sampleJavaServiceTask",
   "businessKey":"myBusinessKey",
   "tenantId": "tenant1",
   "variables": [
      {
        "name":"myVar",
        "value":"This is a variable"
      }
   ]
}

Request body (start by message):

{
   "message":"newOrderMessage",
   "businessKey":"myBusinessKey",
   "tenantId": "tenant1",
   "variables": [
      {
        "name":"myVar",
        "value":"This is a variable"
      }
   ]
}

Activate or Suspend a Process Instance

Request TypePUT
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances/{proccessInstanceId}
Details

This request is used to activate a suspended process instance or vice versa.

Send a PUT request with the given respective request body as indicated below to activate or suspend the process instance. The response body of the request will be the same.

Request Body

Request body (activate a process instance):

{
   "action":"activate"
}

Request body (suspend a process instance):

{
   "action":"suspend"
}

Query a Process Instance

Request TypePOST
Request URLhttps://<Host Name>:<Port>/bpmn/query/process-instances
Details

This request is used to query or find a specific process instance using any of the attributes of the process instance. The request body depicts how to query for a process instance using the processDefinitionKey. You can also use the processDefinitionID to query for a specific process instance. 

You can retrieve the processDefinitionKey or processDefinitionID using the List Process Definitions service.

When querying a process instance using the processDefinitionKey, providing the tenantID is mandatory.

Request Body
{
  "processDefinitionKey":"sampleJavaServiceTask"
}

Delete a Process Instance

Request TypeDELETE
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances/{proccessInstanceId}
Sample URLhttps://localhost:9445/bpmn/runtime/process-instances/27503
Details

This request is used to delete a process instance using the process instance id to identify it. A process instance can only be deleted if all the tasks underneath that process instance are completed or removed. There is no response body provided when you delete a deployment, but the service status “204” indicates the deployment was found and deleted. A service status of “404” indicates the deployment was not found.

List of Variables of a Process Instance

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances/{processInstanceId}/variables
Sample URLhttps://localhost:9445/bpmn/runtime/process-instances/27503/variables
Details

This request will retrieve all the variables associated with the process instances.

Success Response Body
[
   {
      "name":"intProcVar",
      "type":"integer",
      "value":123,
      "scope":"local"
   },
   {
      "name":"byteArrayProcVar",
      "type":"binary",
      "value":null,
      "valueUrl":"https://localhost:9445/bpmn/runtime/process-instances/5/variables/byteArrayProcVar/data",
      "scope":"local"
   }
]

Get the value of a Variable of a Process Instance

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/process-instances/{processInstanceId}/variables/{variableName}
Sample URLhttps://localhost:9445/bpmn/runtime/process-instances/27503/variables/intProcVar
Details

This request is used to retrieve the value of a variable in the process instance. If it is a plain variable, the value is present in the response. Note that only local scoped variables are returned, as there is no global scope for process-instance variables.

Success Response Body
{
      "name":"intProcVar",
      "type":"integer",
      "value":123,
      "scope":"local"
}

Tasks

This represents a task, which could be a user task, service task or other tasks provided.

List all Tasks

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/tasks
Sample URLhttps://localhost:9445/bpmn/runtime/tasks
Details

This request will retrieve all the tasks on the server.

Success Response Body
{
  "data": [
    {
      "assignee" : "kermit",
      "createTime" : "2015-01-17T10:17:43.902+0000",
      "delegationState" : "pending",
      "description" : "Task description",
      "dueDate" : "2015-01-17T10:17:43.902+0000",
      "execution" : "https://localhost:9445/bpmn/runtime/executions/5",
      "id" : "8",
      "name" : "My task",
      "owner" : "owner",
      "parentTask" : "https://localhost:9445/bpmn/runtime/tasks/9",
      "priority" : 50,
      "processDefinition" : "https://localhost:9445/bpmn/repository/process-definitions/bpmnTaskProcess%3A1%3A4",
      "processInstance" : "https://localhost:9445/bpmn/runtime/process-instances/5",
      "suspended" : false,
      "taskDefinitionKey" : "theTask",
      "url" : "https://localhost:9445/bpmn/runtime/tasks/8",
      "tenantId" : null
    }
  ],
  "total": 1,
  "start": 0,
  "sort": "name",
  "order": "asc",
  "size": 1
}

Get a Task

Request TypeGET
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}
Sample URLhttps://localhost:9445/bpmn/runtime/tasks/8
Details

This request is used to retrieve a task uniquely using the task Id.

Success Response Body
{
  "assignee" : "kermit",
  "createTime" : "2015-01-17T10:17:43.902+0000",
  "delegationState" : "pending",
  "description" : "Task description",
  "dueDate" : "2015-01-17T10:17:43.902+0000",
  "execution" : "https://localhost:9445/bpmn/runtime/executions/5",
  "id" : "8",
  "name" : "My task",
  "owner" : "owner",
  "parentTask" : "https://localhost:9445/bpmn/runtime/tasks/9",
  "priority" : 50,
  "processDefinition" : "https://localhost:9445/bpmn/repository/process-definitions/bpmnTaskProcess%3A1%3A4",
  "processInstance" : "https://localhost:9445/bpmn/runtime/process-instances/5",
  "suspended" : false,
  "taskDefinitionKey" : "theTask",
  "url" : "https://localhost:9445/bpmn/runtime/tasks/8",
  "tenantId" : null
}

Query for a Task

Request TypePOST
Request URL https://<Host Name>:<Port>/bpmn/query/tasks
Sample URLhttps://localhost:9445/bpmn/query/tasks
Details

This request is used to query for a task, the query can be executed for any of the attributes of a task. Please check the response body for the attributes.

Sample Request Body
{
  "name" : "My task",
  "assignee": "kermit",
  "priority": 50
}
Success Response Body
{
  "data": [
    {
      "assignee" : "kermit",
      "createTime" : "2015-01-17T10:17:43.902+0000",
      "delegationState" : "pending",
      "description" : "Task description",
      "dueDate" : "2015-01-17T10:17:43.902+0000",
      "execution" : "https://localhost:9445/bpmn/runtime/executions/5",
      "id" : "8",
      "name" : "My task",
      "owner" : "owner",
      "parentTask" : "https://localhost:9445/bpmn/runtime/tasks/9",
      "priority" : 50,
      "processDefinition" : "https://localhost:9445/bpmn/repository/process-definitions/bpmnTaskProcess%3A1%3A4",
      "processInstance" : "https://localhost:9445/bpmn/runtime/process-instances/5",
      "suspended" : false,
      "taskDefinitionKey" : "theTask",
      "url" : "https://localhost:9445/bpmn/runtime/tasks/8",
      "tenantId" : null
    }
  ],
  "total": 1,
  "start": 0,
  "sort": "name",
  "order": "asc",
  "size": 1
}

Update a Task

Request TypePUT
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}
Details

This request can be used to update any of the attributes of the task. All request values are optional. For example, you can only include the assignee attribute in the request body JSON-object, only updating the assignee of the task, leaving all other fields unaffected. When an attribute is explicitly included and is set to null, the task-value will be updated to null. For example, {"dueDate" : null} will clear the due date of the task.

Not all fields have to be sent when a request is sent as the fields are optional.

Request Body
{
  "assignee" : "assignee",
  "delegationState" : "resolved",
  "description" : "New task description",
  "dueDate" : "2015-01-17T13:06:02.438+02:00",
  "name" : "New task name",
  "owner" : "owner",
  "parentTaskId" : "3",
  "priority" : 20
}

Complete a Task

Request TypePOST
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}
Details

This request can be used to complete a task.

Request Body
{
  "action" : "complete"
}

Claim a Task

Request TypePOST
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}
Details

This request can be used to claim a task. You can claim a task only if there is no assignee or it has been assigned to a candidate group and you are a part of that group.

Request Body
{
  "action" : "claim",
  "assignee" : "userWhoClaims"
}

Delegate a Task

Request TypePOST
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}
Details

This request can be used to delegate a task.

Request Body
{
  "action" : "delegate",
  "assignee" : "userToDelegateTo"
}

Resolve a Task

Request TypePOST
Request URLhttps://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}
Details

This request can be used to resolve a task.

Request Body
{
  "action" : "resolve"
}

Delete a Task

Request TypeDELETE
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}?cascadeHistory={cascadeHistory}&deleteReason={deleteReason}
Details

This request is used to delete a task. A task can be deleted only if its not a part of a workflow or if it is in the resolved or completed state. The request is compiled of the taskId, which is the ID of the task to be deleted, cascadeHistory is a boolean value that is used to indicate whether or not to delete the HistoricTask instance when deleting the task (if applicable). If not provided, this value defaults to false. Delete reason is the reason why the task is deleted. This value is ignored when cascadeHistory is true.

There is no response body provided when you delete a Task, but the service status “204” indicates the task was found and deleted. A service status of “404” indicates the deployment was not found.

Comment on a Task

Request TypePOST
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}/comments
Details

This request is used to add a comment to the task.

Parameter saveProcessInstanceId is optional. If true, this saves the process instance id of the task with the comment.

Request Body
{
  "message" : "This is a comment on the task.",
  "saveProcessInstanceId" : true
}
Success Response Body
{
  "id" : "123",
  "taskUrl" : "https://localhost:9445/bpmn/runtime/tasks/101/comments/123",
  "processInstanceUrl" : "https://localhost:9445/bpmn/history/historic-process-instances/100/comments/123",
  "message" : "This is a comment on the task.",
  "author" : "kermit",
  "time" : "2015-0-13T13:13:52.232+08:00"
  "taskId" : "101",1
  "processInstanceId" : "100"
}

Get all comments on a Task

Request TypeGET
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}/comments
Sample URL https://localhost:9445/bpmn/runtime/tasks/8/comments
Details

This request is used to retrieve all the comments in a task.

Request Body
[
  {
    "id" : "123",
    "taskUrl" : "https://localhost:9445/bpmn/runtime/tasks/101/comments/123",
    "processInstanceUrl" : "https://localhost:9445/bpmn/history/historic-process-instances/100/comments/123",
    "message" : "This is a comment on the task.",
    "author" : "kermit"
    "time" : "2015-01-13T13:13:52.232+08:00"
    "taskId" : "101",
    "processInstanceId" : "100"
  },
  {
    "id" : "456",
    "taskUrl" : "https://localhost:9445/bpmn/runtime/tasks/101/comments/456",
    "processInstanceUrl" : "https://localhost:9445/bpmn/history/historic-process-instances/100/comments/456",
    "message" : "This is another comment on the task.",
    "author" : "gonzo",
    "time" : "2015-01-13T13:13:52.232+08:00"
    "taskId" : "101",
    "processInstanceId" : "100"
  }
]

Get a comment on a task

Request TypeGET
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}/comments/{commentId}
Sample URL https://localhost:9445/bpmn/runtime/tasks/8/comments/123
Details

This request is used to get a specific comment on a specific task.

Success Response Body
{
  "id" : "123",
  "taskUrl" : "https://localhost:9445/bpmn/runtime/tasks/101/comments/123",
  "processInstanceUrl" : "https://localhost:9445/bpmn/history/historic-process-instances/100/comments/123",
  "message" : "This is a comment on the task.",
  "author" : "kermit",
  "time" : "2015-01-13T13:13:52.232+08:00"
  "taskId" : "101"
  "processInstanceId" : "100"
}

Delete a comment on a task

Request TypeDELETE
Request URL https://<Host Name>:<Port>/bpmn/runtime/tasks/{taskId}/comments/{commentId}
Sample URL https://localhost:9445/bpmn/tasks/8/comments/123
Details

This request is used to delete a specific comment on a task. There is no response body provided when you delete a comment on a task, but the service status “204” indicates the comment was found and deleted. A service status of “404” indicates the deployment was not found.

Statistics

This section provides details on the BPMN statistics REST API and the methods used to generate statistics in the BPMN-explorer. The following section provides detailed information on each method that can be used to retrieve statistics.

All methods of the REST API will be invoked after the base URL.

Base URL

Base URL: https://<hostname>:<port-name>/bpmn/stats/

Retrieve statistics about processes and tasks

Method get:/process-instances/count
DescriptionRetrieves the process count of deployed processes.
ParametersHeader Parameter - Media types acceptable for the response. the default is JSON.
Return TypeDeployed processes with their process count.
Example Data
{
 "data": [
 {
 "processDefinitionId": "helloWorldProcess:1:11",
 "deployedProcessCount": 1
 },
 {
 "processDefinitionId": "manualTaskProcess:1:15",
 "deployedProcessCount": 4
 }
 ]
}
Method get:/process-instances/state/all/count/
DescriptionRetrieves the number of process instances with various states.
ParametersHeader Parameter - Media types acceptable for the response. the default is JSON.
Return TypeCount of process instances in each state.
States: Completed, Active, Suspended, Failed
Example Data
{
 "data": [
 {
 "count": 2,
 "statusOfProcessOrTask": "Completed"
 },
 {
 "count": 4,
 "statusOfProcessOrTask": "Active"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Suspended"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Failed"
 }
 ]
}
Method get:/task-instances/status/all/count
DescriptionRetrieves the number of task instances with various states.
ParametersHeader Parameter - Media types acceptable for the response. the default is JSON.
Return Type

Count of task instances in each state.

States: Completed, Active, Suspended, Failed

Example Data
{
 "data": [
 {
 "count": 4,
 "statusOfProcessOrTask": "Completed"
 },
 {
 "count": 4,
 "statusOfProcessOrTask": "Active"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Suspended"
 },
 {
 "count": 0,
 "statusOfProcessOrTask": "Failed"
 }
 ]
}
Method get:/process-instances/duration/average
DescriptionRetrieves the average time duration of completed processes.
ParametersHeader Parameter - Media types acceptable for the response. The default is JSON.
Return Type

Completed processes and the average time duration for each process.

Example Data
{
 "data": [
 {
 "processDefinitionId": "helloWorldProcess:1:11",
 "averageTimeForCompletion": 0.26085
 },
 {
 "processDefinitionId": "manualTaskProcess:1:15",
 "averageTimeForCompletion": 24.555516666666666
 }
 ]
}
Method get:/task-instances/duration/avarage/{pid}
DescriptionRetrieves the average time duration of each task in a completed process.
Parameters

pId: process Definition Id of the process (required).

Header Parameter - Media types acceptable for the response. The default is JSON.

Return Type

Completed tasks with their average time duration for each completed process.

Example Data
Request – > /task-instances/duration/avarage/manualTaskProcess:1:15
{
 "data": [
 {
 "taskDefinitionKey": "orderConfirmed",
 "averageTimeForCompletion": 722751
 },
 {
 "taskDefinitionKey": "placeOrder",
 "averageTimeForCompletion": 4117232
 },
 {
 "taskDefinitionKey": "statusOfDelivery",
 "averageTimeForCompletion": 7973
 }
 ]
}
Method get:/task-instances/count/variation
DescriptionRetrieves the task variation over time i.e., tasks started and completed over the months.
ParametersHeader Parameter - Media types acceptable for the response. The default is JSON.
Return Type

Number of tasks started and completed over the months.

Example Data
{
 "data": [
 {
 "startedInstances": 10,
 "completedInstances": 4,
 "month": "Jan"
 },
 {
 "startedInstances": 6,
 "completedInstances": 3,
 "month": "Feb"
 },
 {
 "startedInstances": 9,
 "completedInstances": 9,
 "month": "March"
 },
 {
 "startedInstances": 2,
 "completedInstances": 4,
 "month": "April"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "May"
 },
 {
 "startedInstances": 11,
 "completedInstances": 7,
 "month": "June"
 },
 {
 "startedInstances": 14,
 "completedInstances": 12,
 "month": "July"
 },
 {
 "startedInstances": 4,
 "completedInstances": 3,
 "month": "Aug"
 },
 {
 "startedInstances": 2,
 "completedInstances": 1,
 "month": "Sep"
 },
 {
 "startedInstances": 2,
 "completedInstances": 2,
 "month": "Oct"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "Nov"
 },
 {
 "startedInstances": 10,
 "completedInstances": 7,
 "month": "Dec"
 }
 ]
}
Methodget:/process-instances/count/variation
DescriptionRetrieves the process variation over time i.e., process instances started and completed over the months.
ParametersHeader Parameter - Media types acceptable for the response. The default is JSON.
Return Type

Number of process instances started and completed over the months.

Example Data
{
 "data": [
 {
 "startedInstances": 3,
 "completedInstances": 3,
 "month": "Jan"
 },
 {
 "startedInstances": 10,
 "completedInstances": 5,
 "month": "Feb"
 },
 {
 "startedInstances": 8,
 "completedInstances": 6,
 "month": "March"
 },
 {
 "startedInstances": 3,
 "completedInstances": 2,
 "month": "April"
 },
 {
 "startedInstances": 14,
 "completedInstances": 12,
 "month": "May"
 },
 {
 "startedInstances": 20,
 "completedInstances": 12,
 "month": "June"
 },
 {
 "startedInstances": 6,
 "completedInstances": 3,
 "month": "July"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "Aug"
 },
 {
 "startedInstances": 6,
 "completedInstances": 1,
 "month": "Sep"
 },
 {
 "startedInstances": 9,
 "completedInstances": 7,
 "month": "Oct"
 },
 {
 "startedInstances": 11,
 "completedInstances": 10,
 "month": "Nov"
 },
 {
 "startedInstances": 6,
 "completedInstances": 3,
 "month": "Dec"
 }
 ]
}
Methodget:/processes/
DescriptionGet all the deployed processes.
ParametersHeader Parameter - Media types acceptable for the response. The default is JSON.
Return Type

Deployed processes

Example Data
{
 "data": [
 "helloWorldProcess:1:11",
 "manualTaskProcess:1:15",
 "testProcess:1:4",
 "userTaskProcess:1:10"
 ]
}

Retrieve statistics about users

Methodget:/user-performance/variation/{assignee}
DescriptionGet the task variation of each user over time i.e., tasks started and completed by each user over the months.
Parameters

assignee: user (required).

Header Parameter - Media types acceptable for the response. Default is JSON

Return Type

Number of tasks started and completed over the months by the selected user.

Example Data
{
 "data": [
 {
 "startedInstances": 3,
 "completedInstances": 4,
 "month": "Jan"
 },
 {
 "startedInstances": 10,
 "completedInstances": 8,
 "month": "Feb"
 },
 {
 "startedInstances": 6,
 "completedInstances": 5,
 "month": "March"
 },
 {
 "startedInstances": 4,
 "completedInstances": 2,
 "month": "April"
 },
 {
 "startedInstances": 9,
 "completedInstances": 10,
 "month": "May"
 },
 {
 "startedInstances": 7,
 "completedInstances": 6,
 "month": "June"
 },
 {
 "startedInstances": 5,
 "completedInstances": 2,
 "month": "July"
 },
 {
 "startedInstances": 0,
 "completedInstances": 0,
 "month": "Aug"
 },
 {
 "startedInstances": 1,
 "completedInstances": 1,
 "month": "Sep"
 },
 {
 "startedInstances": 2,
 "completedInstances": 2,
 "month": "Oct"
 },
 {
 "startedInstances": 10,
 "completedInstances": 6,
 "month": "Nov"
 },
 {
 "startedInstances": 5,
 "completedInstances": 4,
 "month": "Dec"
 }
 ]
}
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.