Commit 991ef278d8947f68d4d293cb94d2f4290dd87585
1 parent
45d49153
Tenant Profile Description improved
Showing
3 changed files
with
55 additions
and
3 deletions
... | ... | @@ -415,7 +415,7 @@ public class EntityQueryController extends BaseController { |
415 | 415 | " ]\n" + |
416 | 416 | "}" + |
417 | 417 | MARKDOWN_CODE_BLOCK_END + |
418 | - "\n\n YOu may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic " + | |
418 | + "\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic " + | |
419 | 419 | "expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). " + |
420 | 420 | "It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. " + |
421 | 421 | "See example below: \n\n" + | ... | ... |
... | ... | @@ -100,7 +100,8 @@ public class TenantController extends BaseController { |
100 | 100 | "Default Rule Chain and Device profile are also generated for the new tenants automatically. " + |
101 | 101 | "The newly created Tenant Id will be present in the response. " + |
102 | 102 | "Specify existing Tenant Id id to update the Tenant. " + |
103 | - "Referencing non-existing Tenant Id will cause 'Not Found' error." + SYSTEM_AUTHORITY_PARAGRAPH) | |
103 | + "Referencing non-existing Tenant Id will cause 'Not Found' error." + | |
104 | + SYSTEM_AUTHORITY_PARAGRAPH) | |
104 | 105 | @PreAuthorize("hasAuthority('SYS_ADMIN')") |
105 | 106 | @RequestMapping(value = "/tenant", method = RequestMethod.POST) |
106 | 107 | @ResponseBody | ... | ... |
... | ... | @@ -100,7 +100,58 @@ public class TenantProfileController extends BaseController { |
100 | 100 | "The newly created Tenant Profile Id will be present in the response. " + |
101 | 101 | "Specify existing Tenant Profile Id id to update the Tenant Profile. " + |
102 | 102 | "Referencing non-existing Tenant Profile Id will cause 'Not Found' error. " + |
103 | - "Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. " + | |
103 | + "\n\nUpdate of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. " + | |
104 | + "\n\nThe **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. " + | |
105 | + "\n\nYou have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. " + | |
106 | + "You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). " + | |
107 | + "The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. " + | |
108 | + "Let's review the example of tenant profile data below: " + | |
109 | + "\n\n" + MARKDOWN_CODE_BLOCK_START + | |
110 | + "{\n" + | |
111 | + " \"id\": {\n" + | |
112 | + " \"entityType\": \"TENANT_PROFILE\",\n" + | |
113 | + " \"id\": \"0f2978a0-0d46-11eb-ab90-09ceaa526dd8\"\n" + | |
114 | + " },\n" + | |
115 | + " \"createdTime\": 1602588011818,\n" + | |
116 | + " \"name\": \"Default\",\n" + | |
117 | + " \"description\": \"Default tenant profile\",\n" + | |
118 | + " \"isolatedTbCore\": false,\n" + | |
119 | + " \"isolatedTbRuleEngine\": false,\n" + | |
120 | + " \"profileData\": {\n" + | |
121 | + " \"configuration\": {\n" + | |
122 | + " \"type\": \"DEFAULT\",\n" + | |
123 | + " \"maxDevices\": 0,\n" + | |
124 | + " \"maxAssets\": 0,\n" + | |
125 | + " \"maxCustomers\": 0,\n" + | |
126 | + " \"maxUsers\": 0,\n" + | |
127 | + " \"maxDashboards\": 0,\n" + | |
128 | + " \"maxRuleChains\": 0,\n" + | |
129 | + " \"maxResourcesInBytes\": 0,\n" + | |
130 | + " \"maxOtaPackagesInBytes\": 0,\n" + | |
131 | + " \"transportTenantMsgRateLimit\": \"1000:1,20000:60\",\n" + | |
132 | + " \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\",\n" + | |
133 | + " \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\",\n" + | |
134 | + " \"transportDeviceMsgRateLimit\": \"20:1,600:60\",\n" + | |
135 | + " \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\",\n" + | |
136 | + " \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\",\n" + | |
137 | + " \"maxTransportMessages\": 10000000,\n" + | |
138 | + " \"maxTransportDataPoints\": 10000000,\n" + | |
139 | + " \"maxREExecutions\": 4000000,\n" + | |
140 | + " \"maxJSExecutions\": 5000000,\n" + | |
141 | + " \"maxDPStorageDays\": 0,\n" + | |
142 | + " \"maxRuleNodeExecutionsPerMessage\": 50,\n" + | |
143 | + " \"maxEmails\": 0,\n" + | |
144 | + " \"maxSms\": 0,\n" + | |
145 | + " \"maxCreatedAlarms\": 1000,\n" + | |
146 | + " \"defaultStorageTtlDays\": 0,\n" + | |
147 | + " \"alarmsTtlDays\": 0,\n" + | |
148 | + " \"rpcTtlDays\": 0,\n" + | |
149 | + " \"warnThreshold\": 0\n" + | |
150 | + " }\n" + | |
151 | + " },\n" + | |
152 | + " \"default\": true\n" + | |
153 | + "}" + | |
154 | + MARKDOWN_CODE_BLOCK_END + | |
104 | 155 | SYSTEM_AUTHORITY_PARAGRAPH) |
105 | 156 | @PreAuthorize("hasAuthority('SYS_ADMIN')") |
106 | 157 | @RequestMapping(value = "/tenantProfile", method = RequestMethod.POST) | ... | ... |