Get
curl --request GET \
--url http://{host}:{port}/{contextPath}/task/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/task/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/task/{id}")
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",
"name": "aName",
"assignee": "anAssignee",
"created": "2013-01-23T13:42:42.000+0200",
"due": "2013-01-23T13:49:42.576+0200",
"followUp": "2013-01-23T13:44:42.437+0200",
"delegationState": "RESOLVED",
"description": "aDescription",
"executionId": "anExecution",
"owner": "anOwner",
"parentTaskId": "aParentId",
"priority": 42,
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"caseDefinitionId": "aCaseDefId",
"caseInstanceId": "aCaseInstId",
"caseExecutionId": "aCaseExecution",
"taskDefinitionKey": "aTaskDefinitionKey",
"suspended": false,
"formKey": "aFormKey",
"camundaFormRef": {
"key": "aCamundaFormKey",
"binding": "version",
"version": 2
},
"tenantId": "aTenantId",
"taskState": "aTaskState"
}任务
根据Id获取
Retrieves a task by id.
GET
/
task
/
{id}
Get
curl --request GET \
--url http://{host}:{port}/{contextPath}/task/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/task/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/task/{id}")
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",
"name": "aName",
"assignee": "anAssignee",
"created": "2013-01-23T13:42:42.000+0200",
"due": "2013-01-23T13:49:42.576+0200",
"followUp": "2013-01-23T13:44:42.437+0200",
"delegationState": "RESOLVED",
"description": "aDescription",
"executionId": "anExecution",
"owner": "anOwner",
"parentTaskId": "aParentId",
"priority": 42,
"processDefinitionId": "aProcDefId",
"processInstanceId": "aProcInstId",
"caseDefinitionId": "aCaseDefId",
"caseInstanceId": "aCaseInstId",
"caseExecutionId": "aCaseExecution",
"taskDefinitionKey": "aTaskDefinitionKey",
"suspended": false,
"formKey": "aFormKey",
"camundaFormRef": {
"key": "aCamundaFormKey",
"binding": "version",
"version": 2
},
"tenantId": "aTenantId",
"taskState": "aTaskState"
}Authorizations
Response
Request successful.
The date the task was created on.
Default format
yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The date the task was last updated. Every action that fires a task update event will update this property.
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.