@ -793,7 +793,7 @@ public class ControllerConstants {
" * 'SHARED_ATTRIBUTE' - used for shared attributes; \n"+
" * 'SERVER_ATTRIBUTE' - used for server attributes; \n"+
" * 'ATTRIBUTE' - used for any of the above; \n"+
" * 'TIME_SERIES' - used for time-series values; \n"+
" * 'TIME_SERIES' - used for timeseries values; \n"+
" * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n"+
" * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n"+
"\n\n Let's review the example:\n\n"+
@ -904,7 +904,7 @@ public class ControllerConstants {
protectedstaticfinalStringKEY_FILTERS=
"\n\n # Key Filters"+
"\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time-series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. "+
"\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest timeseries value. The filter is defined using 'key', 'valueType' and 'predicate' objects. "+
"Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. "+
"The example below checks that temperature of the entity is above 20 degrees:"+
"\n\n"+MARKDOWN_CODE_BLOCK_START+
@ -935,7 +935,7 @@ public class ControllerConstants {
"For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\""+
"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against "+
"For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and timeseries field 'batteryLevel' > 40\"."+
"For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and timeseries field 'batteryLevel' > 40\"."+
"\n\nLet's review the example:"+
"\n\n"+MARKDOWN_CODE_BLOCK_START+
"{\n"+
@ -970,13 +970,13 @@ public class ControllerConstants {
"For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and timeseries field 'batteryLevel' > 40\"."+
"For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and timeseries field 'batteryLevel' > 40\"."+
"\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity."+
"\n\nThe **page link** contains information about the page to fetch and the sort ordering."+
"\n\nLet's review the example:"+
@ -1054,7 +1054,7 @@ public class ControllerConstants {
protectedstaticfinalStringALARM_DATA_QUERY_DESCRIPTION="This method description defines how Alarm Data Query extends the Entity Data Query. "+
"See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'."+
"\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. "+
"Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time-series fields to return the result. "+
"Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest timeseries fields to return the result. "+
"\n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. "+
"The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: "+
"\n\n"+MARKDOWN_CODE_BLOCK_START+
@ -1175,7 +1175,7 @@ public class ControllerConstants {
"Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n"+
" * 'ATTRIBUTE' - used for attributes values;\n"+
" * 'TIME_SERIES' - used for time-series values;\n"+
" * 'TIME_SERIES' - used for timeseries values;\n"+
" * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n"+
" * 'CONSTANT' - constant value specified."+NEW_LINE+"Let's review the example:"+NEW_LINE+
MARKDOWN_CODE_BLOCK_START+
@ -1293,7 +1293,7 @@ public class ControllerConstants {
@ -1606,7 +1606,7 @@ public class ControllerConstants {
protectedstaticfinalStringATTRIBUTES_JSON_REQUEST_DESCRIPTION="A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.";
protectedstaticfinalStringTELEMETRY_KEYS_BASE_DESCRIPTION="A string value representing the comma-separated list of telemetry keys.";
protectedstaticfinalStringTELEMETRY_KEYS_DESCRIPTION=TELEMETRY_KEYS_BASE_DESCRIPTION+" If keys are not selected, the result will return all latest timeseries. For example, 'temperature,humidity'.";
protectedstaticfinalStringTELEMETRY_KEYS_DESCRIPTION=TELEMETRY_KEYS_BASE_DESCRIPTION+" If keys are not selected, the result will return all latest timeseries. For example, 'temperature,humidity'.";
protectedstaticfinalStringTELEMETRY_SCOPE_DESCRIPTION="Value is deprecated, reserved for backward compatibility and not used in the API call implementation. Specify any scope for compatibility";
protectedstaticfinalStringTELEMETRY_JSON_REQUEST_DESCRIPTION="A JSON with the telemetry values. See API call description for more details.";
@ -1622,11 +1622,11 @@ public class ControllerConstants {
protectedstaticfinalStringSAVE_ENTITY_ATTRIBUTES_STATUS_UNAUTHORIZED="User is not authorized to save entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.";
protectedstaticfinalStringSAVE_ENTITY_ATTRIBUTES_STATUS_INTERNAL_SERVER_ERROR="The exception was thrown during processing the request. "+
"Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.";
protectedstaticfinalStringSAVE_ENTITY_TIMESERIES_STATUS_OK="Timeseries from the request was created or updated. "+
"Platform creates an audit log event about entity timeseries updates with action type 'TIMESERIES_UPDATED'.";
protectedstaticfinalStringSAVE_ENTITY_TIMESERIES_STATUS_UNAUTHORIZED="User is not authorized to save entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant.";
protectedstaticfinalStringSAVE_ENTITY_TIMESERIES_STATUS_OK="Timeseries from the request was created or updated. "+
"Platform creates an audit log event about entity timeseries updates with action type 'TIMESERIES_UPDATED'.";
protectedstaticfinalStringSAVE_ENTITY_TIMESERIES_STATUS_UNAUTHORIZED="User is not authorized to save entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant.";
protectedstaticfinalStringSAVE_ENTITY_TIMESERIES_STATUS_INTERNAL_SERVER_ERROR="The exception was thrown during processing the request. "+
"Platform creates an audit log event about entity timeseries updates with action type 'TIMESERIES_UPDATED' that includes an error stacktrace.";
"Platform creates an audit log event about entity timeseries updates with action type 'TIMESERIES_UPDATED' that includes an error stacktrace.";
protectedstaticfinalStringENTITY_ATTRIBUTE_SCOPES_TEMPLATE=" List of possible attribute scopes depends on the entity type: "+
"\n\n * SERVER_SCOPE - supported for all entity types;"+
notes="Get a set of unique timeseries keys used by devices that belong to specified profile. "+
"If profile is not set returns a list of unique keys among all profiles. "+
"The call is used for auto-complete in the UI forms. "+
"The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. "+
@Parameter(description="A string value representing the timezone that will be used to calculate exact timestamps for 'WEEK', 'WEEK_ISO', 'MONTH' and 'QUARTER' interval types.")
@ApiOperation(value="Delete entity time-series data (deleteEntityTimeseries)",
notes="Delete time-series for selected entity based on entity id, entity type and keys."+
" Use 'deleteAllDataForKeys' to delete all time-series data."+
@ApiOperation(value="Delete entity timeseries data (deleteEntityTimeseries)",
notes="Delete timeseries for selected entity based on entity id, entity type and keys."+
" Use 'deleteAllDataForKeys' to delete all timeseries data."+
" Use 'startTs' and 'endTs' to specify time-range instead. "+
" Use 'deleteLatest' to delete latest value (stored in separate table for performance) if the value's timestamp matches the time-range. "+
" Use 'rewriteLatestIfDeleted' to rewrite latest value (stored in separate table for performance) if the value's timestamp matches the time-range and 'deleteLatest' param is true."+
" The replacement value will be fetched from the 'time-series' table, and its timestamp will be the most recent one before the defined time-range. "+
" The replacement value will be fetched from the 'timeseries' table, and its timestamp will be the most recent one before the defined time-range. "+
TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
@ApiResponses(value={
@ApiResponse(responseCode="200",description="Timeseries for the selected keys in the request was removed. "+
"Platform creates an audit log event about entity timeseries removal with action type 'TIMESERIES_DELETED'."),
@ApiResponse(responseCode="200",description="Timeseries for the selected keys in the request was removed. "+
"Platform creates an audit log event about entity timeseries removal with action type 'TIMESERIES_DELETED'."),
@ApiResponse(responseCode="400",description="Platform returns a bad request in case if keys list is empty or start and end timestamp values is empty when deleteAllDataForKeys is set to false."),
@ApiResponse(responseCode="401",description="User is not authorized to delete entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="401",description="User is not authorized to delete entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="500",description="The exception was thrown during processing the request. "+
"Platform creates an audit log event about entity timeseries removal with action type 'TIMESERIES_DELETED' that includes an error stacktrace."),
"Platform creates an audit log event about entity timeseries removal with action type 'TIMESERIES_DELETED' that includes an error stacktrace."),
@ -60,6 +60,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
privatelongendTimeMs;
privateEntityViewIdexternalId;
privateLongversion;
publicEntityView(){
super();
@ -80,6 +81,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
this.startTimeMs=entityView.getStartTimeMs();
this.endTimeMs=entityView.getEndTimeMs();
this.externalId=entityView.getExternalId();
this.version=entityView.getVersion();
}
@Schema(description="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.",accessMode=Schema.AccessMode.READ_ONLY)
@ -102,7 +104,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
@Schema(description="JSON object with the Entity View Id. "+
"Specify this field to update the Entity View. "+
"Referencing non-existing Entity View Id will cause error. "+
"Omit this field to create new Entity View.")
"Omit this field to create new Entity View.")
@Override
publicEntityViewIdgetId(){
returnsuper.getId();
@ -114,7 +116,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
returnsuper.getCreatedTime();
}
@Schema(description="Additional parameters of the device",implementation=com.fasterxml.jackson.databind.JsonNode.class)
@Schema(description="Additional parameters of the device",implementation=com.fasterxml.jackson.databind.JsonNode.class)
@Schema(requiredMode=Schema.RequiredMode.REQUIRED,accessMode=Schema.AccessMode.READ_ONLY,description="The Id is automatically generated during device creation. "+
@ -111,4 +118,5 @@ public class DeviceCredentials extends BaseData<DeviceCredentialsId> implements
@Schema(description="Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled.")
@ -42,8 +42,6 @@ public class WidgetTypeDetails extends WidgetType implements HasName, HasTenantI
@Schema(description="Tags of the widget type")
privateString[]tags;
@Getter
@Setter
privateWidgetTypeIdexternalId;
publicWidgetTypeDetails(){
@ -65,4 +63,5 @@ public class WidgetTypeDetails extends WidgetType implements HasName, HasTenantI