Online Docs

Bulk edit task

Change information of existing a task in the current channel. The fields can be updated: assignedTo, status, priority, startDate, dueDate.

URL Endpoint

/api/bulk/task.

Method

POST.

Parameters

This method does not supply OData Filter syntax.

Request

Header

1
2
3
--x-appvity-channelId: [ChannelID]
--x-appvity-teamid: [TeamID]
--Cookie: graphNodeCookie=[ID]

Body

In the request body, need to include the following information should:

  • ids is the list of ids of all tasks that need to be changed. Must have at least 1 item in the list.
  • assignedTo is a list of users needed to change assignee. If you don’t want to change assignee so this field is [].
  • status must be an existing status in the eTask and mapped. If the value is null, status will not be changed.
  • priority is priority of eTask. If the value is null, status will not be changed.
  • startDate and dueDate are datetime of the tasks. If the value is null, startDate and dueDate will not be changed.
  • completedDate will autofill when the status is changed to Done category.
1
2
3
4
5
6
7
8
9
10
11
12
{
"ids": [
"5f62c8ef4d596392f54d1fc3",
"5f62c4b94d596392f54d1994"
],
"assignedTo": [],
"status": "In Progress",
"priority": "Normal",
"startDate": "2020-09-22T17:00:00Z",
"dueDate": null,
"completedDate": null
}

Response

Success

If successful, this method returns a 200 OK response code and the updated tasks and updated status in the response body.

Error

Code: 400 Bad Request, 401 Unauthorized, 500 Error Exception.
Content: { error : “error message” }

Example

Request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl --location --request POST 'https://teams.appvity.com/api/bulk/task' \
--H 'Cookie: graphNodeCookie=s%3An__UHMo8vb1jQlmNEV4LZjYgqcjaV68u.b49DG4G8a8yGuckWuzbebPPECVYJHKo05kMU8TJt7aM' \
--H 'x-appvity-channelId: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--H 'x-appvity-teamid: 19:15c258785b4040699180e7a8ad6c6014@thread.tacv2' \
--H 'Content-Type: application/json' \
--data-binary '{
"ids": [
"5f62c8ef4d596392f54d1fc3",
"5f602e564d596392f53d45b6"
],
"assignedTo": [],
"status": null,
"priority": "Normal",
"startDate": null,
"dueDate": null,
"completedDate": null
}'

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
[
{
"_id": "5f62c8ef4d596392f54d1fc3",
"name": "B-Task",
"status": "success"
},
{
"_id": "5f602e564d596392f53d45b6",
"name": " A-Task",
"status": "error",
"error": "ETASK_MAPPING_NOTFOUND"
}
]

Comment

Was this article helpful?
Thanks For Your Feedback