cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/tasks/wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"work_task": {
"description": "Replace the damaged fence panels"
}
}'from exsited import build_client
client = build_client()
response = client.tasks.update_task(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
{"work_task": {"description": "Replace the damaged fence panels"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.tasks.updateTask('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', {
work_task: {description: 'Replace the damaged fence panels'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->tasks->updateTask('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', [
'work_task' => ['description' => 'Replace the damaged fence panels'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.tasks.tasks_dto.TasksDto.TaskView;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<TaskView> response = client.tasks().updateTask(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
Map.of("work_task", Map.of("description", "Replace the damaged fence panels")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Tasks.UpdateTaskAsync(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
new Dictionary<string, object?>
{
["work_task"] = new Dictionary<string, object?>
{
["description"] = "Replace the damaged fence panels",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.tasks.updateTask(
'wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b',
{
'work_task': {'description': 'Replace the damaged fence panels'},
},
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Tasks().UpdateTask(context.Background(), "wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b", map[string]any{
"work_task": map[string]any{
"description": "Replace the damaged fence panels",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"work_task": {
"activity_logs": [
{
"activity": "<string>"
}
],
"actual_hours": null,
"alerts": "<array>",
"assignees": {
"manually_added_account_contacts": "<array>",
"selected_account_contacts": "<array>",
"selected_employees": [
{
"display_order": 123,
"email": "<string>",
"employee_code": "<string>",
"name": "<string>",
"responsibility": null,
"uuid": "<string>"
}
],
"selected_labours": [
{
"display_order": 123,
"email": "<string>",
"labour_code": "<string>",
"name": "<string>",
"responsibility": null,
"uuid": "<string>"
}
],
"selected_operators": "<array>"
},
"checklist": "<array>",
"code": "<string>",
"completed_at": "<string>",
"completed_by": {
"name": "<string>",
"object": "<string>"
},
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"custom_attributes": "<array>",
"description": "<string>",
"display_name": "<string>",
"due_date": "<string>",
"estimated_hours": 123,
"href": "<string>",
"id": "<string>",
"last_updated_by": {
"name": "<string>",
"object": "<string>"
},
"last_updated_on": "<string>",
"milestone": null,
"name": "<string>",
"object": "<string>",
"parent_task": null,
"priority": "<string>",
"resource": null,
"sort_order": 123,
"start_after": null,
"start_date": "<string>",
"state": null,
"status": "<string>",
"task_status": "<string>",
"version": 123,
"workflow": null
}
}Tasks
Update a task
Updates a task and returns it under work_task.
PATCH
/
tasks
/
{task_id}
cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/tasks/wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"work_task": {
"description": "Replace the damaged fence panels"
}
}'from exsited import build_client
client = build_client()
response = client.tasks.update_task(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
{"work_task": {"description": "Replace the damaged fence panels"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.tasks.updateTask('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', {
work_task: {description: 'Replace the damaged fence panels'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->tasks->updateTask('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', [
'work_task' => ['description' => 'Replace the damaged fence panels'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.tasks.tasks_dto.TasksDto.TaskView;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<TaskView> response = client.tasks().updateTask(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
Map.of("work_task", Map.of("description", "Replace the damaged fence panels")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Tasks.UpdateTaskAsync(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
new Dictionary<string, object?>
{
["work_task"] = new Dictionary<string, object?>
{
["description"] = "Replace the damaged fence panels",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.tasks.updateTask(
'wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b',
{
'work_task': {'description': 'Replace the damaged fence panels'},
},
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Tasks().UpdateTask(context.Background(), "wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b", map[string]any{
"work_task": map[string]any{
"description": "Replace the damaged fence panels",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"work_task": {
"activity_logs": [
{
"activity": "<string>"
}
],
"actual_hours": null,
"alerts": "<array>",
"assignees": {
"manually_added_account_contacts": "<array>",
"selected_account_contacts": "<array>",
"selected_employees": [
{
"display_order": 123,
"email": "<string>",
"employee_code": "<string>",
"name": "<string>",
"responsibility": null,
"uuid": "<string>"
}
],
"selected_labours": [
{
"display_order": 123,
"email": "<string>",
"labour_code": "<string>",
"name": "<string>",
"responsibility": null,
"uuid": "<string>"
}
],
"selected_operators": "<array>"
},
"checklist": "<array>",
"code": "<string>",
"completed_at": "<string>",
"completed_by": {
"name": "<string>",
"object": "<string>"
},
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"custom_attributes": "<array>",
"description": "<string>",
"display_name": "<string>",
"due_date": "<string>",
"estimated_hours": 123,
"href": "<string>",
"id": "<string>",
"last_updated_by": {
"name": "<string>",
"object": "<string>"
},
"last_updated_on": "<string>",
"milestone": null,
"name": "<string>",
"object": "<string>",
"parent_task": null,
"priority": "<string>",
"resource": null,
"sort_order": 123,
"start_after": null,
"start_date": "<string>",
"state": null,
"status": "<string>",
"task_status": "<string>",
"version": 123,
"workflow": null
}
}Send the fields to change under
work_task, such as description. The updated task comes back under work_task.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Path Parameters
The task's id, which starts with wt_.
Body
application/json
Show child attributes
Show child attributes
Response
200 - application/json
The updated task, under work_task.
Show child attributes
Show child attributes