Get task field definitions
client.task.definitions(RequestOptionsoptions?): TaskDefinitionsResponse { fieldDefinitions, objectType, relationshipDefinitions }
GET/v1/tasks/definitions
Returns the schema for the field and relationship definitions available on tasks. Useful for understanding the shape of task data before creating or updating records. See Fields and relationships for more details.
Required scope: tasks:read
Rate limit category: Read
Returns
Get task field definitions
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const taskDefinitionsResponse = await client.task.definitions();
console.log(taskDefinitionsResponse.fieldDefinitions);{
"fieldDefinitions": {
"foo": {
"description": "description",
"label": "label",
"typeConfiguration": {
"currency": "currency",
"handleService": "TWITTER",
"multipleValues": true,
"options": [
{
"id": "id",
"label": "label",
"description": "description"
}
],
"unique": true
},
"valueType": "ADDRESS",
"id": "id",
"readOnly": true
}
},
"objectType": "objectType",
"relationshipDefinitions": {
"foo": {
"cardinality": "HAS_ONE",
"description": "description",
"label": "label",
"objectType": "objectType",
"id": "id"
}
}
}Returns Examples
{
"fieldDefinitions": {
"foo": {
"description": "description",
"label": "label",
"typeConfiguration": {
"currency": "currency",
"handleService": "TWITTER",
"multipleValues": true,
"options": [
{
"id": "id",
"label": "label",
"description": "description"
}
],
"unique": true
},
"valueType": "ADDRESS",
"id": "id",
"readOnly": true
}
},
"objectType": "objectType",
"relationshipDefinitions": {
"foo": {
"cardinality": "HAS_ONE",
"description": "description",
"label": "label",
"objectType": "objectType",
"id": "id"
}
}
}