curl --request POST \
--url http://{host}:{port}/{contextPath}/history/activity-instance \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"activityType": "userTask",
"taskAssignee": "peter",
"sorting": [
{
"sortBy": "activityId",
"sortOrder": "asc"
},
{
"sortBy": "executionId",
"sortOrder": "desc"
}
]
}
'import requests
url = "http://{host}:{port}/{contextPath}/history/activity-instance"
payload = {
"activityType": "userTask",
"taskAssignee": "peter",
"sorting": [
{
"sortBy": "activityId",
"sortOrder": "asc"
},
{
"sortBy": "executionId",
"sortOrder": "desc"
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
activityType: 'userTask',
taskAssignee: 'peter',
sorting: [
{sortBy: 'activityId', sortOrder: 'asc'},
{sortBy: 'executionId', sortOrder: 'desc'}
]
})
};
fetch('http://{host}:{port}/{contextPath}/history/activity-instance', 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/activity-instance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'activityType' => 'userTask',
'taskAssignee' => 'peter',
'sorting' => [
[
'sortBy' => 'activityId',
'sortOrder' => 'asc'
],
[
'sortBy' => 'executionId',
'sortOrder' => 'desc'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/history/activity-instance"
payload := strings.NewReader("{\n \"activityType\": \"userTask\",\n \"taskAssignee\": \"peter\",\n \"sorting\": [\n {\n \"sortBy\": \"activityId\",\n \"sortOrder\": \"asc\"\n },\n {\n \"sortBy\": \"executionId\",\n \"sortOrder\": \"desc\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{contextPath}/history/activity-instance")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"activityType\": \"userTask\",\n \"taskAssignee\": \"peter\",\n \"sorting\": [\n {\n \"sortBy\": \"activityId\",\n \"sortOrder\": \"asc\"\n },\n {\n \"sortBy\": \"executionId\",\n \"sortOrder\": \"desc\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/activity-instance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activityType\": \"userTask\",\n \"taskAssignee\": \"peter\",\n \"sorting\": [\n {\n \"sortBy\": \"activityId\",\n \"sortOrder\": \"asc\"\n },\n {\n \"sortBy\": \"executionId\",\n \"sortOrder\": \"desc\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"activityId": "anActivity",
"activityName": "anActivityName",
"activityType": "userTask",
"assignee": "peter",
"calledProcessInstanceId": "aHistoricCalledProcessInstanceId",
"calledCaseInstanceId": null,
"canceled": true,
"completeScope": false,
"durationInMillis": 2000,
"endTime": "2013-04-23T18:42:43.000+0200",
"executionId": "anExecutionId",
"id": "aHistoricActivityInstanceId",
"parentActivityInstanceId": "aHistoricParentActivityInstanceId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"startTime": "2013-04-23T11:20:43.000+0200",
"taskId": "aTaskId",
"tenantId": null,
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId"
}
]获取列表(POST)
Queries for historic activity instances that fulfill the given parameters. The size of the result set can be retrieved by using the Get Historic Activity Instance Count method.
curl --request POST \
--url http://{host}:{port}/{contextPath}/history/activity-instance \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"activityType": "userTask",
"taskAssignee": "peter",
"sorting": [
{
"sortBy": "activityId",
"sortOrder": "asc"
},
{
"sortBy": "executionId",
"sortOrder": "desc"
}
]
}
'import requests
url = "http://{host}:{port}/{contextPath}/history/activity-instance"
payload = {
"activityType": "userTask",
"taskAssignee": "peter",
"sorting": [
{
"sortBy": "activityId",
"sortOrder": "asc"
},
{
"sortBy": "executionId",
"sortOrder": "desc"
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
activityType: 'userTask',
taskAssignee: 'peter',
sorting: [
{sortBy: 'activityId', sortOrder: 'asc'},
{sortBy: 'executionId', sortOrder: 'desc'}
]
})
};
fetch('http://{host}:{port}/{contextPath}/history/activity-instance', 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/activity-instance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'activityType' => 'userTask',
'taskAssignee' => 'peter',
'sorting' => [
[
'sortBy' => 'activityId',
'sortOrder' => 'asc'
],
[
'sortBy' => 'executionId',
'sortOrder' => 'desc'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/history/activity-instance"
payload := strings.NewReader("{\n \"activityType\": \"userTask\",\n \"taskAssignee\": \"peter\",\n \"sorting\": [\n {\n \"sortBy\": \"activityId\",\n \"sortOrder\": \"asc\"\n },\n {\n \"sortBy\": \"executionId\",\n \"sortOrder\": \"desc\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{contextPath}/history/activity-instance")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"activityType\": \"userTask\",\n \"taskAssignee\": \"peter\",\n \"sorting\": [\n {\n \"sortBy\": \"activityId\",\n \"sortOrder\": \"asc\"\n },\n {\n \"sortBy\": \"executionId\",\n \"sortOrder\": \"desc\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/activity-instance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activityType\": \"userTask\",\n \"taskAssignee\": \"peter\",\n \"sorting\": [\n {\n \"sortBy\": \"activityId\",\n \"sortOrder\": \"asc\"\n },\n {\n \"sortBy\": \"executionId\",\n \"sortOrder\": \"desc\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"activityId": "anActivity",
"activityName": "anActivityName",
"activityType": "userTask",
"assignee": "peter",
"calledProcessInstanceId": "aHistoricCalledProcessInstanceId",
"calledCaseInstanceId": null,
"canceled": true,
"completeScope": false,
"durationInMillis": 2000,
"endTime": "2013-04-23T18:42:43.000+0200",
"executionId": "anExecutionId",
"id": "aHistoricActivityInstanceId",
"parentActivityInstanceId": "aHistoricParentActivityInstanceId",
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"startTime": "2013-04-23T11:20:43.000+0200",
"taskId": "aTaskId",
"tenantId": null,
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId"
}
]Authorizations
Query Parameters
Body
A historic activity instance query which defines a group of historic activity instances
Restrict to instances 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 instances 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 instances 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 instances 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.
Response
Request successful.
The time the instance was started. 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.
The time the instance ended. 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.
The time after which the activity instance should be removed by the History Cleanup job. 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.