Update
curl --request PUT \
--url http://{host}:{port}/{contextPath}/task/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Task",
"description": "This have to be done very urgent",
"priority": 30,
"assignee": "peter",
"owner": "mary",
"delegationState": "PENDING",
"due": "2014-08-30T10:00:00.000+0200",
"followUp": "2014-08-25T10:00:00.000+0200",
"parentTaskId": "aParentTaskId",
"caseInstanceId": "aCaseInstanceId",
"tenantId": "tenantId"
}
'import requests
url = "http://{host}:{port}/{contextPath}/task/{id}"
payload = {
"name": "My Task",
"description": "This have to be done very urgent",
"priority": 30,
"assignee": "peter",
"owner": "mary",
"delegationState": "PENDING",
"due": "2014-08-30T10:00:00.000+0200",
"followUp": "2014-08-25T10:00:00.000+0200",
"parentTaskId": "aParentTaskId",
"caseInstanceId": "aCaseInstanceId",
"tenantId": "tenantId"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Task',
description: 'This have to be done very urgent',
priority: 30,
assignee: 'peter',
owner: 'mary',
delegationState: 'PENDING',
due: '2014-08-30T10:00:00.000+0200',
followUp: '2014-08-25T10:00:00.000+0200',
parentTaskId: 'aParentTaskId',
caseInstanceId: 'aCaseInstanceId',
tenantId: 'tenantId'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Task',
'description' => 'This have to be done very urgent',
'priority' => 30,
'assignee' => 'peter',
'owner' => 'mary',
'delegationState' => 'PENDING',
'due' => '2014-08-30T10:00:00.000+0200',
'followUp' => '2014-08-25T10:00:00.000+0200',
'parentTaskId' => 'aParentTaskId',
'caseInstanceId' => 'aCaseInstanceId',
'tenantId' => 'tenantId'
]),
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}/task/{id}"
payload := strings.NewReader("{\n \"name\": \"My Task\",\n \"description\": \"This have to be done very urgent\",\n \"priority\": 30,\n \"assignee\": \"peter\",\n \"owner\": \"mary\",\n \"delegationState\": \"PENDING\",\n \"due\": \"2014-08-30T10:00:00.000+0200\",\n \"followUp\": \"2014-08-25T10:00:00.000+0200\",\n \"parentTaskId\": \"aParentTaskId\",\n \"caseInstanceId\": \"aCaseInstanceId\",\n \"tenantId\": \"tenantId\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://{host}:{port}/{contextPath}/task/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Task\",\n \"description\": \"This have to be done very urgent\",\n \"priority\": 30,\n \"assignee\": \"peter\",\n \"owner\": \"mary\",\n \"delegationState\": \"PENDING\",\n \"due\": \"2014-08-30T10:00:00.000+0200\",\n \"followUp\": \"2014-08-25T10:00:00.000+0200\",\n \"parentTaskId\": \"aParentTaskId\",\n \"caseInstanceId\": \"aCaseInstanceId\",\n \"tenantId\": \"tenantId\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Task\",\n \"description\": \"This have to be done very urgent\",\n \"priority\": 30,\n \"assignee\": \"peter\",\n \"owner\": \"mary\",\n \"delegationState\": \"PENDING\",\n \"due\": \"2014-08-30T10:00:00.000+0200\",\n \"followUp\": \"2014-08-25T10:00:00.000+0200\",\n \"parentTaskId\": \"aParentTaskId\",\n \"caseInstanceId\": \"aCaseInstanceId\",\n \"tenantId\": \"tenantId\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"message": "<string>",
"code": 123
}{
"type": "<string>",
"message": "<string>",
"code": 123
}任务
根据Id更新任务
Updates a task.
PUT
/
task
/
{id}
Update
curl --request PUT \
--url http://{host}:{port}/{contextPath}/task/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Task",
"description": "This have to be done very urgent",
"priority": 30,
"assignee": "peter",
"owner": "mary",
"delegationState": "PENDING",
"due": "2014-08-30T10:00:00.000+0200",
"followUp": "2014-08-25T10:00:00.000+0200",
"parentTaskId": "aParentTaskId",
"caseInstanceId": "aCaseInstanceId",
"tenantId": "tenantId"
}
'import requests
url = "http://{host}:{port}/{contextPath}/task/{id}"
payload = {
"name": "My Task",
"description": "This have to be done very urgent",
"priority": 30,
"assignee": "peter",
"owner": "mary",
"delegationState": "PENDING",
"due": "2014-08-30T10:00:00.000+0200",
"followUp": "2014-08-25T10:00:00.000+0200",
"parentTaskId": "aParentTaskId",
"caseInstanceId": "aCaseInstanceId",
"tenantId": "tenantId"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Task',
description: 'This have to be done very urgent',
priority: 30,
assignee: 'peter',
owner: 'mary',
delegationState: 'PENDING',
due: '2014-08-30T10:00:00.000+0200',
followUp: '2014-08-25T10:00:00.000+0200',
parentTaskId: 'aParentTaskId',
caseInstanceId: 'aCaseInstanceId',
tenantId: 'tenantId'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Task',
'description' => 'This have to be done very urgent',
'priority' => 30,
'assignee' => 'peter',
'owner' => 'mary',
'delegationState' => 'PENDING',
'due' => '2014-08-30T10:00:00.000+0200',
'followUp' => '2014-08-25T10:00:00.000+0200',
'parentTaskId' => 'aParentTaskId',
'caseInstanceId' => 'aCaseInstanceId',
'tenantId' => 'tenantId'
]),
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}/task/{id}"
payload := strings.NewReader("{\n \"name\": \"My Task\",\n \"description\": \"This have to be done very urgent\",\n \"priority\": 30,\n \"assignee\": \"peter\",\n \"owner\": \"mary\",\n \"delegationState\": \"PENDING\",\n \"due\": \"2014-08-30T10:00:00.000+0200\",\n \"followUp\": \"2014-08-25T10:00:00.000+0200\",\n \"parentTaskId\": \"aParentTaskId\",\n \"caseInstanceId\": \"aCaseInstanceId\",\n \"tenantId\": \"tenantId\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://{host}:{port}/{contextPath}/task/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Task\",\n \"description\": \"This have to be done very urgent\",\n \"priority\": 30,\n \"assignee\": \"peter\",\n \"owner\": \"mary\",\n \"delegationState\": \"PENDING\",\n \"due\": \"2014-08-30T10:00:00.000+0200\",\n \"followUp\": \"2014-08-25T10:00:00.000+0200\",\n \"parentTaskId\": \"aParentTaskId\",\n \"caseInstanceId\": \"aCaseInstanceId\",\n \"tenantId\": \"tenantId\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Task\",\n \"description\": \"This have to be done very urgent\",\n \"priority\": 30,\n \"assignee\": \"peter\",\n \"owner\": \"mary\",\n \"delegationState\": \"PENDING\",\n \"due\": \"2014-08-30T10:00:00.000+0200\",\n \"followUp\": \"2014-08-25T10:00:00.000+0200\",\n \"parentTaskId\": \"aParentTaskId\",\n \"caseInstanceId\": \"aCaseInstanceId\",\n \"tenantId\": \"tenantId\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"message": "<string>",
"code": 123
}{
"type": "<string>",
"message": "<string>",
"code": 123
}Authorizations
Body
application/json
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.
Response
Request successful.