Get entity class
GET/projects/{projectId}/entityClasses/{entityClassId}
Base URL: https://api.tinkermode.com
Get the specified entity class
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. | |
entityClassId | string | Yes | Entity Class ID (unique within project) |
Responses
200 Successful retrieval of the entity class
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attributeSchema | array | No | A schema used for validating the attributes of an entity instance. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | string | No | read-only (server-generated); format: date-time | Timestamp of entity class creation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
displaySettings | object | No | Various user interface settings used for display of the entity class. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
entityClass | string | Yes | read-only (server-generated) | ID of the entity class. Must be unique within a project. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metricsDefinitions | array | No | An array of metrics definitions that are applicable to this class of entities. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
projectId | integer | Yes | read-only (server-generated) | Project that this entity class belongs to. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updatedAt | string | No | read-only (server-generated); format: date-time | Timestamp of the last update on the entity class. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response example
{
"attributeSchema": [
{
"defaultValue": "medium_size_robot",
"description": "The group that the robot entity instance belongs to.",
"key": "robot_group",
"label": "Robot Group",
"options": [
{
"label": "Small Size Robot",
"value": "small_size_robot"
},
{
"label": "Medium Size Robot",
"value": "medium_size_robot"
},
{
"label": "Large Size Robot",
"value": "large_size_robot"
}
],
"required": true,
"type": "string"
},
{
"defaultValue": 15.5,
"description": "The maximum speed that the robot can be set to.",
"key": "maxRobotSpeedMph",
"label": "Maximum Robot Speed (mph)",
"max": 25,
"min": 5,
"required": false,
"type": "number"
}
],
"createdAt": "2021-08-12T20:11:11Z",
"displaySettings": {
"description": "Freezer with a temperature sensor and a door sensor",
"name": "Freezer",
"uiSettings": {
"componentPlacement": "placement1",
"layout": "twoColumnsLayout"
}
},
"entityClass": "freezer",
"metricsDefinitions": [
{
"dataStoreConfiguration": {
"bulkDataLabel": "tsdb",
"moduleInstanceId": "tsdb",
"moduleType": "tsdb"
},
"metricsDefinitionId": "ambient_sensor_module",
"metricsType": "raw",
"numericMetrics": [
{
"displayName": "Temperature",
"name": "temperature",
"range": {
"max": 100,
"min": 0
},
"unit": "°C"
}
],
"tagMetrics": [
{
"displayName": "Status",
"enumDefinitions": [
{
"Name": "Normal",
"Value": "000"
},
{
"Name": "Error",
"Value": "900"
}
],
"name": "statusCode"
}
]
},
{
"dataStoreConfiguration": {
"bulkDataLabel": "tsdb",
"moduleInstanceId": "tsdb",
"moduleType": "tsdb"
},
"metricsDefinitionId": "door_sensor_module",
"metricsType": "raw",
"numericMetrics": [
{
"displayName": "Count",
"name": "count"
}
]
}
],
"projectId": 1,
"updatedAt": "2021-09-02T22:19:39Z"
}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. |
404 The requested entityClass does not exist or is not accessible.
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. |