privatestaticfinalStringALARM_SECURITY_CHECK="If the user has the authority of 'Tenant Administrator', the server checks that the originator of alarm is owned by the same tenant. "+
"If the user has the authority of 'Customer User', the server checks that the originator of alarm belongs to the customer. ";
privatestaticfinalStringALARM_QUERY_SEARCH_STATUS_DESCRIPTION="A string value representing one of the AlarmSearchStatus enumeration value";
privatestaticfinalStringALARM_QUERY_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status";
privatestaticfinalStringALARM_QUERY_START_TIME_DESCRIPTION="The start timestamp(milliseconds) of the search time range over the alarm object field: 'createdTime'.";
privatestaticfinalStringALARM_QUERY_END_TIME_DESCRIPTION="The end timestamp(milliseconds) of the search time range over the alarm object field: 'createdTime'.";
privatestaticfinalStringALARM_QUERY_FETCH_ORIGINATOR_DESCRIPTION="A boolean value to specify if the alarm originator name will be "+
"filled in the AlarmInfo object field: 'originatorName' or will returns as null.";
@ApiOperation(value="Create or update Alarm (saveAlarm)",
notes="Creates or Updates the Alarm. "+
"When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. "+
"Referencing non-existing Alarm Id will cause 'Not Found' error. "+
"\n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. "+
"For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. "+
"If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). "+
"If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. "
@ -169,21 +210,36 @@ public class AlarmController extends BaseController {
}
}
@ApiOperation(value="Get Alarms (getAlarms)",
notes="Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. "+
notes="Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). "+
"Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error."
@ -157,6 +157,8 @@ public abstract class BaseController {
publicstaticfinalStringCUSTOMER_ID="customerId";
publicstaticfinalStringTENANT_ID="tenantId";
publicstaticfinalStringENTITY_ID="entityId";
publicstaticfinalStringENTITY_TYPE="entityType";
publicstaticfinalStringPAGE_DATA_PARAMETERS="You can specify parameters to filter the results. "+
"The result is wrapped with PageData object that allows you to iterate over result set using pagination. "+
@ -169,6 +171,10 @@ public abstract class BaseController {
publicstaticfinalStringCUSTOMER_ID_PARAM_DESCRIPTION="A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringUSER_ID_PARAM_DESCRIPTION="A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringASSET_ID_PARAM_DESCRIPTION="A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringALARM_ID_PARAM_DESCRIPTION="A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringENTITY_ID_PARAM_DESCRIPTION="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringENTITY_TYPE_PARAM_DESCRIPTION="A string value representing the entity type. For example, 'DEVICE'";
protectedfinalStringPAGE_SIZE_DESCRIPTION="Maximum amount of entities in a one page";
protectedfinalStringPAGE_NUMBER_DESCRIPTION="Sequence number of page starting from 0";
@ -179,22 +185,29 @@ public abstract class BaseController {
protectedfinalStringDASHBOARD_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the dashboard title.";
protectedfinalStringDEVICE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the device name.";
protectedfinalStringCUSTOMER_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the customer title.";
protectedfinalStringEVENT_TEXT_SEARCH_DESCRIPTION="The value is not used in searching.";
protectedfinalStringSORT_PROPERTY_DESCRIPTION="Property of entity to sort by";
protectedfinalStringDEVICE_INFO_DESCRIPTION="Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. ";
protectedfinalStringASSET_INFO_DESCRIPTION="Asset Info is an extension of the default Asset object that contains information about the assigned customer name. ";
protectedstaticfinalStringENTITY_TYPE_DESCRIPTION="A string value representing the entity type. For example, 'DEVICE'";
protectedstaticfinalStringENTITY_ID_DESCRIPTION="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedfinalStringALARM_INFO_DESCRIPTION="Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.";
protectedfinalStringRELATION_INFO_DESCRIPTION="Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ";
protectedfinalStringDEVICE_NAME_DESCRIPTION="A string value representing the Device name.";
protectedfinalStringASSET_NAME_DESCRIPTION="A string value representing the Asset name.";
protectedfinalStringEVENT_START_TIME_DESCRIPTION="Timestamp. Events with creation time before it won't be queried.";
protectedfinalStringEVENT_END_TIME_DESCRIPTION="Timestamp. Events with creation time after it won't be queried.";
protectedstaticfinalStringRELATION_TYPE_PARAM_DESCRIPTION="A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.";
protectedstaticfinalStringRELATION_TYPE_GROUP_PARAM_DESCRIPTION="A string value representing relation type group. For example, 'COMMON'";
@ -141,7 +141,8 @@ public class DeviceController extends BaseController {
"Device credentials are also generated if not provided in the 'accessToken' request parameter. "+
"The newly created device id will be present in the response. "+
"Specify existing Device id to update the device. "+
"Referencing non-existing device Id will cause 'Not Found' error.")
"Referencing non-existing device Id will cause 'Not Found' error."+
"\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.")
privatestaticfinalStringSECURITY_CHECKS_ENTITIES_DESCRIPTION="\n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. "+
"If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. "+
"If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.";
privatestaticfinalStringSECURITY_CHECKS_ENTITY_DESCRIPTION="\n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. "+
"If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. "+
"If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.";
privatestaticfinalStringATTRIBUTES_SCOPE_DESCRIPTION="A string value representing the attributes scope. For example, 'SERVER_SCOPE'.";
privatestaticfinalStringATTRIBUTES_KEYS_DESCRIPTION="A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'.";
privatestaticfinalStringATTRIBUTES_JSON_REQUEST_DESCRIPTION="A string value representing the json object. For example, '{\"key\":\"value\"}'";
privatestaticfinalStringTELEMETRY_KEYS_DESCRIPTION="A string value representing the comma-separated list of timeseries keys. If keys are not selected, the result will return all latest timeseries. For example, 'temp,humidity'.";
privatestaticfinalStringTELEMETRY_SCOPE_DESCRIPTION="Value is not used in the API call implementation";
privatestaticfinalStringTELEMETRY_JSON_REQUEST_DESCRIPTION="A string value representing the json object. For example, '{\"key\":\"value\"}' or '{\"ts\":1527863043000,\"values\":{\"key1\":\"value1\",\"key2\":\"value2\"}}'";
privatestaticfinalStringSTRICT_DATA_TYPES_DESCRIPTION="A boolean value to specify if values of selected timeseries keys will representing a string (by default) or use strict data type.";
@Autowired
privateTimeseriesServicetsService;
@ -133,62 +145,81 @@ public class TelemetryController extends BaseController {
}
}
@ApiOperation(value="Get all attribute keys (getAttributeKeys)",
notes="Returns key names for the selected entity.")
@ApiParam(value="If the parameter is set to true, the latest telemetry will be rewritten if the current latest value was removed, otherwise, the new latest value will not set.")