curl --request GET \
--url http://{host}:{port}/{contextPath}/history/task \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/task"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/history/task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/history/task",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/history/task"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/history/task")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/task")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"id": "anId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anExecution",
"caseDefinitionId": "aCaseDefId",
"caseInstanceId": "aCaseInstId",
"caseExecutionId": "aCaseExecution",
"activityInstanceId": "anActInstId",
"name": "aName",
"description": "aDescription",
"deleteReason": "aDeleteReason",
"owner": "anOwner",
"assignee": "anAssignee",
"startTime": "2013-01-23T13:42:42.000+0200",
"endTime": "2013-01-23T13:45:42.000+0200",
"duration": 2000,
"taskDefinitionKey": "aTaskDefinitionKey",
"priority": 42,
"due": "2013-01-23T13:49:42.000+0200",
"parentTaskId": "aParentId",
"followUp:": "2013-01-23T13:44:42.000+0200",
"tenantId": null,
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId",
"taskState": "aTaskState"
}
]获取列表
Queries for historic tasks that fulfill the given parameters. The size of the result set can be retrieved by using the Get Task Count method.
curl --request GET \
--url http://{host}:{port}/{contextPath}/history/task \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/task"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/history/task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/history/task",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/history/task"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/history/task")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/task")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"id": "anId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"executionId": "anExecution",
"caseDefinitionId": "aCaseDefId",
"caseInstanceId": "aCaseInstId",
"caseExecutionId": "aCaseExecution",
"activityInstanceId": "anActInstId",
"name": "aName",
"description": "aDescription",
"deleteReason": "aDeleteReason",
"owner": "anOwner",
"assignee": "anAssignee",
"startTime": "2013-01-23T13:42:42.000+0200",
"endTime": "2013-01-23T13:45:42.000+0200",
"duration": 2000,
"taskDefinitionKey": "aTaskDefinitionKey",
"priority": 42,
"due": "2013-01-23T13:49:42.000+0200",
"parentTaskId": "aParentId",
"followUp:": "2013-01-23T13:44:42.000+0200",
"tenantId": null,
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId",
"taskState": "aTaskState"
}
]Authorizations
Query Parameters
Restrict to tasks that are due on the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that are due before the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that are due after the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that have a followUp date on the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that have a followUp date before the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that have a followUp date after the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that were started before the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that were started after the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that were finished before the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Restrict to tasks that were finished after the given date. By default,
the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ,
e.g., 2013-01-23T14:42:45.000+0200.
Only include tasks that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:
A valid parameter value has the form key_operator_value.
key is the variable name, operator is the comparison operator to be used
and value the variable value.
Note: Values are always treated as String objects on server side.
Valid operator values are:
eq- equal to;neq- not equal to;gt- greater than;gteq- greater than or equal to;lt- lower than;lteq- lower than or equal to;like.
key and value may not contain underscore or comma characters.
Only include tasks that belong to process instances that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:
A valid parameter value has the form key_operator_value.
key is the variable name, operator is the comparison operator to be used
and value the variable value.
Note: Values are always treated as String objects on server side.
Valid operator values are:
eq- equal to;neq- not equal to;gt- greater than;gteq- greater than or equal to;lt- lower than;lteq- lower than or equal to;like;notLike.
key and value may not contain underscore or comma characters.
Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter.
taskId, activityInstanceId, processDefinitionId, processInstanceId, executionId, duration, endTime, startTime, taskName, taskDescription, assignee, owner, dueDate, followUpDate, deleteReason, taskDefinitionKey, priority, caseDefinitionId, caseInstanceId, caseExecutionId, tenantId Response
Request successful.
The time the task was started. Default format
yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time the task ended. Default format
yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The task's due date. Default format
yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The follow-up date for the task. Default format
yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time after which the task should be removed by the History Cleanup job. Default format
yyyy-MM-dd'T'HH:mm:ss.SSSZ.