Class attributes are dynamic attributes relevant to an asset, or a location used as a configuration element (CE). For instance, an computer server asset may include memory size and CPU model while a truck tire asset may include minimum and maximum pressure values. See this blog for more information about class attributes.
Class attributes are not included by default when fetching data by Calem Enterprise APIs. For instance, a data fetch API call results in 500 records selected. These records will not include class attributes. A new query parameter is added to include class attributes. Adding this parameter may cause the API call to take longer time since Calem Enterprise needs to fill out class attributes for each record selected.
- "ctg" is the new query parameter. Its value of "1" (number one) will include class attributes in data fetch.
- The code snippet (in PHP) below shows how this parameter is used in data search
- "w" is the query string
- "o" is the order by clause
- "l" is the limit clause
- "ctg" is the parameter to include class attributes
- "$auth" is the authorization token calculated - see Calem Enterprise API Guide for more info.
The response data is encoded in JSON. Category attributes (ending with "_wxyz" such as "_4859") are included as shown in the example below.
Additional resources
- How to Use Class and Class Attributes
- Calem Integration Part II: RESP API
- Calem Integration Part III: Custom Triggers
- Calem Enterprise REST API Guide (customer account required)
- User Guide and Admin Guide (customer account required)
- Calem Enterprise Training Site
- Calem Enterprise Blogs
- Calem Enterprise demo