Entity Type


Entity Types are used to categorize and describe Entities.

For example you make a generic category 'Building' and describe what attributes you'd like any building in your account to have.
Attributes such as 'Name', 'Address', 'Owner', etc.

Entities must be assigned an Entity Type ID.

Data model

Below is a basic data model for an Entity Type record.

When further documentation refers to IEntityType or just an Entity Type record, you can reference this data model.

interface IEntityType {
    // ID of the Entity Type.
    ID?: string;
    // Human readable name of the Entity Type.
    Name: string;
    // Description of the Entity Type.
    Description?: string;
    // An Entity record used for default values.
    Data?: Entity.IEntity;
    // If entity type access (and entity access) should be restricted.
    // When an entity type is restricted a user must have the "EntityType_<typeId>" permission.
    IsAccessRestricted?: boolean;
    // The data schema defining expected attributes for Entities to have.
    DataSchema?: IDataSchema; // See 'Entity Type: Data Schema' documentation.
    // Default Style for the corresponding Entities.
    "DisplaySetting.ID"?: number;
    // Created/updated date/time in ISO 8601 UTC.
    Created: string;
    Updated: string;
    // ID of the parent Entity Type.
    // This is used for organization.
    // When a parent type is deleted, the child types are also deleted.
    "Parent.EntityType.ID"?: string;
}

Entity Type requests.

Below are the basic requests for managing Entity Type records.


Get Entity Types

Response
interface IResponse {
    Items: IEntityType[];
}
Javascript example

When requesting a list of Entity Types with any filter, the parent Entity Types are included in the response.



Get Entity Type by ID

Response
// Response is the Entity Type record directly.
// Refer to the IEntityType description at the top.
Javascript example

Create/Update Entity Type

Response
// Body is the Entity Type record directly.

Delete Entity Type

Javascript example

Deleting an Entity Type will also delete all Entities of that type, and all child Entity Types (recursively).