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.
//Fetch locations with location name starting with CTR //Order by location ascending //Get only 5 records starting from the 5th record //Include class attriburtes in the data fetch $w=urlencode("cm_location.location like 'CTR%'"); $o=urlencode("location ASC"); $l=urlencode("5,5"); $ctg=urlencode("1"); $response = \Httpful\Request::get('https://localhost/CalemEnt/trunk/api/search/cm_location?' .'w='.$w.'&o='.$o.'&l='.$l."&ctg=".$ctg) ->addHeader('Authorization', $auth)->send();
The response data is encoded in JSON. Category attributes (ending with "_wxyz" such as "_4859") are included as shown in the example below.
{ ... "site_id_":"Site_001", "company_id_":"CO_001", "categorization_id_":"Linux", "linux_core_4859":"linux_core_0104", "linux_version_4859":"linux_version_0104", "memory_gb_7958":"1104", ... }
Additional resources
By accepting you will be accessing a service provided by a third-party external to https://calemeam.com/