curl --request GET \
--url http://{host}:{port}/{contextPath}/task/count \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/task/count"
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}/task/count', 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}/task/count",
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}/task/count"
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}/task/count")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/task/count")
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{
"count": 1
}获取计数
Retrieves the number of tasks that fulfill a provided filter. Corresponds to the size of the result set when using the Get Tasks method.
Security Consideration: There are several query parameters (such as assigneeExpression) for specifying an EL expression. These are disabled by default to prevent remote code execution. See the section on security considerations for custom code in the user guide for details.
curl --request GET \
--url http://{host}:{port}/{contextPath}/task/count \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/task/count"
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}/task/count', 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}/task/count",
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}/task/count"
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}/task/count")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/task/count")
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{
"count": 1
}Authorizations
Query Parameters
Restrict to tasks that belong to process instances with the given business key which is described by an expression. See the user guide for more information on available functions.
Restrict to tasks that have a process instance business key that has the parameter value as a substring and is described by an expression. See the user guide for more information on available functions.
Restrict to tasks that the user described by the given expression is assigned to. See the user guide for more information on available functions.
Restrict to tasks that have an assignee that has the parameter value described by the given expression as a substring. See the user guide for more information on available functions.
Restrict to tasks that the user described by the given expression owns. See the user guide for more information on available functions.
Only include tasks that are offered to the group described by the given expression. See the user guide for more information on available functions.
Only include tasks that are offered to the user described by the given expression. See the user guide for more information on available functions.
Only include tasks that the user described by the given expression is involved in. A user is involved in a task if an identity link exists between task and user (e.g., the user is the assignee). See the user guide for more information on available functions.
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.546+0200.
Restrict to tasks that are due on the date described by the given expression. See the
User Guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
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.435+0200.
Restrict to tasks that are due after the date described by the given expression.
See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
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.243+0200.
Restrict to tasks that are due before the date described by the given expression.
See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
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.342+0200.
Restrict to tasks that have a followUp date on the date described by the given
expression. See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
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.542+0200.
Restrict to tasks that have a followUp date after the date described by the given
expression. See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
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.234+0200.
Restrict to tasks that have a followUp date before the date described by the given
expression. See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
Restrict to tasks that have no followUp date or 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.432+0200. The
typical use case is to query all active tasks for a user for a given date.
Restrict to tasks that have no followUp date or a followUp date before the date
described by the given expression. See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
Restrict to tasks that were created 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.324+0200.
Restrict to tasks that were created on the date described by the given expression.
See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
Restrict to tasks that were created 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.342+0200.
Restrict to tasks that were created after the date described by the given expression.
See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
Restrict to tasks that were created 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.332+0200.
Restrict to tasks that were created before the date described by the given expression.
See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
Restrict to tasks that were updated after the given date. Every action that fires
a task update event is considered as updating the task.
By default, the date must
have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.332+0200.
Restrict to tasks that were updated after the date described by the given expression. Every action that fires
a task update event is considered as updating the task.
See the
user guide
for more information on available functions. The expression must evaluate to a
java.util.Date or org.joda.time.DateTime object.
Restrict to tasks that are offered to any of the candidate groups described by the
given expression. See the
user guide
for more information on available functions. The expression must evaluate to
java.util.List of Strings.
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.
Only include tasks that belong to case 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.
key and value may not contain underscore or comma characters.
Check if task has attachments and/or comments. Value may only be true, as
false is the default behavior.
Adding the filter will do additional attachment and comments queries to the database,
it might slow down the query in case of tables having high volume of data.
This param is not considered for count queries