curl --request GET \
--url http://{host}:{port}/{contextPath}/process-definition/statistics \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/process-definition/statistics"
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}/process-definition/statistics', 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}/process-definition/statistics",
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}/process-definition/statistics"
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}/process-definition/statistics")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/process-definition/statistics")
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[
{
"@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto",
"id": "aProcessDefinitionId",
"instances": 123,
"failedJobs": 42,
"definition": {
"id": "aProcessDefinitionId",
"key": "aKey",
"category": null,
"description": null,
"name": "aName",
"version": 0,
"resource": null,
"deploymentId": null,
"diagram": null,
"suspended": false,
"tenantId": null,
"versionTag": "1.0.0",
"historyTimeToLive": null,
"startableInTasklist": false
},
"incidents": []
},
{
"@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto",
"id": "aProcessDefinitionId:2",
"instances": 124,
"failedJobs": 43,
"definition": {
"id": "aProcessDefinitionId:2",
"key": "aKey",
"category": null,
"description": null,
"name": "aName",
"version": 0,
"resource": null,
"deploymentId": null,
"diagram": null,
"suspended": false,
"tenantId": null,
"versionTag": null,
"historyTimeToLive": null,
"startableInTasklist": false
},
"incidents": []
}
]获取流程实例统计信息
Retrieves runtime statistics of the process engine, grouped by process definitions. These statistics include the number of running process instances, optionally the number of failed jobs and also optionally the number of incidents either grouped by incident types or for a specific incident type. Note: This does not include historic data.
curl --request GET \
--url http://{host}:{port}/{contextPath}/process-definition/statistics \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/process-definition/statistics"
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}/process-definition/statistics', 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}/process-definition/statistics",
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}/process-definition/statistics"
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}/process-definition/statistics")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/process-definition/statistics")
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[
{
"@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto",
"id": "aProcessDefinitionId",
"instances": 123,
"failedJobs": 42,
"definition": {
"id": "aProcessDefinitionId",
"key": "aKey",
"category": null,
"description": null,
"name": "aName",
"version": 0,
"resource": null,
"deploymentId": null,
"diagram": null,
"suspended": false,
"tenantId": null,
"versionTag": "1.0.0",
"historyTimeToLive": null,
"startableInTasklist": false
},
"incidents": []
},
{
"@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto",
"id": "aProcessDefinitionId:2",
"instances": 124,
"failedJobs": 43,
"definition": {
"id": "aProcessDefinitionId:2",
"key": "aKey",
"category": null,
"description": null,
"name": "aName",
"version": 0,
"resource": null,
"deploymentId": null,
"diagram": null,
"suspended": false,
"tenantId": null,
"versionTag": null,
"historyTimeToLive": null,
"startableInTasklist": false
},
"incidents": []
}
]Authorizations
Query Parameters
Valid values for this property are true or false.
If this property has been set to true the result will include the corresponding number of incidents
for each occurred incident type.
If it is set to false, the incidents will not be included in the result.
Cannot be used in combination with incidentsForType.
If this property has been set with any incident type (i.e., a string value) the result
will only include the number of incidents for the assigned incident type.
Cannot be used in combination with incidents.
See the User Guide
for a list of incident types.
Valid values for this property are true or false.
If this property has been set to true the result will include the corresponding number of
root incidents for each occurred incident type.
If it is set to false, the incidents will not be included in the result.
Cannot be used in combination with incidentsForType or incidents.
Response
Request successful.