Task Object
The Task Object represents a single batch operation request.
Each task defines what operation will be executed (POST, PATCH, or DELETE), which objects are affected, and how they should be updated.
Task execution and results are tracked through the task status attribute and operation counters (processed, success, failure, and total).
Task Object Attributes
These fields and values make up the JSON object that gets returned with successful requests.
| Attribute | Data Type | Description |
|---|---|---|
| data | array of objects | The payload containing data for bulk creation or modification. Must be empty for |
| date_created read only | string | The date and time when the batch task was created. |
| date_modified read only | string | The date and time when the batch task was modified. |
| entries | array | List of existing record identifiers to be modified or deleted. This is based on |
| failure read only | integer | Number of failed operations within the batch. |
| field | string | The field used to locate the existing entries during |
| method | string | The HTTP method applied to the batch request, either |
| partner_sid read only | string | The secure ID of the partner associated with the batch task. |
| processed read only | integer | Number of operations already processed in the batch task. |
| review | boolean | Indicates whether this task requires manual reviewing before execution. |
| status | string | Current execution status of the batch task. Refer to the table below for a comprehensive list of statuses. |
| success read only | integer | Number of successfully executed operations. |
| task_sid read only | string | The task secure ID. |
| total read only | integer | Total number of operations queued in the batch. |
| type | string | The type of task, either |
status
| Value | Description |
|---|---|
| approved | The task has been approved and will execute. |
| cancelled | The task has been cancelled and will not execute. |
| completed | The task is completed. |
| created | The batch of objects has been created. |
| pending_review | The task is pending review and has not been executed. |
| queued | The task is in queue. |
| running | The task is currently running. |
Sample Task object
{
"data": {
"trunk_group_sid": "b30a3dbb-3708-41f0-a9ca-5cf365dcc4d4"
},
"date_created": "2024-10-30T20:47:32.517Z",
"date_modified": "2024-10-30T20:47:32.517Z",
"entries": [
"18053355112",
"18053355280"
],
"error_details": [],
"failure": null,
"field": "phonenumber",
"method": "PATCH",
"partner_sid": "923840ce-0b63-44a9-b4ce-09dc4181fb9d",
"processed": null,
"review": true,
"status": "created",
"success": null,
"task_sid": "2d9e546e-634b-4f6b-97ca-c2158163540c",
"total": null,
"type": "phonenumber"
}