@ -169,6 +169,7 @@ public abstract class BaseController {
publicstaticfinalStringRPC_ID_PARAM_DESCRIPTION="A string value representing the rpc 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_PARAM_DESCRIPTION="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringTENANT_PROFILE_ID_PARAM_DESCRIPTION="A string value representing the tenant 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'";
@ -179,6 +180,8 @@ public abstract class BaseController {
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'";
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.";
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.";
@ -193,6 +196,8 @@ public abstract class BaseController {
protectedstaticfinalStringDASHBOARD_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the dashboard title.";
@ -83,10 +95,18 @@ public class TenantController extends BaseController {
}
}
@ApiOperation(value="Create Or update Tenant (saveTenant)",
notes="Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"Default Rule Chain and Device profile are also generated for the new tenants automatically. "+
"The newly created Tenant Id will be present in the response. "+
"Specify existing Tenant Id id to update the Tenant. "+
"Referencing non-existing Tenant Id will cause 'Not Found' error."+SYSTEM_AUTHORITY_PARAGRAPH)
notes="Deletes the tenant, it's customers, rule chains, devices and all other related entities. Referencing non-existing tenant Id will cause an error."+SYSTEM_AUTHORITY_PARAGRAPH)
@ -124,14 +148,21 @@ public class TenantController extends BaseController {
}
}
@ApiOperation(value="Get Tenants (getTenants)",notes="Returns a page of tenants registered in the platform. "+PAGE_DATA_PARAMETERS+SYSTEM_AUTHORITY_PARAGRAPH)
@ -81,10 +95,19 @@ public class TenantProfileController extends BaseController {
}
}
@ApiOperation(value="Create Or update Tenant Profile (saveTenantProfile)",
notes="Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address). "+
"The newly created Tenant Profile Id will be present in the response. "+
"Specify existing Tenant Profile Id id to update the Tenant Profile. "+
"Referencing non-existing Tenant Profile Id will cause 'Not Found' error. "+
"Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. "+
notes="Deletes the tenant profile. Referencing non-existing tenant profile Id will cause an error. Referencing profile that is used by the tenants will cause an error. "+SYSTEM_AUTHORITY_PARAGRAPH)
@ -135,14 +166,21 @@ public class TenantProfileController extends BaseController {
}
}
@ApiOperation(value="Get Tenant Profiles (getTenantProfiles)",notes="Returns a page of tenant profiles registered in the platform. "+PAGE_DATA_PARAMETERS+SYSTEM_AUTHORITY_PARAGRAPH)
@ -151,14 +189,22 @@ public class TenantProfileController extends BaseController {
}
}
@ApiOperation(value="Get Tenant Profiles Info (getTenantProfileInfos)",notes="Returns a page of tenant profile info objects registered in the platform. "
@ -76,6 +149,7 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId {
@Override
@JsonProperty(access=Access.READ_ONLY)
@ApiModelProperty(position=4,value="Name of the customer. Read-only, duplicated from title for backward compatibility",example="Company A",readOnly=true)
@ApiModelProperty(position=3,value="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
privatefinalStringimage;
@ApiModelProperty(position=4,value="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.")
privatefinalDashboardIddefaultDashboardId;
@ApiModelProperty(position=5,value="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.")
privatefinalDeviceProfileTypetype;
@ApiModelProperty(position=6,value="Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.")
@ApiModelProperty(position=3,value="Title of the tenant",example="Company A")
privateStringtitle;
@NoXss
@ApiModelProperty(position=5,value="Geo region of the tenant",example="North America")
privateStringregion;
@ApiModelProperty(position=6,required=true,value="JSON object with Tenant Profile Id")
privateTenantProfileIdtenantProfileId;
publicTenant(){
@ -63,6 +71,7 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId {
}
@Override
@ApiModelProperty(position=4,value="Name of the tenant. Read-only, duplicated from title for backward compatibility",example="Company A",readOnly=true)
@ApiModelProperty(position=3,value="Name of the tenant profile",example="High Priority Tenants")
privateStringname;
@NoXss
@ApiModelProperty(position=4,value="Description of the tenant profile",example="Any text")
privateStringdescription;
@ApiModelProperty(position=5,value="Default Tenant profile to be used.",example="true")
privatebooleanisDefault;
@ApiModelProperty(position=6,value="If enabled, will push all messages related to this tenant and processed by core platform services into separate queue. "+
"Useful for complex microservices deployments, to isolate processing of the data for specific tenants",example="true")
privatebooleanisolatedTbCore;
@ApiModelProperty(position=7,value="If enabled, will push all messages related to this tenant and processed by the rule engine into separate queue. "+
"Useful for complex microservices deployments, to isolate processing of the data for specific tenants",example="true")
privatebooleanisolatedTbRuleEngine;
@ApiModelProperty(position=8,value="Complex JSON object that contains profile settings: max devices, max assets, rate limits, etc.")
privatetransientTenantProfileDataprofileData;
@JsonIgnore
privatebyte[]profileDataBytes;
@ -65,6 +76,21 @@ public class TenantProfile extends SearchTextBased<TenantProfileId> implements H