latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

tenant-profile-controller

Create Or update Tenant Profile (saveTenantProfile)

Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as time-based UUID. 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.

The 'profileData' object is the part of Tenant Profile that defines API limits and Rate limits.

You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). 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. Let's review the example of tenant profile data below:

{
  "name": "Your name",
  "description": "Your description",
  "isolatedTbRuleEngine": false,
  "profileData": {
    "configuration": {
      "type": "DEFAULT",
      "maxDevices": 0,
      "maxAssets": 0,
      "maxCustomers": 0,
      "maxUsers": 0,
      "maxDashboards": 0,
      "maxRuleChains": 0,
      "maxResourcesInBytes": 0,
      "maxOtaPackagesInBytes": 0,
      "maxResourceSize": 0,
      "transportTenantMsgRateLimit": "1000:1,20000:60",
      "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60",
      "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60",
      "transportDeviceMsgRateLimit": "20:1,600:60",
      "transportDeviceTelemetryMsgRateLimit": "20:1,600:60",
      "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60",
      "transportGatewayMsgRateLimit": "20:1,600:60",
      "transportGatewayTelemetryMsgRateLimit": "20:1,600:60",
      "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60",
      "transportGatewayDeviceMsgRateLimit": "20:1,600:60",
      "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60",
      "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60",
      "maxTransportMessages": 10000000,
      "maxTransportDataPoints": 10000000,
      "maxREExecutions": 4000000,
      "maxJSExecutions": 5000000,
      "maxDPStorageDays": 0,
      "maxRuleNodeExecutionsPerMessage": 50,
      "maxDebugModeDurationMinutes": 15,
      "maxEmails": 0,
      "maxSms": 0,
      "maxCreatedAlarms": 1000,
      "defaultStorageTtlDays": 0,
      "alarmsTtlDays": 0,
      "rpcTtlDays": 0,
      "queueStatsTtlDays": 0,
      "ruleEngineExceptionsTtlDays": 0,
      "warnThreshold": 0,
      "maxCalculatedFieldsPerEntity": 5,
      "maxArgumentsPerCF": 10,
      "minAllowedScheduledUpdateIntervalInSecForCF": 10,
      "maxRelationLevelPerCfArgument": 2,
      "maxRelatedEntitiesToReturnPerCfArgument": 100,
      "maxDataPointsPerRollingArg": 1000,
      "maxStateSizeInKBytes": 32,
      "maxSingleValueArgumentSizeInKBytes": 2,      "minAllowedDeduplicationIntervalInSecForCF": 10,      "minAllowedAggregationIntervalInSecForCF": 60,      "intermediateAggregationIntervalInSecForCF": 300,      "cfReevaluationCheckInterval": 60,      "alarmsReevaluationInterval": 60    }
  },
  "default": false
}
```Remove 'id', from the request body example (below) to create new Tenant Profile entity.

Available for users with 'SYS_ADMIN' authority.
post/api/tenantProfile

Request body

createdTimeinteger

Timestamp of the tenant profile creation, in milliseconds

namestring

Name of the tenant profile

descriptionstring

Description of the tenant profile

isolatedTbRuleEngineboolean

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

defaultboolean

Default Tenant profile to be used.

Example request

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT_PROFILE"
  },
  "createdTime": 1609459200000,
  "name": "High Priority Tenants",
  "description": "Any text",
  "profileData": {
    "configuration": {
      "transportTenantMsgRateLimit": "1000:1,20000:60",
      "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60",
      "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60",
      "transportDeviceMsgRateLimit": "20:1,600:60",
      "transportDeviceTelemetryMsgRateLimit": "20:1,600:60",
      "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60",
      "transportGatewayMsgRateLimit": "20:1,600:60",
      "transportGatewayTelemetryMsgRateLimit": "20:1,600:60",
      "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60",
      "transportGatewayDeviceMsgRateLimit": "20:1,600:60",
      "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60",
      "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60",
      "tenantEntityExportRateLimit": "20:1,600:60",
      "tenantEntityImportRateLimit": "20:1,600:60",
      "tenantNotificationRequestsRateLimit": "20:1,600:60",
      "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60",
      "maxTransportMessages": 10000000,
      "maxTransportDataPoints": 10000000,
      "maxREExecutions": 4000000,
      "maxJSExecutions": 5000000,
      "maxTbelExecutions": 5000000,
      "maxRuleNodeExecutionsPerMessage": 50,
      "maxDebugModeDurationMinutes": 15,
      "smsEnabled": true,
      "maxCreatedAlarms": 1000,
      "maxCalculatedFieldsPerEntity": 5,
      "maxArgumentsPerCF": 10,
      "minAllowedScheduledUpdateIntervalInSecForCF": 10,
      "maxRelationLevelPerCfArgument": 2,
      "maxRelatedEntitiesToReturnPerCfArgument": 100,
      "maxDataPointsPerRollingArg": 1000,
      "maxStateSizeInKBytes": 32,
      "maxSingleValueArgumentSizeInKBytes": 2,
      "minAllowedDeduplicationIntervalInSecForCF": 10,
      "minAllowedAggregationIntervalInSecForCF": 60,
      "intermediateAggregationIntervalInSecForCF": 300,
      "cfReevaluationCheckInterval": 60,
      "alarmsReevaluationInterval": 60
    },
    "queueConfiguration": [
      {
        "additionalInfo": {}
      }
    ]
  }
}

Response

OK

createdTimeinteger

Timestamp of the tenant profile creation, in milliseconds

namestring

Name of the tenant profile

descriptionstring

Description of the tenant profile

isolatedTbRuleEngineboolean

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

defaultboolean

Default Tenant profile to be used.

Example response

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT_PROFILE"
  },
  "createdTime": 1609459200000,
  "name": "High Priority Tenants",
  "description": "Any text",
  "profileData": {
    "configuration": {
      "transportTenantMsgRateLimit": "1000:1,20000:60",
      "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60",
      "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60",
      "transportDeviceMsgRateLimit": "20:1,600:60",
      "transportDeviceTelemetryMsgRateLimit": "20:1,600:60",
      "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60",
      "transportGatewayMsgRateLimit": "20:1,600:60",
      "transportGatewayTelemetryMsgRateLimit": "20:1,600:60",
      "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60",
      "transportGatewayDeviceMsgRateLimit": "20:1,600:60",
      "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60",
      "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60",
      "tenantEntityExportRateLimit": "20:1,600:60",
      "tenantEntityImportRateLimit": "20:1,600:60",
      "tenantNotificationRequestsRateLimit": "20:1,600:60",
      "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60",
      "maxTransportMessages": 10000000,
      "maxTransportDataPoints": 10000000,
      "maxREExecutions": 4000000,
      "maxJSExecutions": 5000000,
      "maxTbelExecutions": 5000000,
      "maxRuleNodeExecutionsPerMessage": 50,
      "maxDebugModeDurationMinutes": 15,
      "smsEnabled": true,
      "maxCreatedAlarms": 1000,
      "maxCalculatedFieldsPerEntity": 5,
      "maxArgumentsPerCF": 10,
      "minAllowedScheduledUpdateIntervalInSecForCF": 10,
      "maxRelationLevelPerCfArgument": 2,
      "maxRelatedEntitiesToReturnPerCfArgument": 100,
      "maxDataPointsPerRollingArg": 1000,
      "maxStateSizeInKBytes": 32,
      "maxSingleValueArgumentSizeInKBytes": 2,
      "minAllowedDeduplicationIntervalInSecForCF": 10,
      "minAllowedAggregationIntervalInSecForCF": 60,
      "intermediateAggregationIntervalInSecForCF": 300,
      "cfReevaluationCheckInterval": 60,
      "alarmsReevaluationInterval": 60
    },
    "queueConfiguration": [
      {
        "additionalInfo": {}
      }
    ]
  }
}