Delete a task
client.task.delete(stringid, TaskDeleteParams { body } params?, RequestOptionsoptions?): TaskDeleteResponse { id, createdAt, fields, 4 more }
DELETE/v1/tasks/{id}
Moves a task to the trash. The task is soft-deleted and may be restored from the Lightfield UI.
Calling delete on an already-trashed task is a no-op and returns the existing record.
Required scope: tasks:delete
Rate limit category: Write
Delete a task
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const taskDeleteResponse = await client.task.delete('id');
console.log(taskDeleteResponse.id);{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}