Skip to content

List custom object types

client.object.listDefinitions(RequestOptionsoptions?): ObjectListDefinitionsResponse { data }
GET/v1/objects

Returns all custom object types available to the caller.

ReturnsExpand Collapse
ObjectListDefinitionsResponse { data }
data: Array<Data>

All object types available to the caller.

label: string

Human-readable display name.

objectType: string

The slug used to reference this object type in the API.

List custom object types

import Lightfield from 'lightfield';

const client = new Lightfield({
  apiKey: 'My API Key',
});

const objectListDefinitionsResponse = await client.object.listDefinitions();

console.log(objectListDefinitionsResponse.data);
{
  "data": [
    {
      "label": "label",
      "objectType": "objectType"
    }
  ]
}
Returns Examples
{
  "data": [
    {
      "label": "label",
      "objectType": "objectType"
    }
  ]
}