@ -75,10 +82,17 @@ 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)
@ -75,10 +77,15 @@ public class AssetController extends BaseController {
publicstaticfinalStringASSET_ID="assetId";
@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)
@ -88,10 +95,15 @@ 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)
@ -101,10 +113,15 @@ public class AssetController extends BaseController {
}
}
@ApiOperation(value="Create Or Update Asset (saveAsset)",
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)
@ -374,10 +443,13 @@ public class AssetController extends BaseController {
}
}
@ApiOperation(value="Get Assets By Ids (getAssetsByIds)",
notes="Requested assets must be owned by tenant or assigned to customer which user is performing the request. ",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Returns a set of unique asset types based on assets that are either owned by the tenant or assigned to the customer which user is performing the request.",produces=MediaType.APPLICATION_JSON_VALUE)
@ -438,11 +516,15 @@ public class AssetController extends BaseController {
}
}
@ApiOperation(value="Assign asset to edge (assignAssetToEdge)",
notes="Creates assignment of an existing asset to an instance of The Edge. "+
"The Edge is a software product for edge computing. "+
"It allows bringing data analysis and management to the edge, while seamlessly synchronizing with the platform server (cloud). ",produces=MediaType.APPLICATION_JSON_VALUE)
@ -85,6 +96,8 @@ public class AuthController extends BaseController {
}
}
@ApiOperation(value="Logout (logout)",
notes="Special API call to record the 'logout' of the user to the Audit Logs. Since platform uses [JWT](https://jwt.io/), the actual logout is the procedure of clearing the [JWT](https://jwt.io/) token on the client side. ")
@ -92,13 +105,17 @@ public class AuthController extends BaseController {
logLogoutAction(request);
}
@ApiOperation(value="Change password for current User (changePassword)",
notes="Change the password for the User which credentials are used to perform this REST API call. Be aware that previously generated [JWT](https://jwt.io/) tokens will be still valid until they expire.")
@ -135,8 +154,13 @@ public class AuthController extends BaseController {
}
}
@ApiOperation(value="Check Activate User Token (checkActivateToken)",
notes="Checks the activation token and forwards user to 'Create Password' page. "+
"If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Create Password' page and same 'activateToken' specified in the URL parameters. "+
notes="Checks the password reset token and forwards user to 'Reset Password' page. "+
"If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Reset Password' page and same 'resetToken' specified in the URL parameters. "+
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. "+
"See the 'Model' tab of the Response Class for more details. ";
publicstaticfinalStringDASHBOARD_ID_PARAM_DESCRIPTION="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringDEVICE_ID_PARAM_DESCRIPTION="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringDEVICE_PROFILE_ID_DESCRIPTION="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringTENANT_ID_PARAM_DESCRIPTION="A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringEDGE_ID_PARAM_DESCRIPTION="A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringCUSTOMER_ID_PARAM_DESCRIPTION="A string value representing the customer 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'";
protectedfinalStringPAGE_SIZE_DESCRIPTION="Maximum amount of entities in a one page";
protectedfinalStringPAGE_NUMBER_DESCRIPTION="Sequence number of page starting from 0";
protectedfinalStringDEVICE_TYPE_DESCRIPTION="Device type as the name of the device profile";
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. ";
protectedfinalStringDEVICE_NAME_DESCRIPTION="A string value representing the Device name.";
protectedfinalStringASSET_NAME_DESCRIPTION="A string value representing the Asset name.";
publicstaticfinalStringCUSTOMER_SECURITY_CHECK="If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. "+
"If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.";
@ -102,10 +118,15 @@ public class CustomerController extends BaseController {
}
}
@ApiOperation(value="Create or update Customer (saveCustomer)",
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.")
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.")
publicstaticfinalStringDASHBOARD_INFO_DEFINITION="The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.";
publicstaticfinalStringDASHBOARD_DEFINITION="The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).";
publicstaticfinalStringHIDDEN_FOR_MOBILE="Exclude dashboards that are hidden for mobile";
@Value("${dashboard.max_datapoints_limit}")
privatelongmaxDatapointsLimit;
@ApiOperation(value="Get server time (getServerTime)",
notes="Get the server time (milliseconds since January 1, 1970 UTC). "+
"Used to adjust view of the dashboards according to the difference between browser and server time.")
@ -113,10 +138,20 @@ public class DashboardController extends BaseController {
}
}
@ApiOperation(value="Create Or Update Dashboard (saveDashboard)",
notes="Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)."+
"The newly created Dashboard id will be present in the response. "+
"Specify existing Dashboard id to update the dashboard. "+
"Referencing non-existing dashboard Id will cause 'Not Found' error. "+
"Only users with 'TENANT_ADMIN') authority may create the dashboards.",
@ -235,11 +288,20 @@ 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.",
@ -301,11 +363,19 @@ 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.",
@ -345,11 +415,19 @@ 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.",
@ -415,10 +503,16 @@ 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.",
@ -512,6 +637,13 @@ public class DashboardController extends BaseController {
}
}
@ApiOperation(value="Get Home Dashboard (getHomeDashboard)",
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.",
@ -543,6 +675,12 @@ public class DashboardController extends BaseController {
}
}
@ApiOperation(value="Get Home Dashboard Info (getHomeDashboardInfo)",
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.",
@ -574,6 +712,10 @@ 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.",
@ -123,11 +136,18 @@ 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.")
"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'.")
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.")
@ -86,6 +108,7 @@ public class DashboardInfo extends SearchTextBased<DashboardId> implements HasNa
this.assignedCustomers=assignedCustomers;
}
@ApiModelProperty(position=6,value="Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.",readOnly=true)
publicbooleanisMobileHide(){
returnmobileHide;
}
@ -94,6 +117,7 @@ public class DashboardInfo extends SearchTextBased<DashboardId> implements HasNa
this.mobileHide=mobileHide;
}
@ApiModelProperty(position=7,value="Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications",readOnly=true)
publicIntegergetMobileOrder(){
returnmobileOrder;
}
@ -152,6 +176,7 @@ public class DashboardInfo extends SearchTextBased<DashboardId> implements HasNa
}
}
@ApiModelProperty(position=4,value="Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.",readOnly=true)
@ApiModelProperty(position=13,value="Title of the Customer that owns the device.",readOnly=true)
privateStringcustomerTitle;
@ApiModelProperty(position=14,value="Indicates special 'Public' Customer that is auto-generated to use the devices on public dashboards.",readOnly=true)
privatebooleancustomerIsPublic;
@ApiModelProperty(position=15,value="Name of the corresponding Device Profile.",readOnly=true)
@ApiModelProperty(position=9,value="Title of the Customer that owns the asset.",readOnly=true)
privateStringcustomerTitle;
@ApiModelProperty(position=10,value="Indicates special 'Public' Customer that is auto-generated to use the assets on public dashboards.",readOnly=true)
@ApiModelProperty(position=1,value="Array of the entities",readOnly=true)
publicList<T>getData(){
returndata;
}
@ApiModelProperty(position=2,value="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria",readOnly=true)
publicintgetTotalPages(){
returntotalPages;
}
@ApiModelProperty(position=3,value="Total number of elements in all available pages",readOnly=true)
publiclonggetTotalElements(){
returntotalElements;
}
@ApiModelProperty(position=4,value="'false' value indicates the end of the result set",readOnly=true)
@ApiModelProperty(position=3,value="Type of the Rule Node",readOnly=true)
@Getter@SetterprivateComponentTypetype;
@ApiModelProperty(position=4,value="Scope of the Rule Node. Always set to 'TENANT', since no rule chains on the 'SYSTEM' level yet.",readOnly=true,allowableValues="TENANT",example="TENANT")
@Getter@SetterprivateComponentScopescope;
@ApiModelProperty(position=5,value="Name of the Rule Node. Taken from the @RuleNode annotation.",readOnly=true,example="Custom Rule Node")
@Getter@SetterprivateStringname;
@ApiModelProperty(position=6,value="Full name of the Java class that implements the Rule Engine Node interface.",readOnly=true,example="com.mycompany.CustomRuleNode")
@Getter@SetterprivateStringclazz;
@ApiModelProperty(position=7,value="Complex JSON object that represents the Rule Node configuration.",readOnly=true)
@ApiModelProperty(position=1,value="Root entity id to start search from.")
privateUUIDrootId;
@ApiModelProperty(position=2,value="Type of the root entity.")
privateEntityTyperootType;
@ApiModelProperty(position=3,value="Type of the root entity.")
privateEntitySearchDirectiondirection;
@ApiModelProperty(position=4,value="Type of the relation.")
privateRelationTypeGrouprelationTypeGroup;
@ApiModelProperty(position=5,value="Maximum level of the search depth.")
privateintmaxLevel=1;
@ApiModelProperty(position=6,value="Fetch entities that match the last level of search. Useful to find Devices that are strictly 'maxLevel' relations away from the root entity.")