cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/tasks/wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b/checklist" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"checklist": [
{
"name": "Measure the fence line"
}
]
}'from exsited import build_client
client = build_client()
response = client.tasks.create_task_checklist(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
{"checklist": [{"name": "Measure the fence line"}]},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.tasks.createTaskChecklist('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', {
checklist: [{name: 'Measure the fence line'}],
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->tasks->createTaskChecklist('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', [
'checklist' => [['name' => 'Measure the fence line']],
]);
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.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<TaskView> response = client.tasks().createTaskChecklist(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
Map.of("checklist", List.of(Map.of("name", "Measure the fence line"))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Tasks.CreateTaskChecklistAsync(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
new Dictionary<string, object?>
{
["checklist"] = new List<object?>
{
new Dictionary<string, object?>
{
["name"] = "Measure the fence line",
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.tasks.createTaskChecklist(
'wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b',
{
'checklist': [
{'name': 'Measure the fence line'},
],
},
);
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().CreateTaskChecklist(context.Background(), "wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b", map[string]any{
"checklist": []any{
map[string]any{"name": "Measure the fence line"},
},
}, 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
Add checklist items to a task
Adds one or more checklist items to a task and returns the whole task.
POST
/
tasks
/
{task_id}
/
checklist
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/tasks/wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b/checklist" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"checklist": [
{
"name": "Measure the fence line"
}
]
}'from exsited import build_client
client = build_client()
response = client.tasks.create_task_checklist(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
{"checklist": [{"name": "Measure the fence line"}]},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.tasks.createTaskChecklist('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', {
checklist: [{name: 'Measure the fence line'}],
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->tasks->createTaskChecklist('wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b', [
'checklist' => [['name' => 'Measure the fence line']],
]);
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.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<TaskView> response = client.tasks().createTaskChecklist(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
Map.of("checklist", List.of(Map.of("name", "Measure the fence line"))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Tasks.CreateTaskChecklistAsync(
"wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b",
new Dictionary<string, object?>
{
["checklist"] = new List<object?>
{
new Dictionary<string, object?>
{
["name"] = "Measure the fence line",
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.tasks.createTaskChecklist(
'wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b',
{
'checklist': [
{'name': 'Measure the fence line'},
],
},
);
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().CreateTaskChecklist(context.Background(), "wt_2e4f6a8b0c1d4e3f9a7b5c3d1e0f2a4b", map[string]any{
"checklist": []any{
map[string]any{"name": "Measure the fence line"},
},
}, 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 new items as an array under
checklist, each with a name. The whole task comes back under work_task, with the new items at the end of its checklist.
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
201 - application/json
The task with its updated checklist, under work_task.
Show child attributes
Show child attributes