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
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
entityClass | string | No | Deprecated. Use entityClasses instead.
| |
entityClasses | string | No | Returns entity instances of the passed entity classes by a comma-separated string like entityClasses=building,floor,room.
| |
homeId | integer | No | Return entity instances in a specific home. If the caller uses a user API key, the user must be a member of the home. | |
limit | integer | No | default: 25; min: 1 | Maximum number of entity instances to return. |
parentId | string | No | Returns child entity instances of the specified parent entity. If the reserved value 'root' is passed, only root entity instances will be returned. | |
recursive | boolean | No | default: false | If 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. |
skip | integer | No | default: 0; min: 0 | Number of entity instances to skip over. |
sortBy | string | No | Sorts 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.
| |
userId | integer | No | Return 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:
| Property | Type | Required | Constraints | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attributes | object | No | The attributes that belong to the entity instance, separated as key-value pairs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | string | No | read-only (server-generated); format: date-time | Timestamp of entity creation. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
displaySettings | object | No | Various user interface settings used for display of the entity instance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
entityClass | string | Yes | read-only (server-generated) | The entity class that the entity was instantiated from. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
entityId | string | Yes | read-only (server-generated) | Unique entity ID. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
homeId | integer | Yes | read-only (server-generated) | Home that this entity belongs to. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metrics | array<object> | No | read-only (server-generated) | Meta data of the metrics associated with this entity instance. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parentId | string | No | The ID of the entity instance that is a parent of the instance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
projectId | integer | Yes | read-only (server-generated) | Project that this entity belongs to. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
suspendAlertRuleEvaluationConditions | array<object> | No | An array of condition for suspending alerts, which are evaluated as if they are concatenated with OR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeZone | string | Yes | read-only (server-generated) | The time zone that the entity exists in. This should be a time zone name defined in the IANA TZ Database. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uiSettings | object | No | An opaque object used by UI applications to store any additional settings. These will override the entity class uiSettings. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updatedAt | string | No | read-only (server-generated); format: date-time | Timestamp of the last update on the entity. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |