Get list of entity instances

GET/projects/{projectId}/entities

Base URL: https://api.tinkermode.com

Get entity instances of a project. If caller doesn't have admin permission, caller must specify either the homeId or userId parameter.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user, service account, or project API key.

Path parameters

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.

Query parameters

NameTypeRequiredConstraintsDescription
entityClassstringNoDeprecated. Use entityClasses instead.
entityClassesstringNoReturns entity instances of the passed entity classes by a comma-separated string like entityClasses=building,floor,room.
homeIdintegerNoReturn entity instances in a specific home. If the caller uses a user API key, the user must be a member of the home.
limitintegerNodefault: 25; min: 1Maximum number of entity instances to return.
parentIdstringNoReturns child entity instances of the specified parent entity. If the reserved value 'root' is passed, only root entity instances will be returned.
recursivebooleanNodefault: falseIf the parentId query parameter is used, and this parameter is true, all descendants of the specified parent entity will be returned (children, grandchildren, and so on). This parameter is ignored if parentId is not specified.
skipintegerNodefault: 0; min: 0Number of entity instances to skip over.
sortBystringNoSorts the returned results by the given sort field and sort order in the format sortField:sortOrder e.g. attributes.minTemp:asc sortOrder can be asc or desc. The default sort order is ascending.
userIdintegerNoReturn entity instances that a particular user has access to. The caller must contain the API key of the user, the API key of a user who has permission to all resources of a project, or a Project API Key with admin permission.

Responses

200 Successful retrieval of list of entity instances.

Content type: application/json

Represents an entity instance created by a project.

An array of objects with the following shape:

PropertyTypeRequiredConstraintsDescription
attributesobjectNoThe attributes that belong to the entity instance, separated as key-value pairs.
createdAtstringNoread-only (server-generated); format: date-timeTimestamp of entity creation.
displaySettingsobjectNoVarious user interface settings used for display of the entity instance.
Properties of displaySettings
PropertyTypeRequiredConstraintsDescription
descriptionstringNoAn intuitive description for the entity instance for display.
iconDataobjectNoMetadata used for the uploaded icon of the entity instance.
Properties of iconData
PropertyTypeRequiredConstraintsDescription
fileNamestringNoFileName represents the name of the file uploaded.
urlstringNoA temporary signed URL for file download.
imageDataobjectNoMetadata used for the uploaded image of the entity instance.
Properties of imageData
PropertyTypeRequiredConstraintsDescription
fileNamestringNoFileName represents the name of the file uploaded.
urlstringNoA temporary signed URL for file download.
namestringNoThe display name for the entity instance.
entityClassstringYesread-only (server-generated)The entity class that the entity was instantiated from.
entityIdstringYesread-only (server-generated)Unique entity ID.
homeIdintegerYesread-only (server-generated)Home that this entity belongs to.
metricsarray<object>Noread-only (server-generated)Meta data of the metrics associated with this entity instance.
Properties of metrics
PropertyTypeRequiredConstraintsDescription
metricsDefinitionIdstringNoCorresponding metrics definition ID in entity class.
parentIdstringNoThe ID of the entity instance that is a parent of the instance.
projectIdintegerYesread-only (server-generated)Project that this entity belongs to.
suspendAlertRuleEvaluationConditionsarray<object>NoAn array of condition for suspending alerts, which are evaluated as if they are concatenated with OR
Properties of suspendAlertRuleEvaluationConditions
PropertyTypeRequiredConstraintsDescription
alertConditionTypesarray<string>NoAn array of alert condition types. This allows suspending alerts based on the alert types. All rules of the specified condition type will be suspended.
fromstringNoformat: date-timeTimestamp of the begin of the interval. Null applies this rule without this time constrains
includeDescendantsbooleanNoBoolean value that shows whether alert rules are suspended for only this entity or this entity and descendants
rulesarray<number>NoAn array of alertRuleId. Empty array means all rules
tostringNoformat: date-timeTimestamp of the end of the interval. Null applies this rule without this time constrains
timeZonestringYesread-only (server-generated)The time zone that the entity exists in. This should be a time zone name defined in the IANA TZ Database.
uiSettingsobjectNoAn opaque object used by UI applications to store any additional settings. These will override the entity class uiSettings.
updatedAtstringNoread-only (server-generated); format: date-timeTimestamp of the last update on the entity.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.