Get Attribute Info


The Get Attribute Info node retrieves the information of the specified attributes or all attributes of the asset.

Node Type

EnOS.

Input and Output Ability

This node has multiple entry points and 2 exit points (success/failure).

Node Properties

../../../_images/get_attribute_info.png


Name

The name for this node.


Description

The description for this node.

Samples

The returned data is stored in the body, with the ComponentReply[Query-Attribute] parameter as the key.

Query Specific Attributes

Input Sample

{
  "MetaData": {
    "messageType": "QueryAttribute",
    "assetId": "assetId",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId",
    "ts": "1654511472266"
  },
  "Body": {
    "attributes": [
      "arr_bool",
      "attr_string",
      "attr_int"
    ]
  }
}

Output Sample

{
  "MetaData": {
    "messageType": "QueryAttribute",
    "assetId": "assetId",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId",
    "componentResult": "Success",
    "ts": "1654511472266"
  },
  "Body": {
    "attributes": [],
    "ComponentReply[Query-Attribute]": {
      "arr_bool": true,
      "attr_int": 7
    }
  }
}

Query All Attributes

Input Sample

{
  "MetaData": {
    "messageType": "QueryAttribute",
    "assetId": "assetId",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId",
    "ts": "1654511472222"
  },
  "Body": {
    "attributes": []
  }
}

Output Sample

{
  "MetaData": {
    "messageType": "QueryAttribute",
    "assetId": "assetId",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId",
    "componentResult": "Success",
    "ts": "1654511472222"
  },
  "Body": {
    "attributes": [],
    "ComponentReply[Query-Attribute]": {
      "attr_double": 7,
      "arr_bool": true,
      "attr_date": "2022-03-17",
      "attr_int": 7,
      "attr_ts": 1312672803201,
      "arr_enum": "v2",
      "attr_file": "ftp://d.com/demo7.txt",
      "new_date": "",
      "attr_float": 7
    }
  }
}