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

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityClassIdstringYesEntity Class ID (unique within project)

Responses

200 Successful retrieval of the entity class

Content type: application/json

PropertyTypeRequiredConstraintsDescription
attributeSchemaarrayNoA schema used for validating the attributes of an entity instance.
createdAtstringNoread-only (server-generated); format: date-timeTimestamp of entity class creation.
displaySettingsobjectNoVarious user interface settings used for display of the entity class.
Properties of displaySettings
PropertyTypeRequiredConstraintsDescription
descriptionstringNoAn intuitive description for the entity class for display.
iconDataobjectNoMetadata used for the uploaded icon of the entity class.
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 class.
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 class.
uiSettingsobjectNoAn opaque object used by UI applications to store any additional settings.
entityClassstringYesread-only (server-generated)ID of the entity class. Must be unique within a project.
metricsDefinitionsarrayNoAn array of metrics definitions that are applicable to this class of entities.
projectIdintegerYesread-only (server-generated)Project that this entity class belongs to.
updatedAtstringNoread-only (server-generated); format: date-timeTimestamp 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

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.

404 The requested entityClass does not exist or is not accessible.

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.