publicstaticfinalStringSYS_ADMIN_AUTHORITY_ONLY=" Available for users with System Administrator ('SYS_ADMIN') authority only.";
@Autowired
privateMailServicemailService;
@ -63,7 +62,7 @@ public class AdminController extends BaseController {
privateUpdateServiceupdateService;
@ApiOperation(value="Get the Administration Settings object using key (getAdminSettings)",
notes="Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error."+SYS_ADMIN_AUTHORITY_ONLY)
notes="Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error."+SYSTEM_AUTHORITY_PARAGRAPH)
@ -86,7 +85,7 @@ public class AdminController extends BaseController {
@ApiOperation(value="Get the Administration Settings object using key (getAdminSettings)",
notes="Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. "+
"The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. "+
"Referencing non-existing Administration Settings Id will cause an error."+SYS_ADMIN_AUTHORITY_ONLY)
"Referencing non-existing Administration Settings Id will cause an error."+SYSTEM_AUTHORITY_PARAGRAPH)
@ -111,7 +111,7 @@ public class AlarmController extends BaseController {
"\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. "
"If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. "+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
@ -138,7 +138,7 @@ public class AlarmController extends BaseController {
}
@ApiOperation(value="Delete Alarm (deleteAlarm)",
notes="Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Deletes the Alarm. Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
@ -212,8 +212,8 @@ 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."
"Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
@ -80,7 +80,8 @@ public class AssetController extends BaseController {
@ApiOperation(value="Get Asset (getAssetById)",
notes="Fetch the Asset object based on the provided Asset Id. "+
"If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. "+
"If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.",produces=MediaType.APPLICATION_JSON_VALUE)
"If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
@ -98,7 +99,8 @@ public class AssetController extends BaseController {
@ApiOperation(value="Get Asset Info (getAssetInfoById)",
notes="Fetch the Asset Info object based on the provided Asset Id. "+
"If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. "+
"If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer. "+ASSET_INFO_DESCRIPTION,produces=MediaType.APPLICATION_JSON_VALUE)
"If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer. "
@ -117,7 +119,7 @@ public class AssetController extends BaseController {
notes="Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address) "+
"The newly created Asset id will be present in the response. "+
"Specify existing Asset id to update the asset. "+
"Referencing non-existing Asset Id will cause 'Not Found' error.",produces=MediaType.APPLICATION_JSON_VALUE)
"Referencing non-existing Asset Id will cause 'Not Found' error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
@ -158,7 +160,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Delete asset (deleteAsset)",
notes="Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.")
notes="Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
@ -187,7 +189,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Assign asset to customer (assignAssetToCustomer)",
notes="Creates assignment of the asset to customer. Customer will be able to query asset afterwards.",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Creates assignment of the asset to customer. Customer will be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
@ -223,7 +225,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Unassign asset from customer (unassignAssetFromCustomer)",
notes="Clears assignment of the asset to customer. Customer will not be able to query asset afterwards.",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Clears assignment of the asset to customer. Customer will not be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
@ -261,7 +263,7 @@ public class AssetController extends BaseController {
@ApiOperation(value="Make asset publicly available (assignAssetToPublicCustomer)",
notes="Asset will be available for non-authorized (not logged-in) users. "+
"This is useful to create dashboards that you plan to share/embed on a publicly available website. "+
"However, users that are logged-in and belong to different tenant will not be able to access the asset.",produces=MediaType.APPLICATION_JSON_VALUE)
"However, users that are logged-in and belong to different tenant will not be able to access the asset."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
notes="Requested asset must be owned by tenant that the user belongs to. "+
"Asset name is an unique property of asset. So it can be used to identify the asset.",produces=MediaType.APPLICATION_JSON_VALUE)
"Asset name is an unique property of asset. So it can be used to identify the asset."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
@ -181,11 +181,16 @@ public abstract class BaseController {
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'";
publicstaticfinalStringRULE_CHAIN_ID_PARAM_DESCRIPTION="A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringWIDGET_BUNDLE_ID_PARAM_DESCRIPTION="A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringWIDGET_TYPE_ID_PARAM_DESCRIPTION="A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringSYSTEM_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'SYS_ADMIN' authority.";
protectedstaticfinalStringSYSTEM_AND_TENANT_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.";
protectedstaticfinalStringSYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.";
protectedstaticfinalStringTENANT_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'TENANT_ADMIN' authority.";
protectedstaticfinalStringTENANT_AND_USER_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.";
protectedstaticfinalStringTENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.";
protectedstaticfinalStringCUSTOMER_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'CUSTOMER_USER' authority.";
protectedstaticfinalStringAVAILABLE_FOR_ANY_AUTHORIZED_USER="\n\nAvailable for any authorized user. ";
protectedstaticfinalStringPAGE_SIZE_DESCRIPTION="Maximum amount of entities in a one page";
protectedstaticfinalStringPAGE_NUMBER_DESCRIPTION="Sequence number of page starting from 0";
@ -196,8 +201,10 @@ public abstract class BaseController {
protectedstaticfinalStringASSET_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the asset name.";
protectedstaticfinalStringDASHBOARD_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the dashboard title.";
protectedstaticfinalStringWIDGET_BUNDLE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the widget bundle title.";
@ -370,8 +379,6 @@ public abstract class BaseController {
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'";
protectedstaticfinalStringADMINISTRATOR_AUTHORITY_ONLY="Available for users with 'Tenant Administrator' authority only.";
@ -122,7 +125,7 @@ public class CustomerController extends BaseController {
notes="Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address) "+
"The newly created Customer Id will be present in the response. "+
"Specify existing Customer Id to update the Customer. "+
"Referencing non-existing Customer Id will cause 'Not Found' error.")
"Referencing non-existing Customer Id will cause 'Not Found' error."+TENANT_AUTHORITY_PARAGRAPH)
notes="Deletes the Customer and all customer Users. All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. Referencing non-existing Customer Id will cause an error.")
notes="Deletes the Customer and all customer Users. "+
"All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. "+
"Referencing non-existing Customer Id will cause an error."+TENANT_AUTHORITY_PARAGRAPH)
@ -290,7 +290,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Update the Dashboard Customers (updateDashboardCustomers)",
notes="Updates the list of Customers that this Dashboard is assigned to. Removes previous assignments to customers that are not in the provided list. "+
"Returns the Dashboard object. Only users with 'TENANT_ADMIN') authority may assign the dashboards to customers.",
"Returns the Dashboard object. "+TENANT_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE,
consumes=MediaType.APPLICATION_JSON_VALUE)
@ -365,7 +365,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Adds the Dashboard Customers (addDashboardCustomers)",
notes="Adds the list of Customers to the existing list of assignments for the Dashboard. Keeps previous assignments to customers that are not in the provided list. "+
"Returns the Dashboard object. Only users with 'TENANT_ADMIN') authority may assign the dashboards to customers.",
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE,
consumes=MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('TENANT_ADMIN')")
@ -417,7 +417,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Remove the Dashboard Customers (removeDashboardCustomers)",
notes="Removes the list of Customers from the existing list of assignments for the Dashboard. Keeps other assignments to customers that are not in the provided list. "+
"Returns the Dashboard object. Only users with 'TENANT_ADMIN') authority may assign the dashboards to customers.",
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE,
consumes=MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('TENANT_ADMIN')")
@ -473,7 +473,7 @@ public class DashboardController extends BaseController {
"Be aware that making the dashboard public does not mean that it automatically makes all devices and assets you use in the dashboard to be public."+
"Use [assign Asset to Public Customer](#!/asset-controller/assignAssetToPublicCustomerUsingPOST) and "+
"[assign Device to Public Customer](#!/device-controller/assignDeviceToPublicCustomerUsingPOST) for this purpose. "+
"Returns the Dashboard object. Only users with 'TENANT_ADMIN') authority may assign the dashboards to customers.",
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -505,7 +505,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Unassign the Dashboard from Public Customer (unassignDashboardFromPublicCustomer)",
notes="Unassigns the dashboard from a special, auto-generated 'Public' Customer. Once unassigned, unauthenticated users may no longer browse the dashboard. "+
"Returns the Dashboard object. Only users with 'TENANT_ADMIN') authority may assign the dashboards to customers.",
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -641,8 +641,7 @@ public class DashboardController extends BaseController {
notes="Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. "+
"If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. "+
"If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. "
+DASHBOARD_DEFINITION+" "+
"Only users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority should use this method.",
@ -679,7 +678,7 @@ public class DashboardController extends BaseController {
notes="Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. "+
"If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. "+
"If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. "+
"Only users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority should use this method.",
@ -714,7 +713,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)",
notes="Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. "+
"Only users with 'TENANT_ADMIN' authority may use this method.",
@ -139,11 +141,12 @@ public class DeviceController extends BaseController {
@ApiOperation(value="Create Or Update Device (saveDevice)",
notes="Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"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."+
"\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.")
"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."+
"\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."
notes="Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.")
notes="Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error."+TENANT_AUTHORITY_PARAGRAPH)
notes="If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.")
notes="If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
"Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. "+
"Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. "+
"The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.")
"The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'."+TENANT_AUTHORITY_PARAGRAPH)
@ -538,7 +541,7 @@ public class DeviceController extends BaseController {
}
@ApiOperation(value="Get Devices By Ids (getDevicesByIds)",
notes="Requested devices must be owned by tenant or assigned to customer which user is performing the request. ")
notes="Requested devices must be owned by tenant or assigned to customer which user is performing the request. "+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
notes="Returns a set of unique device profile names based on devices that are either owned by the tenant or assigned to the customer which user is performing the request.")
notes="Returns a set of unique device profile names based on devices that are either owned by the tenant or assigned to the customer which user is performing the request."
@ -137,7 +137,8 @@ public class EdgeController extends BaseController {
"The newly created edge id will be present in the response. "+
"Specify existing Edge id to update the edge. "+
"Referencing non-existing Edge Id will cause 'Not Found' error."+
"\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.",
"\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes."
notes="Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.",
notes="Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request."
notes="Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.")
notes="Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge."+TENANT_AUTHORITY_PARAGRAPH)
@ -488,7 +488,7 @@ public class EntityQueryController extends BaseController {
"\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:"+
"Allows to run complex queries over platform entities (devices, assets, customers, etc) "+
@ -571,7 +571,7 @@ public class EntityQueryController extends BaseController {
"\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:"+
ENTITY_FILTERS+
KEY_FILTERS+
TENANT_AND_USER_AUTHORITY_PARAGRAPH;
TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH;
privatestaticfinalStringALARM_DATA_QUERY_DESCRIPTION="This method description defines how Alarm Data Query extends the Entity Data Query. "+
@ -45,7 +45,7 @@ public class OAuth2ConfigTemplateController extends BaseController {
privatestaticfinalStringOAUTH2_CLIENT_REGISTRATION_TEMPLATE_DEFINITION="Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients";
@ApiOperation(value="Create or update OAuth2 client registration template (saveClientRegistrationTemplate)",
@ApiOperation(value="Create or update OAuth2 client registration template (saveClientRegistrationTemplate)"+SYSTEM_AUTHORITY_PARAGRAPH,
@ -91,9 +91,9 @@ public class RpcV2Controller extends AbstractRpcController {
"In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, "+
"the result of this call is the response from device, or 504 Gateway Timeout if device is offline.";
privatestaticfinalStringONE_WAY_RPC_REQUEST_DESCRIPTION="Sends the one-way remote-procedure call (RPC) request to device. "+RPC_REQUEST_DESCRIPTION+ONE_WAY_RPC_RESULT+TENANT_AND_USER_AUTHORITY_PARAGRAPH;
privatestaticfinalStringONE_WAY_RPC_REQUEST_DESCRIPTION="Sends the one-way remote-procedure call (RPC) request to device. "+RPC_REQUEST_DESCRIPTION+ONE_WAY_RPC_RESULT+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH;
privatestaticfinalStringTWO_WAY_RPC_REQUEST_DESCRIPTION="Sends the two-way remote-procedure call (RPC) request to device. "+RPC_REQUEST_DESCRIPTION+TWO_WAY_RPC_RESULT+TENANT_AND_USER_AUTHORITY_PARAGRAPH;
privatestaticfinalStringTWO_WAY_RPC_REQUEST_DESCRIPTION="Sends the two-way remote-procedure call (RPC) request to device. "+RPC_REQUEST_DESCRIPTION+TWO_WAY_RPC_RESULT+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH;
@ -147,7 +147,7 @@ public class RpcV2Controller extends AbstractRpcController {
}
}
@ApiOperation(value="Get persistent RPC requests",notes="Allows to query RPC calls for specific device using pagination."+TENANT_AND_USER_AUTHORITY_PARAGRAPH)
@ApiOperation(value="Get persistent RPC requests",notes="Allows to query RPC calls for specific device using pagination."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
notes="Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.")
notes="Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. "+
"Referencing rule chain that is used in the device profiles will cause an error."+TENANT_AUTHORITY_PARAGRAPH)
@ -113,12 +116,43 @@ public class TelemetryController extends BaseController {
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.";
privatestaticfinalStringATTRIBUTE_DATA_CLASS_DESCRIPTION="AttributeData class represents information regarding a particular attribute and includes the next parameters: 'lastUpdatesTs' - a long value representing the timestamp of the last attribute modification in milliseconds. 'key' - attribute key name, and 'value' - attribute value.";
privatestaticfinalStringGET_ALL_ATTRIBUTES_BASE_DESCRIPTION="Returns a JSON structure that represents a list of AttributeData class objects for the selected entity based on the specified comma-separated list of attribute key names. "+ATTRIBUTE_DATA_CLASS_DESCRIPTION;
privatestaticfinalStringGET_ALL_ATTRIBUTES_BY_SCOPE_BASE_DESCRIPTION="Returns a JSON structure that represents a list of AttributeData class objects for the selected entity based on the attributes scope selected and a comma-separated list of attribute key names. "+ATTRIBUTE_DATA_CLASS_DESCRIPTION;
privatestaticfinalStringTS_DATA_CLASS_DESCRIPTION="TsData class is a timeseries data point for specific telemetry key that includes 'value' - object value, and 'ts' - a long value representing timestamp in milliseconds for this value. ";
privatestaticfinalStringTELEMETRY_KEYS_BASE_DESCRIPTION="A string value representing the comma-separated list of telemetry keys.";
privatestaticfinalStringTELEMETRY_KEYS_DESCRIPTION=TELEMETRY_KEYS_BASE_DESCRIPTION+" 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. However, you need to specify whatever value cause scope is a path variable.";
privatestaticfinalStringTELEMETRY_JSON_REQUEST_DESCRIPTION="A string value representing the json object. For example, '{\"key\":\"value\"}' or '{\"ts\":1527863043000,\"values\":{\"key1\":\"value1\",\"key2\":\"value2\"}}' or [{\"ts\":1527863043000,\"values\":{\"key1\":\"value1\",\"key2\":\"value2\"}}, {\"ts\":1527863053000,\"values\":{\"key1\":\"value3\",\"key2\":\"value4\"}}]";
privatestaticfinalStringSTRICT_DATA_TYPES_DESCRIPTION="A boolean value to specify if values of selected telemetry keys will represent string values(by default) or use strict data type.";
privatestaticfinalStringINVALID_ENTITY_ID_OR_ENTITY_TYPE_DESCRIPTION="Referencing a non-existing entity Id or invalid entity type will cause an error. ";
privatestaticfinalStringSAVE_ENTITY_ATTRIBUTES_DESCRIPTION="Creates or updates the entity attributes based on entity id, entity type, specified attributes scope "+
"and request payload that represents a JSON object with key-value format of attributes to create or update. "+
"For example, '{\"temperature\": 26}'. Key is a unique parameter and cannot be overwritten. Only value can be overwritten for the key. ";
privatestaticfinalStringSAVE_ATTIRIBUTES_STATUS_OK="Attribute from the request was created or updated. ";
privatestaticfinalStringINVALID_STRUCTURE_OF_THE_REQUEST="Invalid structure of the request";
privatestaticfinalStringSAVE_ATTIRIBUTES_STATUS_BAD_REQUEST=INVALID_STRUCTURE_OF_THE_REQUEST+" or invalid attributes scope provided.";
privatestaticfinalStringSAVE_ENTITY_ATTRIBUTES_STATUS_OK="Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED', "+
"and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.";
privatestaticfinalStringSAVE_ENTITY_ATTRIBUTES_STATUS_UNAUTHORIZED="User is not authorized to save entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.";
privatestaticfinalStringSAVE_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.";
privatestaticfinalStringSAVE_ENTITY_TIMESERIES_DESCRIPTION="Creates or updates the entity timeseries based on entity id, entity type "+
"and request payload that represents a JSON object with key-value or ts-values format. "+
"For example, '{\"temperature\": 26}' or '{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}', "+
"or JSON array with inner objects inside of ts-values format. "+
"For example, '[{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}]'. "+
"The scope parameter is not used in the API call implementation but should be specified whatever value because it is used as a path variable. ";
privatestaticfinalStringSAVE_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'.";
privatestaticfinalStringSAVE_ENTITY_TIMESERIES_STATUS_UNAUTHORIZED="User is not authorized to save entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant.";
privatestaticfinalStringSAVE_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.";
@Autowired
privateTimeseriesServicetsService;
@ -146,7 +180,11 @@ public class TelemetryController extends BaseController {
}
@ApiOperation(value="Get all attribute keys (getAttributeKeys)",
notes="Returns key names for the selected entity.")
notes="Returns a list of all attribute key names for the selected entity. "+
"In the case of device entity specified, a response will include merged attribute key names list from each scope: "+
notes="Returns JSON array of AttributeData objects for the selected entity.")
notes=GET_ALL_ATTRIBUTES_BASE_DESCRIPTION+" If 'keys' parameter is omitted, AttributeData class objects will be added to the response for all existing keys of the selected entity. "+
notes="Returns JSON object with mapping timeseries keys to JSON arrays of TsData objects based on specified filters for the selected entity.")
notes="Returns a JSON structure that represents a Map, where the map key is a telemetry key name "+
"and map value - is a list of TsData class objects. "+TS_DATA_CLASS_DESCRIPTION+
"This method allows us to group original data into intervals and aggregate it using one of the aggregation methods or just limit the number of TsData objects to fetch for each key specified. "+
"See the desription of the request parameters for more details. "+
"The result can also be sorted in ascending or descending order. "
@ApiResponse(code=401,message="User is not authorized to save device attributes for selected device. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
"Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace."),
notes="Delete timeseries in the specified time range for selected entity.")
notes="Delete timeseries for selected entity based on entity id, entity type, keys "+
"and removal time range. To delete all data for keys parameter 'deleteAllDataForKeys' should be set to true, "+
"otherwise, will be deleted data that is in range of the selected time interval. "+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(value={
@ApiResponse(code=200,message="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(code=400,message="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(code=401,message="User is not authorized to delete entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="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."),
@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.")
@ApiParam(value="If the parameter is set to true, the latest telemetry will be rewritten in case that current latest value was removed, otherwise, in case that parameter is set to false the new latest value will not set.")
notes="Delete attributes of specified scope for selected device.")
notes="Delete device attributes from the specified attributes scope based on device id and a list of keys to delete. "+
"Selected keys will be deleted only if there are exist in the specified attribute scope. Referencing a non-existing device Id will cause an error"+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(value={
@ApiResponse(code=200,message="Device attributes was removed for the selected keys in the request. "+
"Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED'."),
@ApiResponse(code=400,message="Platform returns a bad request in case if keys or scope are not specified."),
@ApiResponse(code=401,message="User is not authorized to delete device attributes for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
"Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace."),
notes="Delete attributes of specified scope for selected entity.")
notes="Delete entity attributes from the specified attributes scope based on entity id, entity type and a list of keys to delete. "+
"Selected keys will be deleted only if there are exist in the specified attribute scope."+INVALID_ENTITY_ID_OR_ENTITY_TYPE_DESCRIPTION+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,
produces=MediaType.APPLICATION_JSON_VALUE)
@ApiResponses(value={
@ApiResponse(code=200,message="Entity attributes was removed for the selected keys in the request. "+
"Platform creates an audit log event about entity attributes removal with action type 'ATTRIBUTES_DELETED'."),
@ApiResponse(code=400,message="Platform returns a bad request in case if keys or scope are not specified."),
@ApiResponse(code=401,message="User is not authorized to delete entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
"Platform creates an audit log event about entity attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace."),
@ -112,10 +123,16 @@ public class UserController extends BaseController {
returnuserTokenAccessEnabled;
}
@ApiOperation(value="Get User Token (getUserToken)",
notes="Returns the token of the User based on the provided User Id. "+
"If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. "+
"If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. ")
@ApiOperation(value="Save Or update User (saveUser)",
notes="Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"The newly created User Id will be present in the response. "+
"Specify existing User Id to update the device. "+
"Referencing non-existing User Id will cause 'Not Found' error."+
"\n\nDevice email is unique for entire platform setup.")
@ -188,10 +209,13 @@ public class UserController extends BaseController {
}
}
@ApiOperation(value="Send or re-send the activation email",
notes="Force send the activation email to the user. Useful to resend the email if user has accidentally deleted it. "+SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
@ -331,11 +388,16 @@ public class UserController extends BaseController {
}
}
@ApiOperation(value="Enable/Disable User credentials (setUserCredentialsEnabled)",
notes="Enables or Disables user credentials. Useful when you would like to block user account without deleting it. "+PAGE_DATA_PARAMETERS+TENANT_AUTHORITY_PARAGRAPH)
privatestaticfinalStringWIDGET_TYPE_DESCRIPTION="Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory.";
privatestaticfinalStringWIDGET_TYPE_DETAILS_DESCRIPTION="Widget Type Details extend Widget Type and add image and description properties. "+
"Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. ";
privatestaticfinalStringWIDGET_TYPE_INFO_DESCRIPTION="Widget Type Info is a lightweight object that represents Widget Type but does not contain the heavyweight widget descriptor JSON";
@ApiOperation(value="Get Widget Type Details (getWidgetTypeById)",
notes="Get the Widget Type Details based on the provided Widget Type Id. "+WIDGET_TYPE_DETAILS_DESCRIPTION+SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
@ -61,10 +73,21 @@ public class WidgetTypeController extends BaseController {
}
}
@ApiOperation(value="Create Or Update Widget Type (saveWidgetType)",
notes="Create or update the Widget Type. "+WIDGET_TYPE_DESCRIPTION+" "+
"When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"The newly created Widget Type Id will be present in the response. "+
"Specify existing Widget Type id to update the Widget Type. "+
"Referencing non-existing Widget Type Id will cause 'Not Found' error."+
"\n\nWidget Type alias is unique in the scope of Widget Bundle. "+
"Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority."
@ -101,11 +128,15 @@ public class WidgetTypeController extends BaseController {
}
}
@ApiOperation(value="Get all Widget types for specified Bundle (getBundleWidgetTypes)",
notes="Returns an array of Widget Type objects that belong to specified Widget Bundle."+WIDGET_TYPE_DESCRIPTION+" "+SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
@ -120,11 +151,15 @@ public class WidgetTypeController extends BaseController {
}
}
@ApiOperation(value="Get all Widget types details for specified Bundle (getBundleWidgetTypes)",
notes="Returns an array of Widget Type Details objects that belong to specified Widget Bundle."+WIDGET_TYPE_DETAILS_DESCRIPTION+" "+SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
privatestaticfinalStringWIDGET_BUNDLE_DESCRIPTION="Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. ";
@ -57,10 +65,21 @@ public class WidgetsBundleController extends BaseController {
}
}
@ApiOperation(value="Create Or Update Widget Bundle (saveWidgetsBundle)",
notes="Create or update the Widget Bundle. "+WIDGET_BUNDLE_DESCRIPTION+" "+
"When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"The newly created Widget Bundle Id will be present in the response. "+
"Specify existing Widget Bundle id to update the Widget Bundle. "+
"Referencing non-existing Widget Bundle Id will cause 'Not Found' error."+
"\n\nWidget Bundle alias is unique in the scope of tenant. "+
"Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority."
@ -119,6 +150,8 @@ public class WidgetsBundleController extends BaseController {
}
}
@ApiOperation(value="Get all Widget Bundles (getWidgetsBundles)",
notes="Returns an array of Widget Bundle objects that are available for current user."+WIDGET_BUNDLE_DESCRIPTION+" "+AVAILABLE_FOR_ANY_AUTHORIZED_USER)