diff --git a/ce/docs/AdminControllerApi.md b/ce/docs/AdminControllerApi.md index e8a95a8d..8ceacde1 100644 --- a/ce/docs/AdminControllerApi.md +++ b/ce/docs/AdminControllerApi.md @@ -5,19 +5,19 @@ | [**autoCommitSettingsExists**](#autoCommitSettingsExists) | **GET** /api/admin/autoCommitSettings/exists | Check auto commit settings exists (autoCommitSettingsExists) | | [**checkRepositoryAccess**](#checkRepositoryAccess) | **POST** /api/admin/repositorySettings/checkAccess | Check repository access (checkRepositoryAccess) | | [**checkUpdates**](#checkUpdates) | **GET** /api/admin/updates | Check for new Platform Releases (checkUpdates) | -| [**codeProcessingUrl**](#codeProcessingUrl) | **GET** /api/admin/mail/oauth2/code | codeProcessingUrl | | [**deleteAutoCommitSettings**](#deleteAutoCommitSettings) | **DELETE** /api/admin/autoCommitSettings | Delete auto commit settings (deleteAutoCommitSettings) | | [**deleteRepositorySettings**](#deleteRepositorySettings) | **DELETE** /api/admin/repositorySettings | Delete repository settings (deleteRepositorySettings) | | [**getAdminSettings**](#getAdminSettings) | **GET** /api/admin/settings/{key} | Get the Administration Settings object using key (getAdminSettings) | -| [**getAuthorizationUrl**](#getAuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getAutoCommitSettings**](#getAutoCommitSettings) | **GET** /api/admin/autoCommitSettings | Get auto commit settings (getAutoCommitSettings) | | [**getFeaturesInfo**](#getFeaturesInfo) | **GET** /api/admin/featuresInfo | Get features info (getFeaturesInfo) | | [**getJwtSettings**](#getJwtSettings) | **GET** /api/admin/jwtSettings | Get the JWT Settings object (getJwtSettings) | +| [**getMailOAuth2AuthorizationUrl**](#getMailOAuth2AuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getMailProcessingUrl**](#getMailProcessingUrl) | **GET** /api/admin/mail/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getMailProcessingUrl) | | [**getRepositorySettings**](#getRepositorySettings) | **GET** /api/admin/repositorySettings | Get repository settings (getRepositorySettings) | | [**getRepositorySettingsInfo**](#getRepositorySettingsInfo) | **GET** /api/admin/repositorySettings/info | getRepositorySettingsInfo | | [**getSecuritySettings**](#getSecuritySettings) | **GET** /api/admin/securitySettings | Get the Security Settings object (getSecuritySettings) | | [**getSystemInfo**](#getSystemInfo) | **GET** /api/admin/systemInfo | Get system info (getSystemInfo) | +| [**handleMailOAuth2Callback**](#handleMailOAuth2Callback) | **GET** /api/admin/mail/oauth2/code | handleMailOAuth2Callback | | [**repositorySettingsExists**](#repositorySettingsExists) | **GET** /api/admin/repositorySettings/exists | Check repository settings exists (repositorySettingsExists) | | [**saveAdminSettings**](#saveAdminSettings) | **POST** /api/admin/settings | Creates or Updates the Administration Settings (saveAdminSettings) | | [**saveAutoCommitSettings**](#saveAutoCommitSettings) | **POST** /api/admin/autoCommitSettings | Creates or Updates the auto commit settings (saveAutoCommitSettings) | @@ -75,25 +75,6 @@ Check notifications about new platform releases. Available for users with 'SYS **UpdateMessage** -## codeProcessingUrl - -> codeProcessingUrl(code, state) - -codeProcessingUrl - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String** | | | -| **state** | **String** | | | - -### Return type - -null (empty response body) - - ## deleteAutoCommitSettings > deleteAutoCommitSettings() @@ -140,19 +121,6 @@ Get the Administration Settings object using specified string key. Referencing n **AdminSettings** -## getAuthorizationUrl - -> String getAuthorizationUrl() - -Redirect user to mail provider login page. - -After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - -### Return type - -**String** - - ## getAutoCommitSettings > Map getAutoCommitSettings() @@ -192,6 +160,19 @@ Get the JWT Settings object that contains JWT token policy, etc. Available for **JwtSettings** +## getMailOAuth2AuthorizationUrl + +> String getMailOAuth2AuthorizationUrl() + +Redirect user to mail provider login page. + +After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + +### Return type + +**String** + + ## getMailProcessingUrl > String getMailProcessingUrl() @@ -255,6 +236,25 @@ Get main information about system. Available for users with 'SYS_ADMIN' author **SystemInfo** +## handleMailOAuth2Callback + +> handleMailOAuth2Callback(code, state) + +handleMailOAuth2Callback + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **code** | **String** | | | +| **state** | **String** | | | + +### Return type + +null (empty response body) + + ## repositorySettingsExists > Boolean repositorySettingsExists() diff --git a/pe/docs/GroupEntityExportData.md b/ce/docs/AiModelExportData.md similarity index 86% rename from pe/docs/GroupEntityExportData.md rename to ce/docs/AiModelExportData.md index e1f5ee84..4b2f43c7 100644 --- a/pe/docs/GroupEntityExportData.md +++ b/ce/docs/AiModelExportData.md @@ -1,7 +1,7 @@ -# GroupEntityExportData +# AiModelExportData -`org.thingsboard.client.model.GroupEntityExportData` +`org.thingsboard.client.model.AiModelExportData` **Extends:** **EntityExportData** diff --git a/pe/docs/DefaultNotificationRuleRecipientsConfig.md b/ce/docs/AlarmAssignmentRecipientsConfig.md similarity index 70% rename from pe/docs/DefaultNotificationRuleRecipientsConfig.md rename to ce/docs/AlarmAssignmentRecipientsConfig.md index 358dfc01..c394d83e 100644 --- a/pe/docs/DefaultNotificationRuleRecipientsConfig.md +++ b/ce/docs/AlarmAssignmentRecipientsConfig.md @@ -1,9 +1,7 @@ -# DefaultNotificationRuleRecipientsConfig +# AlarmAssignmentRecipientsConfig -`org.thingsboard.client.model.DefaultNotificationRuleRecipientsConfig` - -Default notification rule recipients configuration +`org.thingsboard.client.model.AlarmAssignmentRecipientsConfig` **Extends:** **NotificationRuleRecipientsConfig** @@ -11,7 +9,6 @@ Default notification rule recipients configuration | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | | **targets** | **List\** | | | diff --git a/paas/docs/DefaultNotificationRuleRecipientsConfig.md b/ce/docs/AlarmCommentRecipientsConfig.md similarity index 70% rename from paas/docs/DefaultNotificationRuleRecipientsConfig.md rename to ce/docs/AlarmCommentRecipientsConfig.md index 358dfc01..863bb32d 100644 --- a/paas/docs/DefaultNotificationRuleRecipientsConfig.md +++ b/ce/docs/AlarmCommentRecipientsConfig.md @@ -1,9 +1,7 @@ -# DefaultNotificationRuleRecipientsConfig +# AlarmCommentRecipientsConfig -`org.thingsboard.client.model.DefaultNotificationRuleRecipientsConfig` - -Default notification rule recipients configuration +`org.thingsboard.client.model.AlarmCommentRecipientsConfig` **Extends:** **NotificationRuleRecipientsConfig** @@ -11,7 +9,6 @@ Default notification rule recipients configuration | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | | **targets** | **List\** | | | diff --git a/ce/docs/AlarmControllerApi.md b/ce/docs/AlarmControllerApi.md index 52a2da83..7c575305 100644 --- a/ce/docs/AlarmControllerApi.md +++ b/ce/docs/AlarmControllerApi.md @@ -9,7 +9,7 @@ | [**getAlarmById**](#getAlarmById) | **GET** /api/alarm/{alarmId} | Get Alarm (getAlarmById) | | [**getAlarmInfoById**](#getAlarmInfoById) | **GET** /api/alarm/info/{alarmId} | Get Alarm Info (getAlarmInfoById) | | [**getAlarmTypes**](#getAlarmTypes) | **GET** /api/alarm/types | Get Alarm Types (getAlarmTypes) | -| [**getAlarms**](#getAlarms) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarms) | +| [**getAlarmsByEntity**](#getAlarmsByEntity) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsByEntity) | | [**getAlarmsV2**](#getAlarmsV2) | **GET** /api/v2/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsV2) | | [**getAllAlarms**](#getAllAlarms) | **GET** /api/alarms | Get All Alarms (getAllAlarms) | | [**getAllAlarmsV2**](#getAllAlarmsV2) | **GET** /api/v2/alarms | Get All Alarms (getAllAlarmsV2) | @@ -163,11 +163,11 @@ Returns a set of unique alarm types based on alarms that are either owned by the **PageDataEntitySubtype** -## getAlarms +## getAlarmsByEntity -> PageDataAlarmInfo getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) +> PageDataAlarmInfo getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) -Get Alarms (getAlarms) +Get Alarms (getAlarmsByEntity) Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/ApiUsageLimitRecipientsConfig.md b/ce/docs/ApiUsageLimitRecipientsConfig.md new file mode 100644 index 00000000..6a24d1e0 --- /dev/null +++ b/ce/docs/ApiUsageLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ApiUsageLimitRecipientsConfig + +`org.thingsboard.client.model.ApiUsageLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/AssetControllerApi.md b/ce/docs/AssetControllerApi.md index 02b84ad7..6fd247fc 100644 --- a/ce/docs/AssetControllerApi.md +++ b/ce/docs/AssetControllerApi.md @@ -6,7 +6,7 @@ | [**assignAssetToEdge**](#assignAssetToEdge) | **POST** /api/edge/{edgeId}/asset/{assetId} | Assign asset to edge (assignAssetToEdge) | | [**assignAssetToPublicCustomer**](#assignAssetToPublicCustomer) | **POST** /api/customer/public/asset/{assetId} | Make asset publicly available (assignAssetToPublicCustomer) | | [**deleteAsset**](#deleteAsset) | **DELETE** /api/asset/{assetId} | Delete asset (deleteAsset) | -| [**findByQuery4**](#findByQuery4) | **POST** /api/assets | Find related assets (findByQuery) | +| [**findAssetsByQuery**](#findAssetsByQuery) | **POST** /api/assets | Find related assets (findAssetsByQuery) | | [**getAssetById**](#getAssetById) | **GET** /api/asset/{assetId} | Get Asset (getAssetById) | | [**getAssetInfoById**](#getAssetInfoById) | **GET** /api/asset/info/{assetId} | Get Asset Info (getAssetInfoById) | | [**getAssetTypes**](#getAssetTypes) | **GET** /api/asset/types | Get Asset Types (getAssetTypes) | @@ -106,11 +106,11 @@ Deletes the asset and all the relations (from and to the asset). Referencing non null (empty response body) -## findByQuery4 +## findAssetsByQuery -> List findByQuery4(assetSearchQuery) +> List findAssetsByQuery(assetSearchQuery) -Find related assets (findByQuery) +Find related assets (findAssetsByQuery) Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. diff --git a/paas/docs/GroupEntityExportData.md b/ce/docs/AssetExportData.md similarity index 86% rename from paas/docs/GroupEntityExportData.md rename to ce/docs/AssetExportData.md index e1f5ee84..3985a421 100644 --- a/paas/docs/GroupEntityExportData.md +++ b/ce/docs/AssetExportData.md @@ -1,7 +1,7 @@ -# GroupEntityExportData +# AssetExportData -`org.thingsboard.client.model.GroupEntityExportData` +`org.thingsboard.client.model.AssetExportData` **Extends:** **EntityExportData** diff --git a/ce/docs/AssetProfileControllerApi.md b/ce/docs/AssetProfileControllerApi.md index 4618ae1f..56247d66 100644 --- a/ce/docs/AssetProfileControllerApi.md +++ b/ce/docs/AssetProfileControllerApi.md @@ -8,7 +8,7 @@ | [**getAssetProfileInfos**](#getAssetProfileInfos) | **GET** /api/assetProfileInfos | Get Asset Profile infos (getAssetProfileInfos) | | [**getAssetProfileNames**](#getAssetProfileNames) | **GET** /api/assetProfile/names | Get Asset Profile names (getAssetProfileNames) | | [**getAssetProfiles**](#getAssetProfiles) | **GET** /api/assetProfiles | Get Asset Profiles (getAssetProfiles) | -| [**getAssetProfilesByIdsV2**](#getAssetProfilesByIdsV2) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIdsV2) | +| [**getAssetProfilesByIds**](#getAssetProfilesByIds) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIds) | | [**getDefaultAssetProfileInfo**](#getDefaultAssetProfileInfo) | **GET** /api/assetProfileInfo/default | Get Default Asset Profile (getDefaultAssetProfileInfo) | | [**saveAssetProfile**](#saveAssetProfile) | **POST** /api/assetProfile | Create Or Update Asset Profile (saveAssetProfile) | | [**setDefaultAssetProfile**](#setDefaultAssetProfile) | **POST** /api/assetProfile/{assetProfileId}/default | Make Asset Profile Default (setDefaultAssetProfile) | @@ -144,11 +144,11 @@ Returns a page of asset profile objects owned by tenant. You can specify paramet **PageDataAssetProfile** -## getAssetProfilesByIdsV2 +## getAssetProfilesByIds -> List getAssetProfilesByIdsV2(assetProfileIds) +> List getAssetProfilesByIds(assetProfileIds) -Get Asset Profiles By Ids (getAssetProfilesByIdsV2) +Get Asset Profiles By Ids (getAssetProfilesByIds) Requested asset profiles must be owned by tenant which is performing the request. diff --git a/ce/docs/AssetProfileExportData.md b/ce/docs/AssetProfileExportData.md new file mode 100644 index 00000000..8507f2a9 --- /dev/null +++ b/ce/docs/AssetProfileExportData.md @@ -0,0 +1,23 @@ + +# AssetProfileExportData + +`org.thingsboard.client.model.AssetProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/BulkImportResultAsset.md b/ce/docs/BulkImportResultAsset.md index 49d23019..67309837 100644 --- a/ce/docs/BulkImportResultAsset.md +++ b/ce/docs/BulkImportResultAsset.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/ce/docs/BulkImportResultDevice.md b/ce/docs/BulkImportResultDevice.md index e1532d49..be195ee7 100644 --- a/ce/docs/BulkImportResultDevice.md +++ b/ce/docs/BulkImportResultDevice.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/ce/docs/BulkImportResultEdge.md b/ce/docs/BulkImportResultEdge.md index bdf755a6..91d73829 100644 --- a/ce/docs/BulkImportResultEdge.md +++ b/ce/docs/BulkImportResultEdge.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/ce/docs/CalculatedFieldControllerApi.md b/ce/docs/CalculatedFieldControllerApi.md index c6882fb6..4cb39ea6 100644 --- a/ce/docs/CalculatedFieldControllerApi.md +++ b/ce/docs/CalculatedFieldControllerApi.md @@ -6,10 +6,10 @@ | [**getCalculatedFieldById**](#getCalculatedFieldById) | **GET** /api/calculatedField/{calculatedFieldId} | Get Calculated Field (getCalculatedFieldById) | | [**getCalculatedFieldNames**](#getCalculatedFieldNames) | **GET** /api/calculatedFields/names | Get calculated field names (getCalculatedFieldNames) | | [**getCalculatedFields**](#getCalculatedFields) | **GET** /api/calculatedFields | Get calculated fields (getCalculatedFields) | -| [**getCalculatedFieldsByEntityIdV2**](#getCalculatedFieldsByEntityIdV2) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) | +| [**getCalculatedFieldsByEntityId**](#getCalculatedFieldsByEntityId) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) | | [**getLatestCalculatedFieldDebugEvent**](#getLatestCalculatedFieldDebugEvent) | **GET** /api/calculatedField/{calculatedFieldId}/debug | Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent) | | [**saveCalculatedField**](#saveCalculatedField) | **POST** /api/calculatedField | Create Or Update Calculated Field (saveCalculatedField) | -| [**testScript1**](#testScript1) | **POST** /api/calculatedField/testScript | Test Script expression | +| [**testCalculatedFieldScript**](#testCalculatedFieldScript) | **POST** /api/calculatedField/testScript | Test Script expression | @@ -105,11 +105,11 @@ Fetch tenant calculated fields based on the filter. **PageDataCalculatedFieldInfo** -## getCalculatedFieldsByEntityIdV2 +## getCalculatedFieldsByEntityId -> PageDataCalculatedField getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) +> PageDataCalculatedField getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) -Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) +Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) Fetch the Calculated Fields based on the provided Entity Id. @@ -172,9 +172,9 @@ Creates or Updates the Calculated Field. When creating calculated field, platfor **CalculatedField** -## testScript1 +## testCalculatedFieldScript -> com.fasterxml.jackson.databind.JsonNode testScript1(body) +> com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(body) Test Script expression diff --git a/ce/docs/CustomerControllerApi.md b/ce/docs/CustomerControllerApi.md index 32fc76b5..4b9254bb 100644 --- a/ce/docs/CustomerControllerApi.md +++ b/ce/docs/CustomerControllerApi.md @@ -6,7 +6,7 @@ | [**getCustomerById**](#getCustomerById) | **GET** /api/customer/{customerId} | Get Customer (getCustomerById) | | [**getCustomerTitleById**](#getCustomerTitleById) | **GET** /api/customer/{customerId}/title | Get Customer Title (getCustomerTitleById) | | [**getCustomers**](#getCustomers) | **GET** /api/customers | Get Tenant Customers (getCustomers) | -| [**getCustomersByIdsV2**](#getCustomersByIdsV2) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIdsV2) | +| [**getCustomersByIds**](#getCustomersByIds) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIds) | | [**getShortCustomerInfoById**](#getShortCustomerInfoById) | **GET** /api/customer/{customerId}/shortInfo | Get short Customer info (getShortCustomerInfoById) | | [**getTenantCustomer**](#getTenantCustomer) | **GET** /api/tenant/customers | Get Tenant Customer by Customer title (getTenantCustomer) | | [**saveCustomer**](#saveCustomer) | **POST** /api/customer | Create or update Customer (saveCustomer) | @@ -97,11 +97,11 @@ Returns a page of customers owned by tenant. You can specify parameters to filte **PageDataCustomer** -## getCustomersByIdsV2 +## getCustomersByIds -> List getCustomersByIdsV2(customerIds) +> List getCustomersByIds(customerIds) -Get customers by Customer Ids (getCustomersByIdsV2) +Get customers by Customer Ids (getCustomersByIds) Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/CustomerExportData.md b/ce/docs/CustomerExportData.md new file mode 100644 index 00000000..c5c441b9 --- /dev/null +++ b/ce/docs/CustomerExportData.md @@ -0,0 +1,23 @@ + +# CustomerExportData + +`org.thingsboard.client.model.CustomerExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DashboardControllerApi.md b/ce/docs/DashboardControllerApi.md index cf42555d..7e7c3bb6 100644 --- a/ce/docs/DashboardControllerApi.md +++ b/ce/docs/DashboardControllerApi.md @@ -10,14 +10,14 @@ | [**getCustomerDashboards**](#getCustomerDashboards) | **GET** /api/customer/{customerId}/dashboards | Get Customer Dashboards (getCustomerDashboards) | | [**getDashboardById**](#getDashboardById) | **GET** /api/dashboard/{dashboardId} | Get Dashboard (getDashboardById) | | [**getDashboardInfoById**](#getDashboardInfoById) | **GET** /api/dashboard/info/{dashboardId} | Get Dashboard Info (getDashboardInfoById) | -| [**getDashboardsByIdsV2**](#getDashboardsByIdsV2) | **GET** /api/dashboards/list | Get dashboards by Dashboard Ids (getDashboardsByIdsV2) | +| [**getDashboardsByIds**](#getDashboardsByIds) | **GET** /api/dashboards/list | Get dashboards by Dashboard Ids (getDashboardsByIds) | | [**getEdgeDashboards**](#getEdgeDashboards) | **GET** /api/edge/{edgeId}/dashboards | Get Edge Dashboards (getEdgeDashboards) | | [**getHomeDashboard**](#getHomeDashboard) | **GET** /api/dashboard/home | Get Home Dashboard (getHomeDashboard) | | [**getHomeDashboardInfo**](#getHomeDashboardInfo) | **GET** /api/dashboard/home/info | Get Home Dashboard Info (getHomeDashboardInfo) | | [**getMaxDatapointsLimit**](#getMaxDatapointsLimit) | **GET** /api/dashboard/maxDatapointsLimit | Get max data points limit (getMaxDatapointsLimit) | | [**getServerTime**](#getServerTime) | **GET** /api/dashboard/serverTime | Get server time (getServerTime) | -| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboards) | -| [**getTenantDashboards1**](#getTenantDashboards1) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboardsByTenantId**](#getTenantDashboardsByTenantId) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) | | [**getTenantHomeDashboardInfo**](#getTenantHomeDashboardInfo) | **GET** /api/tenant/dashboard/home/info | Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo) | | [**removeDashboardCustomers**](#removeDashboardCustomers) | **POST** /api/dashboard/{dashboardId}/customers/remove | Remove the Dashboard Customers (removeDashboardCustomers) | | [**saveDashboard**](#saveDashboard) | **POST** /api/dashboard | Create Or Update Dashboard (saveDashboard) | @@ -200,11 +200,11 @@ Get the information about the dashboard based on 'dashboardId' parameter. The Da **DashboardInfo** -## getDashboardsByIdsV2 +## getDashboardsByIds -> List getDashboardsByIdsV2(dashboardIds) +> List getDashboardsByIds(dashboardIds) -Get dashboards by Dashboard Ids (getDashboardsByIdsV2) +Get dashboards by Dashboard Ids (getDashboardsByIds) Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -306,20 +306,20 @@ Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust vie ## getTenantDashboards -> PageDataDashboardInfo getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards by System Administrator (getTenantDashboards) +Get Tenant Dashboards (getTenantDashboards) -Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. +Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | +| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -329,22 +329,22 @@ Returns a page of dashboard info objects owned by tenant. The Dashboard Info obj **PageDataDashboardInfo** -## getTenantDashboards1 +## getTenantDashboardsByTenantId -> PageDataDashboardInfo getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards (getTenantDashboards) +Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) -Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/ce/docs/DashboardExportData.md b/ce/docs/DashboardExportData.md new file mode 100644 index 00000000..2356ec28 --- /dev/null +++ b/ce/docs/DashboardExportData.md @@ -0,0 +1,23 @@ + +# DashboardExportData + +`org.thingsboard.client.model.DashboardExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DeviceActivityRecipientsConfig.md b/ce/docs/DeviceActivityRecipientsConfig.md new file mode 100644 index 00000000..1b3164d4 --- /dev/null +++ b/ce/docs/DeviceActivityRecipientsConfig.md @@ -0,0 +1,24 @@ + +# DeviceActivityRecipientsConfig + +`org.thingsboard.client.model.DeviceActivityRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DeviceApiControllerApi.md b/ce/docs/DeviceApiControllerApi.md index 43fe8257..278e2342 100644 --- a/ce/docs/DeviceApiControllerApi.md +++ b/ce/docs/DeviceApiControllerApi.md @@ -2,7 +2,6 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**claimDevice**](#claimDevice) | **POST** /api/v1/{deviceToken}/claim | Save claiming information (claimDevice) | | [**getDeviceAttributes**](#getDeviceAttributes) | **GET** /api/v1/{deviceToken}/attributes | Get attributes (getDeviceAttributes) | | [**getFirmware**](#getFirmware) | **GET** /api/v1/{deviceToken}/firmware | Get Device Firmware (getFirmware) | | [**getSoftware**](#getSoftware) | **GET** /api/v1/{deviceToken}/software | Get Device Software (getSoftware) | @@ -11,32 +10,12 @@ | [**postTelemetry**](#postTelemetry) | **POST** /api/v1/{deviceToken}/telemetry | Post time series data (postTelemetry) | | [**provisionDevice**](#provisionDevice) | **POST** /api/v1/provision | Provision new device (provisionDevice) | | [**replyToCommand**](#replyToCommand) | **POST** /api/v1/{deviceToken}/rpc/{requestId} | Reply to RPC commands (replyToCommand) | +| [**saveClaimingInfo**](#saveClaimingInfo) | **POST** /api/v1/{deviceToken}/claim | Save claiming information (saveClaimingInfo) | | [**subscribeToAttributes**](#subscribeToAttributes) | **GET** /api/v1/{deviceToken}/attributes/updates | Subscribe to attribute updates (subscribeToAttributes) (Deprecated) | | [**subscribeToCommands**](#subscribeToCommands) | **GET** /api/v1/{deviceToken}/rpc | Subscribe to RPC commands (subscribeToCommands) (Deprecated) | -## claimDevice - -> String claimDevice(deviceToken, body) - -Save claiming information (claimDevice) - -Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deviceToken** | **String** | Your device access token. | | -| **body** | **String** | | [optional] | - -### Return type - -**String** - - ## getDeviceAttributes > String getDeviceAttributes(deviceToken, clientKeys, sharedKeys) @@ -212,6 +191,27 @@ Replies to server originated RPC command identified by 'requestId' parameter. Th **String** +## saveClaimingInfo + +> String saveClaimingInfo(deviceToken, body) + +Save claiming information (saveClaimingInfo) + +Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | [optional] | + +### Return type + +**String** + + ## subscribeToAttributes > String subscribeToAttributes(deviceToken, timeout) diff --git a/ce/docs/DeviceControllerApi.md b/ce/docs/DeviceControllerApi.md index e94955d3..7dfe190c 100644 --- a/ce/docs/DeviceControllerApi.md +++ b/ce/docs/DeviceControllerApi.md @@ -6,10 +6,10 @@ | [**assignDeviceToEdge**](#assignDeviceToEdge) | **POST** /api/edge/{edgeId}/device/{deviceId} | Assign device to edge (assignDeviceToEdge) | | [**assignDeviceToPublicCustomer**](#assignDeviceToPublicCustomer) | **POST** /api/customer/public/device/{deviceId} | Make device publicly available (assignDeviceToPublicCustomer) | | [**assignDeviceToTenant**](#assignDeviceToTenant) | **POST** /api/tenant/{tenantId}/device/{deviceId} | Assign device to tenant (assignDeviceToTenant) | -| [**claimDevice1**](#claimDevice1) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | +| [**claimDevice**](#claimDevice) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | | [**countByDeviceProfileAndEmptyOtaPackage**](#countByDeviceProfileAndEmptyOtaPackage) | **GET** /api/devices/count/{otaPackageType}/{deviceProfileId} | Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) | | [**deleteDevice**](#deleteDevice) | **DELETE** /api/device/{deviceId} | Delete device (deleteDevice) | -| [**findByQuery3**](#findByQuery3) | **POST** /api/devices | Find related devices (findByQuery) | +| [**findDevicesByQuery**](#findDevicesByQuery) | **POST** /api/devices | Find related devices (findDevicesByQuery) | | [**getCustomerDeviceInfos**](#getCustomerDeviceInfos) | **GET** /api/customer/{customerId}/deviceInfos | Get Customer Device Infos (getCustomerDeviceInfos) | | [**getCustomerDevices**](#getCustomerDevices) | **GET** /api/customer/{customerId}/devices | Get Customer Devices (getCustomerDevices) | | [**getDeviceById**](#getDeviceById) | **GET** /api/device/{deviceId} | Get Device (getDeviceById) | @@ -24,7 +24,7 @@ | [**processDevicesBulkImport**](#processDevicesBulkImport) | **POST** /api/device/bulk_import | Import the bulk of devices (processDevicesBulkImport) | | [**reClaimDevice**](#reClaimDevice) | **DELETE** /api/customer/device/{deviceName}/claim | Reclaim device (reClaimDevice) | | [**saveDevice**](#saveDevice) | **POST** /api/device | Create Or Update Device (saveDevice) | -| [**saveDeviceWithCredentials1**](#saveDeviceWithCredentials1) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | +| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | | [**unassignDeviceFromCustomer**](#unassignDeviceFromCustomer) | **DELETE** /api/customer/device/{deviceId} | Unassign device from customer (unassignDeviceFromCustomer) | | [**unassignDeviceFromEdge**](#unassignDeviceFromEdge) | **DELETE** /api/edge/{edgeId}/device/{deviceId} | Unassign device from edge (unassignDeviceFromEdge) | | [**updateDeviceCredentials**](#updateDeviceCredentials) | **POST** /api/device/credentials | Update device credentials (updateDeviceCredentials) | @@ -114,9 +114,9 @@ Creates assignment of the device to tenant. Thereafter tenant will be able to re **Device** -## claimDevice1 +## claimDevice -> String claimDevice1(deviceName, claimRequest) +> String claimDevice(deviceName, claimRequest) Claim device (claimDevice) @@ -176,11 +176,11 @@ Deletes the device, it's credentials and all the relations (from and to the devi null (empty response body) -## findByQuery3 +## findDevicesByQuery -> List findByQuery3(deviceSearchQuery) +> List findDevicesByQuery(deviceSearchQuery) -Find related devices (findByQuery) +Find related devices (findDevicesByQuery) Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -509,9 +509,9 @@ Create or update the Device. When creating device, platform generates Device Id **Device** -## saveDeviceWithCredentials1 +## saveDeviceWithCredentials -> Device saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) +> Device saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) Create Device (saveDevice) with credentials diff --git a/ce/docs/DeviceProfileControllerApi.md b/ce/docs/DeviceProfileControllerApi.md index 2ab61239..54f5a640 100644 --- a/ce/docs/DeviceProfileControllerApi.md +++ b/ce/docs/DeviceProfileControllerApi.md @@ -8,10 +8,10 @@ | [**getDeviceProfileById**](#getDeviceProfileById) | **GET** /api/deviceProfile/{deviceProfileId} | Get Device Profile (getDeviceProfileById) | | [**getDeviceProfileInfoById**](#getDeviceProfileInfoById) | **GET** /api/deviceProfileInfo/{deviceProfileId} | Get Device Profile Info (getDeviceProfileInfoById) | | [**getDeviceProfileInfos**](#getDeviceProfileInfos) | **GET** /api/deviceProfileInfos | Get Device Profiles for transport type (getDeviceProfileInfos) | -| [**getDeviceProfileInfosByIdsV2**](#getDeviceProfileInfosByIdsV2) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) | +| [**getDeviceProfileInfosByIds**](#getDeviceProfileInfosByIds) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) | | [**getDeviceProfileNames**](#getDeviceProfileNames) | **GET** /api/deviceProfile/names | Get Device Profile names (getDeviceProfileNames) | +| [**getDeviceProfileTimeseriesKeys**](#getDeviceProfileTimeseriesKeys) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getDeviceProfileTimeseriesKeys) | | [**getDeviceProfiles**](#getDeviceProfiles) | **GET** /api/deviceProfiles | Get Device Profiles (getDeviceProfiles) | -| [**getTimeseriesKeys1**](#getTimeseriesKeys1) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getTimeseriesKeys) | | [**saveDeviceProfile**](#saveDeviceProfile) | **POST** /api/deviceProfile | Create Or Update Device Profile (saveDeviceProfile) | | [**setDefaultDeviceProfile**](#setDefaultDeviceProfile) | **POST** /api/deviceProfile/{deviceProfileId}/default | Make Device Profile Default (setDefaultDeviceProfile) | @@ -136,11 +136,11 @@ Returns a page of devices profile info objects owned by tenant. You can specify **PageDataDeviceProfileInfo** -## getDeviceProfileInfosByIdsV2 +## getDeviceProfileInfosByIds -> List getDeviceProfileInfosByIdsV2(deviceProfileIds) +> List getDeviceProfileInfosByIds(deviceProfileIds) -Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) +Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) Requested device profiles must be owned by tenant which is performing the request. @@ -176,48 +176,48 @@ Returns a set of unique device profile names owned by the tenant. Available for **List** -## getDeviceProfiles +## getDeviceProfileTimeseriesKeys -> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) +> List getDeviceProfileTimeseriesKeys(deviceProfileId) -Get Device Profiles (getDeviceProfiles) +Get time series keys (getDeviceProfileTimeseriesKeys) -Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | +| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | ### Return type -**PageDataDeviceProfile** +**List** -## getTimeseriesKeys1 +## getDeviceProfiles -> List getTimeseriesKeys1(deviceProfileId) +> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) -Get time series keys (getTimeseriesKeys) +Get Device Profiles (getDeviceProfiles) -Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. +Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | ### Return type -**List** +**PageDataDeviceProfile** ## saveDeviceProfile diff --git a/ce/docs/DeviceProfileExportData.md b/ce/docs/DeviceProfileExportData.md new file mode 100644 index 00000000..505aa2ee --- /dev/null +++ b/ce/docs/DeviceProfileExportData.md @@ -0,0 +1,23 @@ + +# DeviceProfileExportData + +`org.thingsboard.client.model.DeviceProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DomainControllerApi.md b/ce/docs/DomainControllerApi.md index fefc1c7e..e2e6ce50 100644 --- a/ce/docs/DomainControllerApi.md +++ b/ce/docs/DomainControllerApi.md @@ -6,7 +6,7 @@ | [**getDomainInfoById**](#getDomainInfoById) | **GET** /api/domain/info/{id} | Get Domain info by Id (getDomainInfoById) | | [**getTenantDomainInfos**](#getTenantDomainInfos) | **GET** /api/domain/infos | Get Domain infos (getTenantDomainInfos) | | [**saveDomain**](#saveDomain) | **POST** /api/domain | Save or Update Domain (saveDomain) | -| [**updateOauth2Clients1**](#updateOauth2Clients1) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateDomainOauth2Clients**](#updateDomainOauth2Clients) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateDomainOauth2Clients) | @@ -95,11 +95,11 @@ Create or update the Domain. When creating domain, platform generates Domain Id **Domain** -## updateOauth2Clients1 +## updateDomainOauth2Clients -> updateOauth2Clients1(id, UUID) +> updateDomainOauth2Clients(id, UUID) -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateDomainOauth2Clients) Update oauth2 clients for the specified domain. diff --git a/ce/docs/DefaultNotificationRuleRecipientsConfig.md b/ce/docs/EdgeCommunicationFailureRecipientsConfig.md similarity index 70% rename from ce/docs/DefaultNotificationRuleRecipientsConfig.md rename to ce/docs/EdgeCommunicationFailureRecipientsConfig.md index 358dfc01..6ae93da1 100644 --- a/ce/docs/DefaultNotificationRuleRecipientsConfig.md +++ b/ce/docs/EdgeCommunicationFailureRecipientsConfig.md @@ -1,9 +1,7 @@ -# DefaultNotificationRuleRecipientsConfig +# EdgeCommunicationFailureRecipientsConfig -`org.thingsboard.client.model.DefaultNotificationRuleRecipientsConfig` - -Default notification rule recipients configuration +`org.thingsboard.client.model.EdgeCommunicationFailureRecipientsConfig` **Extends:** **NotificationRuleRecipientsConfig** @@ -11,7 +9,6 @@ Default notification rule recipients configuration | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | | **targets** | **List\** | | | diff --git a/ce/docs/EdgeConnectionRecipientsConfig.md b/ce/docs/EdgeConnectionRecipientsConfig.md new file mode 100644 index 00000000..0c69a5e5 --- /dev/null +++ b/ce/docs/EdgeConnectionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EdgeConnectionRecipientsConfig + +`org.thingsboard.client.model.EdgeConnectionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EdgeControllerApi.md b/ce/docs/EdgeControllerApi.md index fc10b679..f498cbb9 100644 --- a/ce/docs/EdgeControllerApi.md +++ b/ce/docs/EdgeControllerApi.md @@ -5,7 +5,7 @@ | [**assignEdgeToCustomer**](#assignEdgeToCustomer) | **POST** /api/customer/{customerId}/edge/{edgeId} | Assign edge to customer (assignEdgeToCustomer) | | [**assignEdgeToPublicCustomer**](#assignEdgeToPublicCustomer) | **POST** /api/customer/public/edge/{edgeId} | Make edge publicly available (assignEdgeToPublicCustomer) | | [**deleteEdge**](#deleteEdge) | **DELETE** /api/edge/{edgeId} | Delete edge (deleteEdge) | -| [**findByQuery2**](#findByQuery2) | **POST** /api/edges | Find related edges (findByQuery) | +| [**findEdgesByQuery**](#findEdgesByQuery) | **POST** /api/edges | Find related edges (findEdgesByQuery) | | [**findMissingToRelatedRuleChains**](#findMissingToRelatedRuleChains) | **GET** /api/edge/missingToRelatedRuleChains/{edgeId} | Find missing rule chains (findMissingToRelatedRuleChains) | | [**getCustomerEdgeInfos**](#getCustomerEdgeInfos) | **GET** /api/customer/{customerId}/edgeInfos | Get Customer Edge Infos (getCustomerEdgeInfos) | | [**getCustomerEdges**](#getCustomerEdges) | **GET** /api/customer/{customerId}/edges | Get Customer Edges (getCustomerEdges) | @@ -90,11 +90,11 @@ Deletes the edge. Referencing non-existing edge Id will cause an error. Availab null (empty response body) -## findByQuery2 +## findEdgesByQuery -> List findByQuery2(edgeSearchQuery) +> List findEdgesByQuery(edgeSearchQuery) -Find related edges (findByQuery) +Find related edges (findEdgesByQuery) Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/EntitiesLimitRecipientsConfig.md b/ce/docs/EntitiesLimitRecipientsConfig.md new file mode 100644 index 00000000..521fb923 --- /dev/null +++ b/ce/docs/EntitiesLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntitiesLimitRecipientsConfig + +`org.thingsboard.client.model.EntitiesLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EntityActionRecipientsConfig.md b/ce/docs/EntityActionRecipientsConfig.md new file mode 100644 index 00000000..d1f26540 --- /dev/null +++ b/ce/docs/EntityActionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntityActionRecipientsConfig + +`org.thingsboard.client.model.EntityActionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EntityRelationControllerApi.md b/ce/docs/EntityRelationControllerApi.md index 42321be0..7c55d128 100644 --- a/ce/docs/EntityRelationControllerApi.md +++ b/ce/docs/EntityRelationControllerApi.md @@ -2,57 +2,30 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**deleteRelation**](#deleteRelation) | **DELETE** /api/relation | Delete Relation (deleteRelation) | -| [**deleteRelationV2**](#deleteRelationV2) | **DELETE** /api/v2/relation | Delete Relation (deleteRelationV2) | -| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteCommonRelations) | -| [**findByFromAndRelationType**](#findByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findByFromAndRelationType) | -| [**findByFromV2**](#findByFromV2) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findByFromV2) | -| [**findByQuery**](#findByQuery) | **POST** /api/relations | Find related entities (findByQuery) | -| [**findByToAndRelationType**](#findByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findByToAndRelationType) | -| [**findByToV2**](#findByToV2) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findByToV2) | -| [**findInfoByFromV2**](#findInfoByFromV2) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findInfoByFromV2) | -| [**findInfoByQuery**](#findInfoByQuery) | **POST** /api/relations/info | Find related entity infos (findInfoByQuery) | -| [**findInfoByToV2**](#findInfoByToV2) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findInfoByToV2) | +| [**deleteRelation**](#deleteRelation) | **DELETE** /api/v2/relation | Delete Relation (deleteRelation) | +| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteRelations) | +| [**findEntityRelationInfosByFrom**](#findEntityRelationInfosByFrom) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findEntityRelationInfosByFrom) | +| [**findEntityRelationInfosByQuery**](#findEntityRelationInfosByQuery) | **POST** /api/relations/info | Find related entity infos (findEntityRelationInfosByQuery) | +| [**findEntityRelationInfosByTo**](#findEntityRelationInfosByTo) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findEntityRelationInfosByTo) | +| [**findEntityRelationsByFrom**](#findEntityRelationsByFrom) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findEntityRelationsByFrom) | +| [**findEntityRelationsByFromAndRelationType**](#findEntityRelationsByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findEntityRelationsByFromAndRelationType) | +| [**findEntityRelationsByQuery**](#findEntityRelationsByQuery) | **POST** /api/relations | Find related entities (findEntityRelationsByQuery) | +| [**findEntityRelationsByTo**](#findEntityRelationsByTo) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findEntityRelationsByTo) | +| [**findEntityRelationsByToAndRelationType**](#findEntityRelationsByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findEntityRelationsByToAndRelationType) | | [**getRelation**](#getRelation) | **GET** /api/relation | Get Relation (getRelation) | -| [**saveRelation**](#saveRelation) | **POST** /api/relation | Create Relation (saveRelation) | -| [**saveRelationV2**](#saveRelationV2) | **POST** /api/v2/relation | Create Relation (saveRelationV2) | +| [**saveRelation**](#saveRelation) | **POST** /api/v2/relation | Create Relation (saveRelation) | ## deleteRelation -> deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) +> EntityRelation deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) Delete Relation (deleteRelation) Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | - -### Return type - -null (empty response body) - - -## deleteRelationV2 - -> EntityRelation deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup) - -Delete Relation (deleteRelationV2) - -Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | @@ -73,7 +46,7 @@ Deletes a relation between two entities in the platform. If the user has the a > deleteRelations(entityId, entityType) -Delete common relations (deleteCommonRelations) +Delete common relations (deleteRelations) Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. @@ -90,13 +63,13 @@ Deletes all the relations ('from' and 'to' direction) for the specified entity a null (empty response body) -## findByFromAndRelationType +## findEntityRelationInfosByFrom -> List findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) +> List findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByFromAndRelationType) +Get List of Relation Infos (findEntityRelationInfosByFrom) -Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters @@ -105,72 +78,70 @@ Returns list of relation objects for the specified entity by the 'from' directio |------------- | ------------- | ------------- | -------------| | **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByFromV2 +## findEntityRelationInfosByQuery -> List findByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationInfosByQuery(entityRelationsQuery) -Get List of Relations (findByFromV2) +Find related entity infos (findEntityRelationInfosByQuery) -Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findByQuery +## findEntityRelationInfosByTo -> List findByQuery(entityRelationsQuery) +> List findEntityRelationInfosByTo(toType, toId, relationTypeGroup) -Find related entities (findByQuery) +Get List of Relation Infos (findEntityRelationInfosByTo) -Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. +Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByToAndRelationType +## findEntityRelationsByFrom -> List findByToAndRelationType(toType, toId, relationType, relationTypeGroup) +> List findEntityRelationsByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByToAndRelationType) +Get List of Relations (findEntityRelationsByFrom) -Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -178,21 +149,22 @@ Returns list of relation objects for the specified entity by the 'to' direction **List** -## findByToV2 +## findEntityRelationsByFromAndRelationType -> List findByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) -Get List of Relations (findByToV2) +Get List of Relations (findEntityRelationsByFromAndRelationType) -Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -200,55 +172,55 @@ Returns list of relation objects for the specified entity by the 'to' direction. **List** -## findInfoByFromV2 +## findEntityRelationsByQuery -> List findInfoByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationsByQuery(entityRelationsQuery) -Get List of Relation Infos (findInfoByFromV2) +Find related entities (findEntityRelationsByQuery) -Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findInfoByQuery +## findEntityRelationsByTo -> List findInfoByQuery(entityRelationsQuery) +> List findEntityRelationsByTo(toType, toId, relationTypeGroup) -Find related entity infos (findInfoByQuery) +Get List of Relations (findEntityRelationsByTo) -Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findInfoByToV2 +## findEntityRelationsByToAndRelationType -> List findInfoByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup) -Get List of Relation Infos (findInfoByToV2) +Get List of Relations (findEntityRelationsByToAndRelationType) -Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters @@ -257,11 +229,12 @@ Returns list of relation info objects for the specified entity by the 'to' direc |------------- | ------------- | ------------- | -------------| | **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** ## getRelation @@ -291,33 +264,13 @@ Returns relation object between two specified entities if present. Otherwise thr ## saveRelation -> saveRelation(entityRelation) +> EntityRelation saveRelation(entityRelation) Create Relation (saveRelation) Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityRelation** | **EntityRelation** | | | - -### Return type - -null (empty response body) - - -## saveRelationV2 - -> EntityRelation saveRelationV2(entityRelation) - -Create Relation (saveRelationV2) - -Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | diff --git a/ce/docs/EntityViewControllerApi.md b/ce/docs/EntityViewControllerApi.md index f3b86e9b..b68c7e33 100644 --- a/ce/docs/EntityViewControllerApi.md +++ b/ce/docs/EntityViewControllerApi.md @@ -6,14 +6,14 @@ | [**assignEntityViewToEdge**](#assignEntityViewToEdge) | **POST** /api/edge/{edgeId}/entityView/{entityViewId} | Assign entity view to edge (assignEntityViewToEdge) | | [**assignEntityViewToPublicCustomer**](#assignEntityViewToPublicCustomer) | **POST** /api/customer/public/entityView/{entityViewId} | Make entity view publicly available (assignEntityViewToPublicCustomer) | | [**deleteEntityView**](#deleteEntityView) | **DELETE** /api/entityView/{entityViewId} | Delete entity view (deleteEntityView) | -| [**findByQuery1**](#findByQuery1) | **POST** /api/entityViews | Find related entity views (findByQuery) | +| [**findEntityViewsByQuery**](#findEntityViewsByQuery) | **POST** /api/entityViews | Find related entity views (findEntityViewsByQuery) | | [**getCustomerEntityViewInfos**](#getCustomerEntityViewInfos) | **GET** /api/customer/{customerId}/entityViewInfos | Get Customer Entity View info (getCustomerEntityViewInfos) | | [**getCustomerEntityViews**](#getCustomerEntityViews) | **GET** /api/customer/{customerId}/entityViews | Get Customer Entity Views (getCustomerEntityViews) | | [**getEdgeEntityViews**](#getEdgeEntityViews) | **GET** /api/edge/{edgeId}/entityViews | getEdgeEntityViews | | [**getEntityViewById**](#getEntityViewById) | **GET** /api/entityView/{entityViewId} | Get entity view (getEntityViewById) | | [**getEntityViewInfoById**](#getEntityViewInfoById) | **GET** /api/entityView/info/{entityViewId} | Get Entity View info (getEntityViewInfoById) | | [**getEntityViewTypes**](#getEntityViewTypes) | **GET** /api/entityView/types | Get Entity View Types (getEntityViewTypes) | -| [**getEntityViewsByIdsV2**](#getEntityViewsByIdsV2) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIdsV2) | +| [**getEntityViewsByIds**](#getEntityViewsByIds) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIds) | | [**getTenantEntityViewByName**](#getTenantEntityViewByName) | **GET** /api/tenant/entityView | Get Entity View by name (getTenantEntityViewByName) | | [**getTenantEntityViewInfos**](#getTenantEntityViewInfos) | **GET** /api/tenant/entityViewInfos | Get Tenant Entity Views (getTenantEntityViews) | | [**getTenantEntityViews**](#getTenantEntityViews) | **GET** /api/tenant/entityViews | Get Tenant Entity Views (getTenantEntityViews) | @@ -105,11 +105,11 @@ Delete the EntityView object based on the provided entity view id. Available f null (empty response body) -## findByQuery1 +## findEntityViewsByQuery -> List findByQuery1(entityViewSearchQuery) +> List findEntityViewsByQuery(entityViewSearchQuery) -Find related entity views (findByQuery) +Find related entity views (findEntityViewsByQuery) Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -256,11 +256,11 @@ Returns a set of unique entity view types based on entity views that are either **List** -## getEntityViewsByIdsV2 +## getEntityViewsByIds -> List getEntityViewsByIdsV2(entityViewIds) +> List getEntityViewsByIds(entityViewIds) -Get Entity Views By Ids (getEntityViewsByIdsV2) +Get Entity Views By Ids (getEntityViewsByIds) Requested entity views must be owned by tenant or assigned to customer which user is performing the request. diff --git a/ce/docs/EntityViewExportData.md b/ce/docs/EntityViewExportData.md new file mode 100644 index 00000000..bc849104 --- /dev/null +++ b/ce/docs/EntityViewExportData.md @@ -0,0 +1,23 @@ + +# EntityViewExportData + +`org.thingsboard.client.model.EntityViewExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EventControllerApi.md b/ce/docs/EventControllerApi.md index 9fd38f85..5832492f 100644 --- a/ce/docs/EventControllerApi.md +++ b/ce/docs/EventControllerApi.md @@ -3,9 +3,8 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**clearEvents**](#clearEvents) | **POST** /api/events/{entityType}/{entityId}/clear | Clear Events (clearEvents) | -| [**getEvents**](#getEvents) | **GET** /api/events/{entityType}/{entityId} | Get Events (Deprecated) | -| [**getEvents1**](#getEvents1) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEvents) | -| [**getEvents2**](#getEvents2) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEvents) | +| [**getEventsByFilter**](#getEventsByFilter) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEventsByFilter) | +| [**getEventsByType**](#getEventsByType) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEventsByType) | @@ -33,40 +32,11 @@ Clears events by filter for specified entity. null (empty response body) -## getEvents +## getEventsByFilter -> PageDataEventInfo getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events (Deprecated) - -Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The value is not used in searching. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: ts, id] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | -| **startTime** | **Long** | Timestamp. Events with creation time before it won't be queried. | [optional] | -| **endTime** | **Long** | Timestamp. Events with creation time after it won't be queried. | [optional] | - -### Return type - -**PageDataEventInfo** - - -## getEvents1 - -> PageDataEventInfo getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) - -Get Events by event filter (getEvents) +Get Events by event filter (getEventsByFilter) Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. @@ -92,11 +62,11 @@ Returns a page of events for the chosen entity by specifying the event filter. Y **PageDataEventInfo** -## getEvents2 +## getEventsByType -> PageDataEventInfo getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events by type (getEvents) +Get Events by type (getEventsByType) Returns a page of events for specified entity by specifying event type. 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 response schema for more details. diff --git a/ce/docs/FeaturesInfo.md b/ce/docs/FeaturesInfo.md index 117e5fd6..ebf4ca82 100644 --- a/ce/docs/FeaturesInfo.md +++ b/ce/docs/FeaturesInfo.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **smsEnabled** | **Boolean** | | [optional] | +| **oauthEnabled** | **Boolean** | | [optional] | | **notificationEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | | **emailEnabled** | **Boolean** | | [optional] | -| **smsEnabled** | **Boolean** | | [optional] | -| **oauthEnabled** | **Boolean** | | [optional] | diff --git a/ce/docs/Lwm2mControllerApi.md b/ce/docs/Lwm2mControllerApi.md index 0210faff..6f6e905a 100644 --- a/ce/docs/Lwm2mControllerApi.md +++ b/ce/docs/Lwm2mControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getLwm2mBootstrapSecurityInfo**](#getLwm2mBootstrapSecurityInfo) | **GET** /api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer} | Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo) | -| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save device with credentials (Deprecated) | +| [**saveLwm2mDeviceWithCredentials**](#saveLwm2mDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) | @@ -27,11 +27,11 @@ Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the **LwM2MServerSecurityConfigDefault** -## saveDeviceWithCredentials +## saveLwm2mDeviceWithCredentials -> Device saveDeviceWithCredentials(requestBody) +> Device saveLwm2mDeviceWithCredentials(requestBody) -Save device with credentials (Deprecated) +Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) ### Parameters diff --git a/ce/docs/MailConfigTemplateControllerApi.md b/ce/docs/MailConfigTemplateControllerApi.md index 16e82199..3161d437 100644 --- a/ce/docs/MailConfigTemplateControllerApi.md +++ b/ce/docs/MailConfigTemplateControllerApi.md @@ -2,15 +2,15 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getClientRegistrationTemplates1**](#getClientRegistrationTemplates1) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getMailConfigTemplates**](#getMailConfigTemplates) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | -## getClientRegistrationTemplates1 +## getMailConfigTemplates -> com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() +> com.fasterxml.jackson.databind.JsonNode getMailConfigTemplates() -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Mail configuration template is set of default smtp settings for mail server that specific provider supports diff --git a/ce/docs/MobileAppBundleControllerApi.md b/ce/docs/MobileAppBundleControllerApi.md index abcd08eb..40de3c73 100644 --- a/ce/docs/MobileAppBundleControllerApi.md +++ b/ce/docs/MobileAppBundleControllerApi.md @@ -6,7 +6,7 @@ | [**getMobileAppBundleInfoById**](#getMobileAppBundleInfoById) | **GET** /api/mobile/bundle/info/{id} | Get mobile app bundle info by id (getMobileAppBundleInfoById) | | [**getTenantMobileAppBundleInfos**](#getTenantMobileAppBundleInfos) | **GET** /api/mobile/bundle/infos | Get mobile app bundle infos (getTenantMobileAppBundleInfos) | | [**saveMobileAppBundle**](#saveMobileAppBundle) | **POST** /api/mobile/bundle | Save Or update Mobile app bundle (saveMobileAppBundle) | -| [**updateOauth2Clients**](#updateOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateMobileAppBundleOauth2Clients**](#updateMobileAppBundleOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateMobileAppBundleOauth2Clients) | @@ -95,11 +95,11 @@ Create or update the Mobile app bundle that represents tha pair of ANDROID and I **MobileAppBundle** -## updateOauth2Clients +## updateMobileAppBundleOauth2Clients -> updateOauth2Clients(id, UUID) +> updateMobileAppBundleOauth2Clients(id, UUID) -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateMobileAppBundleOauth2Clients) Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/MobileAppControllerApi.md b/ce/docs/MobileAppControllerApi.md index 08f713ba..4aad90c2 100644 --- a/ce/docs/MobileAppControllerApi.md +++ b/ce/docs/MobileAppControllerApi.md @@ -4,8 +4,8 @@ |------------- | ------------- | -------------| | [**deleteMobileApp**](#deleteMobileApp) | **DELETE** /api/mobile/app/{id} | Delete Mobile App by ID (deleteMobileApp) | | [**getLoginMobileInfo**](#getLoginMobileInfo) | **GET** /api/noauth/mobile | Get mobile app login info (getLoginMobileInfo) | -| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppInfoById) | -| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileAppInfos) | +| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppById) | +| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileApps) | | [**getUserMobileInfo**](#getUserMobileInfo) | **GET** /api/mobile | Get user mobile app basic info (getUserMobileInfo) | | [**saveMobileApp**](#saveMobileApp) | **POST** /api/mobile/app | Save Or update Mobile app (saveMobileApp) | @@ -54,7 +54,7 @@ Get mobile app login info (getLoginMobileInfo) > MobileApp getMobileAppById(id) -Get mobile info by id (getMobileAppInfoById) +Get mobile info by id (getMobileAppById) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -74,7 +74,7 @@ Get mobile info by id (getMobileAppInfoById) > PageDataMobileApp getTenantMobileApps(pageSize, page, platformType, textSearch, sortProperty, sortOrder) -Get mobile app infos (getTenantMobileAppInfos) +Get mobile app infos (getTenantMobileApps) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/NewPlatformVersionRecipientsConfig.md b/ce/docs/NewPlatformVersionRecipientsConfig.md new file mode 100644 index 00000000..07ba72bb --- /dev/null +++ b/ce/docs/NewPlatformVersionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# NewPlatformVersionRecipientsConfig + +`org.thingsboard.client.model.NewPlatformVersionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/NotificationRequestStats.md b/ce/docs/NotificationRequestStats.md index 8a389f6a..88e271ba 100644 --- a/ce/docs/NotificationRequestStats.md +++ b/ce/docs/NotificationRequestStats.md @@ -9,9 +9,9 @@ Notification request processing statistics | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **sent** | **Map\** | Number of successfully sent notifications per delivery method | [optional] | +| **sent** | **Map\** | Number of successfully sent notifications per delivery method | [optional] | | **errors** | **Map\\>** | Errors per delivery method. Each entry maps recipient name to error message | [optional] | -| **totalErrors** | **Object** | | [optional] | +| **totalErrors** | **Integer** | Total number of errors across all delivery methods | [optional] | | **error** | **String** | General error message if the entire request failed | [optional] | diff --git a/ce/docs/NotificationRuleExportData.md b/ce/docs/NotificationRuleExportData.md new file mode 100644 index 00000000..87087bd9 --- /dev/null +++ b/ce/docs/NotificationRuleExportData.md @@ -0,0 +1,23 @@ + +# NotificationRuleExportData + +`org.thingsboard.client.model.NotificationRuleExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/NotificationTargetControllerApi.md b/ce/docs/NotificationTargetControllerApi.md index 2965783c..c9341cff 100644 --- a/ce/docs/NotificationTargetControllerApi.md +++ b/ce/docs/NotificationTargetControllerApi.md @@ -5,8 +5,8 @@ | [**deleteNotificationTargetById**](#deleteNotificationTargetById) | **DELETE** /api/notification/target/{id} | Delete notification target by id (deleteNotificationTargetById) | | [**getNotificationTargetById**](#getNotificationTargetById) | **GET** /api/notification/target/{id} | Get notification target by id (getNotificationTargetById) | | [**getNotificationTargets**](#getNotificationTargets) | **GET** /api/notification/targets | Get notification targets (getNotificationTargets) | -| [**getNotificationTargetsByIdsV2**](#getNotificationTargetsByIdsV2) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIdsV2) | -| [**getNotificationTargetsBySupportedNotificationTypeV2**](#getNotificationTargetsBySupportedNotificationTypeV2) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) | +| [**getNotificationTargetsByIds**](#getNotificationTargetsByIds) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIds) | +| [**getNotificationTargetsBySupportedNotificationType**](#getNotificationTargetsBySupportedNotificationType) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) | | [**getRecipientsForNotificationTargetConfig**](#getRecipientsForNotificationTargetConfig) | **POST** /api/notification/target/recipients | Get recipients for notification target config (getRecipientsForNotificationTargetConfig) | | [**saveNotificationTarget**](#saveNotificationTarget) | **POST** /api/notification/target | Save notification target (saveNotificationTarget) | @@ -76,11 +76,11 @@ Returns the page of notification targets owned by sysadmin or tenant. You can s **PageDataNotificationTarget** -## getNotificationTargetsByIdsV2 +## getNotificationTargetsByIds -> List getNotificationTargetsByIdsV2(ids) +> List getNotificationTargetsByIds(ids) -Get notification targets by ids (getNotificationTargetsByIdsV2) +Get notification targets by ids (getNotificationTargetsByIds) Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -96,11 +96,11 @@ Returns the list of notification targets found by provided ids. Available for u **List** -## getNotificationTargetsBySupportedNotificationTypeV2 +## getNotificationTargetsBySupportedNotificationType -> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) -Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) +Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/NotificationTargetExportData.md b/ce/docs/NotificationTargetExportData.md new file mode 100644 index 00000000..bec4f95a --- /dev/null +++ b/ce/docs/NotificationTargetExportData.md @@ -0,0 +1,26 @@ + +# NotificationTargetExportData + +`org.thingsboard.client.model.NotificationTargetExportData` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **entityType** | **EntityType** | | | +| **entity** | **ExportableEntity** | | [optional] | +| **relations** | **List\** | | [optional] | +| **attributes** | **Map\\>** | Map of attributes where key is the scope of attributes and value is the list of attributes for that scope | [optional] | +| **calculatedFields** | **List\** | | [optional] | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/NotificationTemplateExportData.md b/ce/docs/NotificationTemplateExportData.md new file mode 100644 index 00000000..8bd15980 --- /dev/null +++ b/ce/docs/NotificationTemplateExportData.md @@ -0,0 +1,23 @@ + +# NotificationTemplateExportData + +`org.thingsboard.client.model.NotificationTemplateExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/OAuth2ConfigTemplateControllerApi.md b/ce/docs/OAuth2ConfigTemplateControllerApi.md index 13ecaa21..ed3c77ad 100644 --- a/ce/docs/OAuth2ConfigTemplateControllerApi.md +++ b/ce/docs/OAuth2ConfigTemplateControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteClientRegistrationTemplate**](#deleteClientRegistrationTemplate) | **DELETE** /api/oauth2/config/template/{clientRegistrationTemplateId} | Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | -| [**getClientRegistrationTemplates**](#getClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getOAuth2ClientRegistrationTemplates**](#getOAuth2ClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | | [**saveClientRegistrationTemplate**](#saveClientRegistrationTemplate) | **POST** /api/oauth2/config/template | Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | @@ -28,11 +28,11 @@ Client registration template is OAuth2 provider configuration template with defa null (empty response body) -## getClientRegistrationTemplates +## getOAuth2ClientRegistrationTemplates -> List getClientRegistrationTemplates() +> List getOAuth2ClientRegistrationTemplates() -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients diff --git a/ce/docs/OAuth2ControllerApi.md b/ce/docs/OAuth2ControllerApi.md index 11ef5665..9582aedd 100644 --- a/ce/docs/OAuth2ControllerApi.md +++ b/ce/docs/OAuth2ControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**deleteOauth2Client**](#deleteOauth2Client) | **DELETE** /api/oauth2/client/{id} | Delete oauth2 client (deleteOauth2Client) | | [**findTenantOAuth2ClientInfos**](#findTenantOAuth2ClientInfos) | **GET** /api/oauth2/client/infos | Get OAuth2 Client infos (findTenantOAuth2ClientInfos) | -| [**findTenantOAuth2ClientInfosByIdsV2**](#findTenantOAuth2ClientInfosByIdsV2) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) | +| [**findTenantOAuth2ClientInfosByIds**](#findTenantOAuth2ClientInfosByIds) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) | | [**getLoginProcessingUrl**](#getLoginProcessingUrl) | **GET** /api/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getLoginProcessingUrl) | | [**getOAuth2ClientById**](#getOAuth2ClientById) | **GET** /api/oauth2/client/{id} | Get OAuth2 Client by id (getOAuth2ClientById) | | [**getOAuth2Clients**](#getOAuth2Clients) | **POST** /api/noauth/oauth2Clients | Get OAuth2 clients (getOAuth2Clients) | @@ -56,11 +56,11 @@ Get OAuth2 Client infos (findTenantOAuth2ClientInfos) **PageDataOAuth2ClientInfo** -## findTenantOAuth2ClientInfosByIdsV2 +## findTenantOAuth2ClientInfosByIds -> List findTenantOAuth2ClientInfosByIdsV2(clientIds) +> List findTenantOAuth2ClientInfosByIds(clientIds) -Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) +Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/OtaPackageControllerApi.md b/ce/docs/OtaPackageControllerApi.md index 653bd0b8..dcfb9768 100644 --- a/ce/docs/OtaPackageControllerApi.md +++ b/ce/docs/OtaPackageControllerApi.md @@ -7,7 +7,7 @@ | [**getOtaPackageById**](#getOtaPackageById) | **GET** /api/otaPackage/{otaPackageId} | Get OTA Package (getOtaPackageById) | | [**getOtaPackageInfoById**](#getOtaPackageInfoById) | **GET** /api/otaPackage/info/{otaPackageId} | Get OTA Package Info (getOtaPackageInfoById) | | [**getOtaPackages**](#getOtaPackages) | **GET** /api/otaPackages | Get OTA Package Infos (getOtaPackages) | -| [**getOtaPackages1**](#getOtaPackages1) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos (getOtaPackages) | +| [**getOtaPackagesByDeviceProfileAndType**](#getOtaPackagesByDeviceProfileAndType) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) | | [**saveOtaPackageData**](#saveOtaPackageData) | **POST** /api/otaPackage/{otaPackageId} | Save OTA Package data (saveOtaPackageData) | | [**saveOtaPackageInfo**](#saveOtaPackageInfo) | **POST** /api/otaPackage | Create Or Update OTA Package Info (saveOtaPackageInfo) | @@ -117,11 +117,11 @@ Returns a page of OTA Package Info objects owned by tenant. You can specify para **PageDataOtaPackageInfo** -## getOtaPackages1 +## getOtaPackagesByDeviceProfileAndType -> PageDataOtaPackageInfo getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataOtaPackageInfo getOtaPackagesByDeviceProfileAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) -Get OTA Package Infos (getOtaPackages) +Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/QrCodeSettingsControllerApi.md b/ce/docs/QrCodeSettingsControllerApi.md index 50bf2df1..1f41c3a9 100644 --- a/ce/docs/QrCodeSettingsControllerApi.md +++ b/ce/docs/QrCodeSettingsControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**getApplicationRedirect**](#getApplicationRedirect) | **GET** /api/noauth/qr | getApplicationRedirect | | [**getMobileAppDeepLink**](#getMobileAppDeepLink) | **GET** /api/mobile/qr/deepLink | Get the deep link to the associated mobile application (getMobileAppDeepLink) | -| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getMobileAppSettings) | +| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getQrCodeSettings) | | [**getUserTokenByMobileSecret**](#getUserTokenByMobileSecret) | **GET** /api/noauth/qr/{secret} | Get User Token (getUserTokenByMobileSecret) | | [**saveQrCodeSettings**](#saveQrCodeSettings) | **POST** /api/mobile/qr/settings | Create Or Update the Mobile application settings (saveMobileAppSettings) | @@ -45,7 +45,7 @@ Fetch the url that takes user to linked mobile application Available for any a > QrCodeSettings getQrCodeSettings() -Get Mobile application settings (getMobileAppSettings) +Get Mobile application settings (getQrCodeSettings) The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. diff --git a/ce/docs/QueueStatsControllerApi.md b/ce/docs/QueueStatsControllerApi.md index 4877e79d..f9316c00 100644 --- a/ce/docs/QueueStatsControllerApi.md +++ b/ce/docs/QueueStatsControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getQueueStatsById**](#getQueueStatsById) | **GET** /api/queueStats/{queueStatsId} | Get Queue stats entity by id (getQueueStatsById) | -| [**getQueueStatsByIdsV2**](#getQueueStatsByIdsV2) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIdsV2) | +| [**getQueueStatsByIds**](#getQueueStatsByIds) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIds) | | [**getTenantQueueStats**](#getTenantQueueStats) | **GET** /api/queueStats | Get Queue Stats entities (getTenantQueueStats) | @@ -28,11 +28,11 @@ Fetch the Queue stats object based on the provided Queue stats id. Available f **QueueStats** -## getQueueStatsByIdsV2 +## getQueueStatsByIds -> List getQueueStatsByIdsV2(queueStatsIds) +> List getQueueStatsByIds(queueStatsIds) -Get QueueStats By Ids (getQueueStatsByIdsV2) +Get QueueStats By Ids (getQueueStatsByIds) Fetch the Queue stats objects based on the provided ids. diff --git a/ce/docs/RateLimitsRecipientsConfig.md b/ce/docs/RateLimitsRecipientsConfig.md new file mode 100644 index 00000000..ccfdc7a9 --- /dev/null +++ b/ce/docs/RateLimitsRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RateLimitsRecipientsConfig + +`org.thingsboard.client.model.RateLimitsRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/ResourceShortageRecipientsConfig.md b/ce/docs/ResourceShortageRecipientsConfig.md new file mode 100644 index 00000000..b5749bba --- /dev/null +++ b/ce/docs/ResourceShortageRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ResourceShortageRecipientsConfig + +`org.thingsboard.client.model.ResourceShortageRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/RpcV1ControllerApi.md b/ce/docs/RpcV1ControllerApi.md index 9763fabd..f9983683 100644 --- a/ce/docs/RpcV1ControllerApi.md +++ b/ce/docs/RpcV1ControllerApi.md @@ -2,16 +2,16 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleOneWayDeviceRPCRequest1**](#handleOneWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequest) | -| [**handleTwoWayDeviceRPCRequest1**](#handleTwoWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequest) | +| [**handleOneWayDeviceRPCRequestV1**](#handleOneWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV1) | +| [**handleTwoWayDeviceRPCRequestV1**](#handleTwoWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) | -## handleOneWayDeviceRPCRequest1 +## handleOneWayDeviceRPCRequestV1 -> String handleOneWayDeviceRPCRequest1(deviceId, body) +> String handleOneWayDeviceRPCRequestV1(deviceId, body) -Send one-way RPC request (handleOneWayDeviceRPCRequest) +Send one-way RPC request (handleOneWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -28,11 +28,11 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ **String** -## handleTwoWayDeviceRPCRequest1 +## handleTwoWayDeviceRPCRequestV1 -> String handleTwoWayDeviceRPCRequest1(deviceId, body) +> String handleTwoWayDeviceRPCRequestV1(deviceId, body) -Send two-way RPC request (handleTwoWayDeviceRPCRequest) +Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/RpcV2ControllerApi.md b/ce/docs/RpcV2ControllerApi.md index 577833cf..55de9d16 100644 --- a/ce/docs/RpcV2ControllerApi.md +++ b/ce/docs/RpcV2ControllerApi.md @@ -5,8 +5,8 @@ | [**deleteRpc**](#deleteRpc) | **DELETE** /api/rpc/persistent/{rpcId} | Delete persistent RPC | | [**getPersistedRpc**](#getPersistedRpc) | **GET** /api/rpc/persistent/{rpcId} | Get persistent RPC request | | [**getPersistedRpcByDevice**](#getPersistedRpcByDevice) | **GET** /api/rpc/persistent/device/{deviceId} | Get persistent RPC requests | -| [**handleOneWayDeviceRPCRequest**](#handleOneWayDeviceRPCRequest) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request | -| [**handleTwoWayDeviceRPCRequest**](#handleTwoWayDeviceRPCRequest) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request | +| [**handleOneWayDeviceRPCRequestV2**](#handleOneWayDeviceRPCRequestV2) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV2) | +| [**handleTwoWayDeviceRPCRequestV2**](#handleTwoWayDeviceRPCRequestV2) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) | @@ -76,11 +76,11 @@ Allows to query RPC calls for specific device using pagination. Available for u **String** -## handleOneWayDeviceRPCRequest +## handleOneWayDeviceRPCRequestV2 -> String handleOneWayDeviceRPCRequest(deviceId, body) +> String handleOneWayDeviceRPCRequestV2(deviceId, body) -Send one-way RPC request +Send one-way RPC request (handleOneWayDeviceRPCRequestV2) Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -97,11 +97,11 @@ Sends the one-way remote-procedure call (RPC) request to device. Sends the one-w **String** -## handleTwoWayDeviceRPCRequest +## handleTwoWayDeviceRPCRequestV2 -> String handleTwoWayDeviceRPCRequest(deviceId, body) +> String handleTwoWayDeviceRPCRequestV2(deviceId, body) -Send two-way RPC request +Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/RuleChainControllerApi.md b/ce/docs/RuleChainControllerApi.md index d399bac6..61ba4ecd 100644 --- a/ce/docs/RuleChainControllerApi.md +++ b/ce/docs/RuleChainControllerApi.md @@ -13,16 +13,16 @@ | [**getRuleChainOutputLabels**](#getRuleChainOutputLabels) | **GET** /api/ruleChain/{ruleChainId}/output/labels | Get Rule Chain output labels (getRuleChainOutputLabels) | | [**getRuleChainOutputLabelsUsage**](#getRuleChainOutputLabelsUsage) | **GET** /api/ruleChain/{ruleChainId}/output/labels/usage | Get output labels usage (getRuleChainOutputLabelsUsage) | | [**getRuleChains**](#getRuleChains) | **GET** /api/ruleChains | Get Rule Chains (getRuleChains) | -| [**getRuleChainsByIdsV2**](#getRuleChainsByIdsV2) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIdsV2) | +| [**getRuleChainsByIds**](#getRuleChainsByIds) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIds) | | [**importRuleChains**](#importRuleChains) | **POST** /api/ruleChains/import | Import Rule Chains | | [**isTbelEnabled**](#isTbelEnabled) | **GET** /api/ruleChain/tbelEnabled | Is TBEL script executor enabled | | [**saveRuleChain**](#saveRuleChain) | **POST** /api/ruleChain | Create Or Update Rule Chain (saveRuleChain) | -| [**saveRuleChain1**](#saveRuleChain1) | **POST** /api/ruleChain/device/default | Create Default Rule Chain | | [**saveRuleChainMetaData**](#saveRuleChainMetaData) | **POST** /api/ruleChain/metadata | Update Rule Chain Metadata | | [**setAutoAssignToEdgeRuleChain**](#setAutoAssignToEdgeRuleChain) | **POST** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) | +| [**setDeviceDefaultRuleChain**](#setDeviceDefaultRuleChain) | **POST** /api/ruleChain/device/default | Create Default Rule Chain (setDeviceDefaultRuleChain) | | [**setEdgeTemplateRootRuleChain**](#setEdgeTemplateRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/edgeTemplateRoot | Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain) | | [**setRootRuleChain**](#setRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/root | Set Root Rule Chain (setRootRuleChain) | -| [**testScript**](#testScript) | **POST** /api/ruleChain/testScript | Test Script function | +| [**testRuleChainScript**](#testRuleChainScript) | **POST** /api/ruleChain/testScript | Test Script function | | [**unassignRuleChainFromEdge**](#unassignRuleChainFromEdge) | **DELETE** /api/edge/{edgeId}/ruleChain/{ruleChainId} | Unassign rule chain from edge (unassignRuleChainFromEdge) | | [**unsetAutoAssignToEdgeRuleChain**](#unsetAutoAssignToEdgeRuleChain) | **DELETE** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain) | @@ -252,11 +252,11 @@ Returns a page of Rule Chains owned by tenant. The rule chain object is lightwei **PageDataRuleChain** -## getRuleChainsByIdsV2 +## getRuleChainsByIds -> List getRuleChainsByIdsV2(ruleChainIds) +> List getRuleChainsByIds(ruleChainIds) -Get Rule Chains By Ids (getRuleChainsByIdsV2) +Get Rule Chains By Ids (getRuleChainsByIds) Requested rule chains must be owned by tenant which is performing the request. @@ -326,61 +326,61 @@ Create or update the Rule Chain. When creating Rule Chain, platform generates Ru **RuleChain** -## saveRuleChain1 +## saveRuleChainMetaData -> RuleChain saveRuleChain1(defaultRuleChainCreateRequest) +> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) -Create Default Rule Chain +Update Rule Chain Metadata -Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. +Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | +| **ruleChainMetaData** | **RuleChainMetaData** | | | +| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | ### Return type -**RuleChain** +**RuleChainMetaData** -## saveRuleChainMetaData +## setAutoAssignToEdgeRuleChain -> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) +> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) -Update Rule Chain Metadata +Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) -Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. +Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainMetaData** | **RuleChainMetaData** | | | -| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | +| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type -**RuleChainMetaData** +**RuleChain** -## setAutoAssignToEdgeRuleChain +## setDeviceDefaultRuleChain -> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) +> RuleChain setDeviceDefaultRuleChain(defaultRuleChainCreateRequest) -Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) +Create Default Rule Chain (setDeviceDefaultRuleChain) -Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. +Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | ### Return type @@ -427,9 +427,9 @@ Makes the rule chain to be root rule chain. Updates previous root rule chain as **RuleChain** -## testScript +## testRuleChainScript -> com.fasterxml.jackson.databind.JsonNode testScript(body, scriptLang) +> com.fasterxml.jackson.databind.JsonNode testRuleChainScript(body, scriptLang) Test Script function diff --git a/ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md b/ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md new file mode 100644 index 00000000..47641ea3 --- /dev/null +++ b/ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RuleEngineComponentLifecycleEventRecipientsConfig + +`org.thingsboard.client.model.RuleEngineComponentLifecycleEventRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/RuleEngineControllerApi.md b/ce/docs/RuleEngineControllerApi.md index b5997660..68f52a68 100644 --- a/ce/docs/RuleEngineControllerApi.md +++ b/ce/docs/RuleEngineControllerApi.md @@ -2,18 +2,18 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleRuleEngineRequest**](#handleRuleEngineRequest) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest1**](#handleRuleEngineRequest1) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest2**](#handleRuleEngineRequest2) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest3**](#handleRuleEngineRequest3) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequest) | +| [**handleRuleEngineRequestForEntity**](#handleRuleEngineRequestForEntity) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequestForEntity) | +| [**handleRuleEngineRequestForEntityWithQueueAndTimeout**](#handleRuleEngineRequestForEntityWithQueueAndTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) | +| [**handleRuleEngineRequestForEntityWithTimeout**](#handleRuleEngineRequestForEntityWithTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) | +| [**handleRuleEngineRequestForUser**](#handleRuleEngineRequestForUser) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequestForUser) | -## handleRuleEngineRequest +## handleRuleEngineRequestForEntity -> String handleRuleEngineRequest(entityType, entityId, body) +> String handleRuleEngineRequestForEntity(entityType, entityId, body) -Push entity message to the rule engine (handleRuleEngineRequest) +Push entity message to the rule engine (handleRuleEngineRequestForEntity) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -31,13 +31,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest1 +## handleRuleEngineRequestForEntityWithQueueAndTimeout -> String handleRuleEngineRequest1(entityType, entityId, timeout, body) +> String handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body) -Push entity message with timeout to the rule engine (handleRuleEngineRequest) +Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -46,6 +46,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -54,13 +55,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest2 +## handleRuleEngineRequestForEntityWithTimeout -> String handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body) +> String handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body) -Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) +Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -69,7 +70,6 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -78,11 +78,11 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest3 +## handleRuleEngineRequestForUser -> String handleRuleEngineRequest3(body) +> String handleRuleEngineRequestForUser(body) -Push user message to the rule engine (handleRuleEngineRequest) +Push user message to the rule engine (handleRuleEngineRequestForUser) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). diff --git a/ce/docs/TaskProcessingFailureRecipientsConfig.md b/ce/docs/TaskProcessingFailureRecipientsConfig.md new file mode 100644 index 00000000..adf0cf8e --- /dev/null +++ b/ce/docs/TaskProcessingFailureRecipientsConfig.md @@ -0,0 +1,24 @@ + +# TaskProcessingFailureRecipientsConfig + +`org.thingsboard.client.model.TaskProcessingFailureRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/TbResource.md b/ce/docs/TbResource.md index e0042cae..9d107784 100644 --- a/ce/docs/TbResource.md +++ b/ce/docs/TbResource.md @@ -24,8 +24,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **link** | **String** | | [optional] [readonly] | | **publicLink** | **String** | | [optional] [readonly] | +| **link** | **String** | | [optional] [readonly] | diff --git a/ce/docs/TbResourceControllerApi.md b/ce/docs/TbResourceControllerApi.md index 075c8088..6c43de22 100644 --- a/ce/docs/TbResourceControllerApi.md +++ b/ce/docs/TbResourceControllerApi.md @@ -8,15 +8,15 @@ | [**downloadLwm2mResourceIfChanged**](#downloadLwm2mResourceIfChanged) | **GET** /api/resource/lwm2m/{resourceId}/download | Download LWM2M Resource (downloadLwm2mResourceIfChanged) | | [**downloadPkcs12ResourceIfChanged**](#downloadPkcs12ResourceIfChanged) | **GET** /api/resource/pkcs12/{resourceId}/download | Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged) | | [**downloadResource**](#downloadResource) | **GET** /api/resource/{resourceId}/download | Download Resource (downloadResource) | -| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResource) | +| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResourceIfChanged) | | [**getLwm2mListObjects**](#getLwm2mListObjects) | **GET** /api/resource/lwm2m | Get LwM2M Objects (getLwm2mListObjects) | | [**getLwm2mListObjectsPage**](#getLwm2mListObjectsPage) | **GET** /api/resource/lwm2m/page | Get LwM2M Objects (getLwm2mListObjectsPage) | | [**getResourceById**](#getResourceById) | **GET** /api/resource/{resourceId} | Get Resource (getResourceById) | | [**getResourceInfo**](#getResourceInfo) | **GET** /api/resource/{resourceType}/{scope}/{key}/info | Get resource info (getResourceInfo) | | [**getResourceInfoById**](#getResourceInfoById) | **GET** /api/resource/info/{resourceId} | Get Resource Info (getResourceInfoById) | | [**getResources**](#getResources) | **GET** /api/resource | Get Resource Infos (getResources) | -| [**getSystemOrTenantResourcesByIdsV2**](#getSystemOrTenantResourcesByIdsV2) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) | -| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getAllResources) | +| [**getSystemOrTenantResourcesByIds**](#getSystemOrTenantResourcesByIds) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIds) | +| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getTenantResources) | | [**saveResource**](#saveResource) | **POST** /api/resource | Create Or Update Resource (saveResource) | | [**updateResourceData**](#updateResourceData) | **PUT** /api/resource/{id}/data | updateResourceData | | [**updateResourceInfo**](#updateResourceInfo) | **PUT** /api/resource/{id}/info | updateResourceInfo | @@ -153,7 +153,7 @@ Download Resource based on the provided Resource Id. Available for users with ' > File downloadResourceIfChanged(resourceType, scope, key, ifNoneMatch) -Download resource (downloadResource) +Download resource (downloadResourceIfChanged) Download resource with a given type and key for the given scope Available for any authorized user. @@ -306,11 +306,11 @@ Returns a page of Resource Info objects owned by tenant or sysadmin. You can spe **PageDataTbResourceInfo** -## getSystemOrTenantResourcesByIdsV2 +## getSystemOrTenantResourcesByIds -> List getSystemOrTenantResourcesByIdsV2(resourceIds) +> List getSystemOrTenantResourcesByIds(resourceIds) -Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) +Get Resource Infos by ids (getSystemOrTenantResourcesByIds) ### Parameters @@ -328,7 +328,7 @@ Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) > PageDataTbResourceInfo getTenantResources(pageSize, page, textSearch, sortProperty, sortOrder) -Get All Resource Infos (getAllResources) +Get All Resource Infos (getTenantResources) Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. diff --git a/ce/docs/TbResourceExportData.md b/ce/docs/TbResourceExportData.md new file mode 100644 index 00000000..22a0bee1 --- /dev/null +++ b/ce/docs/TbResourceExportData.md @@ -0,0 +1,23 @@ + +# TbResourceExportData + +`org.thingsboard.client.model.TbResourceExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/TbResourceInfo.md b/ce/docs/TbResourceInfo.md index fe6ef5bc..4a87a800 100644 --- a/ce/docs/TbResourceInfo.md +++ b/ce/docs/TbResourceInfo.md @@ -22,8 +22,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **link** | **String** | | [optional] [readonly] | | **publicLink** | **String** | | [optional] [readonly] | +| **link** | **String** | | [optional] [readonly] | diff --git a/ce/docs/TenantControllerApi.md b/ce/docs/TenantControllerApi.md index 326cbaa0..2067ac89 100644 --- a/ce/docs/TenantControllerApi.md +++ b/ce/docs/TenantControllerApi.md @@ -7,7 +7,7 @@ | [**getTenantInfoById**](#getTenantInfoById) | **GET** /api/tenant/info/{tenantId} | Get Tenant Info (getTenantInfoById) | | [**getTenantInfos**](#getTenantInfos) | **GET** /api/tenantInfos | Get Tenants Info (getTenants) | | [**getTenants**](#getTenants) | **GET** /api/tenants | Get Tenants (getTenants) | -| [**getTenantsByIdsV2**](#getTenantsByIdsV2) | **GET** /api/tenants/list | Get Tenants list (getTenantsByIdsV2) | +| [**getTenantsByIds**](#getTenantsByIds) | **GET** /api/tenants/list | Get Tenants list (getTenantsByIds) | | [**saveTenant**](#saveTenant) | **POST** /api/tenant | Create Or update Tenant (saveTenant) | @@ -120,11 +120,11 @@ Returns a page of tenants registered in the platform. You can specify parameters **PageDataTenant** -## getTenantsByIdsV2 +## getTenantsByIds -> List getTenantsByIdsV2(tenantIds) +> List getTenantsByIds(tenantIds) -Get Tenants list (getTenantsByIdsV2) +Get Tenants list (getTenantsByIds) ### Parameters diff --git a/ce/docs/TwoFactorAuthConfigControllerApi.md b/ce/docs/TwoFactorAuthConfigControllerApi.md index 3bc7c7b9..4510d307 100644 --- a/ce/docs/TwoFactorAuthConfigControllerApi.md +++ b/ce/docs/TwoFactorAuthConfigControllerApi.md @@ -5,7 +5,7 @@ | [**deleteTwoFaAccountConfig**](#deleteTwoFaAccountConfig) | **DELETE** /api/2fa/account/config | Delete 2FA account config (deleteTwoFaAccountConfig) | | [**generateTwoFaAccountConfig**](#generateTwoFaAccountConfig) | **POST** /api/2fa/account/config/generate | Generate 2FA account config (generateTwoFaAccountConfig) | | [**getAccountTwoFaSettings**](#getAccountTwoFaSettings) | **GET** /api/2fa/account/settings | Get account 2FA settings (getAccountTwoFaSettings) | -| [**getAvailableTwoFaProviders1**](#getAvailableTwoFaProviders1) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderTypes**](#getAvailableTwoFaProviderTypes) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderTypes) | | [**getPlatformTwoFaSettings**](#getPlatformTwoFaSettings) | **GET** /api/2fa/settings | Get platform 2FA settings (getPlatformTwoFaSettings) | | [**savePlatformTwoFaSettings**](#savePlatformTwoFaSettings) | **POST** /api/2fa/settings | Save platform 2FA settings (savePlatformTwoFaSettings) | | [**submitTwoFaAccountConfig**](#submitTwoFaAccountConfig) | **POST** /api/2fa/account/config/submit | Submit 2FA account config (submitTwoFaAccountConfig) | @@ -67,11 +67,11 @@ Get user's account 2FA configuration. Configuration contains configs for differe **AccountTwoFaSettings** -## getAvailableTwoFaProviders1 +## getAvailableTwoFaProviderTypes -> List getAvailableTwoFaProviders1() +> List getAvailableTwoFaProviderTypes() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderTypes) Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. diff --git a/ce/docs/TwoFactorAuthControllerApi.md b/ce/docs/TwoFactorAuthControllerApi.md index 2030e77e..c1597f9b 100644 --- a/ce/docs/TwoFactorAuthControllerApi.md +++ b/ce/docs/TwoFactorAuthControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**authenticateByTwoFaConfigurationToken**](#authenticateByTwoFaConfigurationToken) | **POST** /api/auth/2fa/login | Get regular token pair after successfully configuring 2FA | | [**checkTwoFaVerificationCode**](#checkTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/check | Check 2FA verification code (checkTwoFaVerificationCode) | -| [**getAvailableTwoFaProviders**](#getAvailableTwoFaProviders) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderInfos**](#getAvailableTwoFaProviderInfos) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderInfos) | | [**requestTwoFaVerificationCode**](#requestTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/send | Request 2FA verification code (requestTwoFaVerificationCode) | @@ -43,11 +43,11 @@ Checks 2FA verification code, and if it is correct the method returns a regular **JwtPair** -## getAvailableTwoFaProviders +## getAvailableTwoFaProviderInfos -> List getAvailableTwoFaProviders() +> List getAvailableTwoFaProviderInfos() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderInfos) Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` diff --git a/ce/docs/UserControllerApi.md b/ce/docs/UserControllerApi.md index 4ba86801..0c949cda 100644 --- a/ce/docs/UserControllerApi.md +++ b/ce/docs/UserControllerApi.md @@ -2,26 +2,26 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**deleteGeneralUserSettings**](#deleteGeneralUserSettings) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteGeneralUserSettings) | | [**deleteUser**](#deleteUser) | **DELETE** /api/user/{userId} | Delete User (deleteUser) | -| [**deleteUserSettings**](#deleteUserSettings) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings (deleteUserSettings) | -| [**deleteUserSettings1**](#deleteUserSettings1) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteUserSettings) | +| [**deleteUserSettingsByType**](#deleteUserSettingsByType) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings by type (deleteUserSettingsByType) | | [**findUsersByQuery**](#findUsersByQuery) | **GET** /api/users/info | Find users by query (findUsersByQuery) | | [**getActivationLink**](#getActivationLink) | **GET** /api/user/{userId}/activationLink | Get activation link (getActivationLink) | | [**getActivationLinkInfo**](#getActivationLinkInfo) | **GET** /api/user/{userId}/activationLinkInfo | Get activation link info (getActivationLinkInfo) | | [**getCustomerUsers**](#getCustomerUsers) | **GET** /api/customer/{customerId}/users | Get Customer Users (getCustomerUsers) | -| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getUserSettings) | +| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getGeneralUserSettings) | | [**getMobileSession**](#getMobileSession) | **GET** /api/user/mobile/session | getMobileSession | | [**getTenantAdmins**](#getTenantAdmins) | **GET** /api/tenant/{tenantId}/users | Get Tenant Users (getTenantAdmins) | | [**getUserById**](#getUserById) | **GET** /api/user/{userId} | Get User (getUserById) | -| [**getUserDashboardsInfo**](#getUserDashboardsInfo) | **GET** /api/user/dashboards | Get information about last visited and starred dashboards (getLastVisitedDashboards) | +| [**getUserDashboardsInfo**](#getUserDashboardsInfo) | **GET** /api/user/dashboards | Get information about last visited and starred dashboards (getUserDashboardsInfo) | | [**getUserSettings**](#getUserSettings) | **GET** /api/user/settings/{type} | Get user settings (getUserSettings) | | [**getUserToken**](#getUserToken) | **GET** /api/user/{userId}/token | Get User Token (getUserToken) | | [**getUsers**](#getUsers) | **GET** /api/users | Get Users (getUsers) | -| [**getUsersByIdsV2**](#getUsersByIdsV2) | **GET** /api/users/list | Get Users By Ids (getUsersByIdsV2) | +| [**getUsersByIds**](#getUsersByIds) | **GET** /api/users/list | Get Users By Ids (getUsersByIds) | | [**getUsersForAssign**](#getUsersForAssign) | **GET** /api/users/assign/{alarmId} | Get usersForAssign (getUsersForAssign) | | [**isUserTokenAccessEnabled**](#isUserTokenAccessEnabled) | **GET** /api/user/tokenAccessEnabled | Check Token Access Enabled (isUserTokenAccessEnabled) | -| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (saveUserSettings) | -| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (saveUserSettings) | +| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (putGeneralUserSettings) | +| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (putUserSettings) | | [**removeMobileSession**](#removeMobileSession) | **DELETE** /api/user/mobile/session | removeMobileSession | | [**reportUserDashboardAction**](#reportUserDashboardAction) | **GET** /api/user/dashboards/{dashboardId}/{action} | Report action of User over the dashboard (reportUserDashboardAction) | | [**saveMobileSession**](#saveMobileSession) | **POST** /api/user/mobile/session | saveMobileSession | @@ -32,52 +32,51 @@ -## deleteUser +## deleteGeneralUserSettings -> deleteUser(userId) +> deleteGeneralUserSettings(paths) -Delete User (deleteUser) +Delete user settings (deleteGeneralUserSettings) -Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **paths** | **String** | paths | | ### Return type null (empty response body) -## deleteUserSettings +## deleteUser -> deleteUserSettings(paths, type) +> deleteUser(userId) -Delete user settings (deleteUserSettings) +Delete User (deleteUser) -Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter +Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **paths** | **String** | paths | | -| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | +| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type null (empty response body) -## deleteUserSettings1 +## deleteUserSettingsByType -> deleteUserSettings1(paths) +> deleteUserSettingsByType(paths, type) -Delete user settings (deleteUserSettings) +Delete user settings by type (deleteUserSettingsByType) Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter @@ -87,6 +86,7 @@ Delete user settings by specifying list of json element xpaths. Example: to de | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **paths** | **String** | paths | | +| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | ### Return type @@ -186,7 +186,7 @@ Returns a page of users owned by customer. You can specify parameters to filter > com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() -Get user settings (getUserSettings) +Get user settings (getGeneralUserSettings) Fetch the User settings based on authorized user. @@ -262,7 +262,7 @@ Fetch the User object based on the provided User Id. If the user has the authori > UserDashboardsInfo getUserDashboardsInfo() -Get information about last visited and starred dashboards (getLastVisitedDashboards) +Get information about last visited and starred dashboards (getUserDashboardsInfo) Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -335,11 +335,11 @@ Returns a page of users owned by tenant or customer. The scope depends on author **PageDataUser** -## getUsersByIdsV2 +## getUsersByIds -> List getUsersByIdsV2(userIds) +> List getUsersByIds(userIds) -Get Users By Ids (getUsersByIdsV2) +Get Users By Ids (getUsersByIds) Requested users must be owned by tenant or assigned to customer which user is performing the request. @@ -397,7 +397,7 @@ Checks that the system is configured to allow administrators to impersonate them > putGeneralUserSettings(body) -Update user settings (saveUserSettings) +Update user settings (putGeneralUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} @@ -417,7 +417,7 @@ null (empty response body) > putUserSettings(type, body) -Update user settings (saveUserSettings) +Update user settings (putUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} diff --git a/ce/docs/WidgetTypeControllerApi.md b/ce/docs/WidgetTypeControllerApi.md index e707a1cf..1527d21d 100644 --- a/ce/docs/WidgetTypeControllerApi.md +++ b/ce/docs/WidgetTypeControllerApi.md @@ -4,9 +4,9 @@ |------------- | ------------- | -------------| | [**deleteWidgetType**](#deleteWidgetType) | **DELETE** /api/widgetType/{widgetTypeId} | Delete widget type (deleteWidgetType) | | [**getBundleWidgetTypeFqns**](#getBundleWidgetTypeFqns) | **GET** /api/widgetTypeFqns | Get all Widget type fqns for specified Bundle (getBundleWidgetTypeFqns) | +| [**getBundleWidgetTypes**](#getBundleWidgetTypes) | **GET** /api/widgetsBundles/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getBundleWidgetTypesDetails**](#getBundleWidgetTypesDetails) | **GET** /api/widgetTypesDetails | Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) | | [**getBundleWidgetTypesInfos**](#getBundleWidgetTypesInfos) | **GET** /api/widgetTypesInfos | Get Widget Type Info objects (getBundleWidgetTypesInfos) | -| [**getBundleWidgetTypesV2**](#getBundleWidgetTypesV2) | **GET** /api/widgetsBundles/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getWidgetType**](#getWidgetType) | **GET** /api/widgetType | Get Widget Type (getWidgetType) | | [**getWidgetTypeById**](#getWidgetTypeById) | **GET** /api/widgetType/{widgetTypeId} | Get Widget Type Details (getWidgetTypeById) | | [**getWidgetTypeInfoById**](#getWidgetTypeInfoById) | **GET** /api/widgetTypeInfo/{widgetTypeId} | Get Widget Type Info (getWidgetTypeInfoById) | @@ -55,6 +55,26 @@ Returns an array of Widget Type fqns that belong to specified Widget Bundle. Av **List** +## getBundleWidgetTypes + +> List getBundleWidgetTypes(widgetsBundleId) + +Get all Widget types for specified Bundle (getBundleWidgetTypes) + +Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **widgetsBundleId** | **String** | Widget Bundle Id | | + +### Return type + +**List** + + ## getBundleWidgetTypesDetails > List getBundleWidgetTypesDetails(widgetsBundleId, includeResources) @@ -104,26 +124,6 @@ Get the Widget Type Info objects based on the provided parameters. Widget Type I **PageDataWidgetTypeInfo** -## getBundleWidgetTypesV2 - -> List getBundleWidgetTypesV2(widgetsBundleId) - -Get all Widget types for specified Bundle (getBundleWidgetTypes) - -Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **widgetsBundleId** | **String** | Widget Bundle Id | | - -### Return type - -**List** - - ## getWidgetType > WidgetType getWidgetType(fqn) diff --git a/ce/docs/WidgetsBundleControllerApi.md b/ce/docs/WidgetsBundleControllerApi.md index 07aceec3..fa7df909 100644 --- a/ce/docs/WidgetsBundleControllerApi.md +++ b/ce/docs/WidgetsBundleControllerApi.md @@ -3,10 +3,10 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteWidgetsBundle**](#deleteWidgetsBundle) | **DELETE** /api/widgetsBundle/{widgetsBundleId} | Delete widgets bundle (deleteWidgetsBundle) | +| [**getAllWidgetsBundles**](#getAllWidgetsBundles) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getAllWidgetsBundles) | | [**getWidgetsBundleById**](#getWidgetsBundleById) | **GET** /api/widgetsBundle/{widgetsBundleId} | Get Widget Bundle (getWidgetsBundleById) | | [**getWidgetsBundles**](#getWidgetsBundles) | **GET** /api/widgetsBundles | Get Widget Bundles (getWidgetsBundles) | | [**getWidgetsBundlesList**](#getWidgetsBundlesList) | **GET** /api/widgetsBundles/list | Get Widgets Bundles By Ids (getWidgetsBundlesList) | -| [**getWidgetsBundlesV2**](#getWidgetsBundlesV2) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getWidgetsBundlesV2) | | [**saveWidgetsBundle**](#saveWidgetsBundle) | **POST** /api/widgetsBundle | Create Or Update Widget Bundle (saveWidgetsBundle) | | [**updateWidgetsBundleWidgetFqns**](#updateWidgetsBundleWidgetFqns) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns | Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns) | | [**updateWidgetsBundleWidgetTypes**](#updateWidgetsBundleWidgetTypes) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypes | Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes) | @@ -33,6 +33,19 @@ Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause null (empty response body) +## getAllWidgetsBundles + +> List getAllWidgetsBundles() + +Get all Widget Bundles (getAllWidgetsBundles) + +Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + +### Return type + +**List** + + ## getWidgetsBundleById > WidgetsBundle getWidgetsBundleById(widgetsBundleId, inlineImages) @@ -101,19 +114,6 @@ Requested widgets bundles must be system level or owned by tenant of the user wh **List** -## getWidgetsBundlesV2 - -> List getWidgetsBundlesV2() - -Get all Widget Bundles (getWidgetsBundlesV2) - -Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - -### Return type - -**List** - - ## saveWidgetsBundle > WidgetsBundle saveWidgetsBundle(widgetsBundle) diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index f265dba6..da7946b0 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -382,10 +382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -525,10 +525,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -651,10 +651,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -786,10 +786,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -921,10 +921,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1056,10 +1056,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1199,10 +1199,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1214,7 +1214,7 @@ ], "summary": "Redirect user to mail provider login page. ", "description": "After user logged in and provided accessprovider sends authorization code to specified redirect uri.)", - "operationId": "getAuthorizationUrl", + "operationId": "getMailOAuth2AuthorizationUrl", "responses": { "200": { "description": "OK", @@ -1334,10 +1334,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1347,8 +1347,8 @@ "tags": [ "admin-controller" ], - "summary": "codeProcessingUrl", - "operationId": "codeProcessingUrl", + "summary": "handleMailOAuth2Callback", + "operationId": "handleMailOAuth2Callback", "parameters": [ { "name": "code", @@ -1479,10 +1479,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1614,10 +1614,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1749,10 +1749,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1892,10 +1892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2018,10 +2018,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2156,10 +2156,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2291,10 +2291,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2425,10 +2425,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2560,10 +2560,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2703,10 +2703,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2848,10 +2848,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2986,10 +2986,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3124,10 +3124,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3270,10 +3270,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3405,10 +3405,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3540,10 +3540,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3734,10 +3734,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -3877,10 +3877,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4022,10 +4022,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4170,10 +4170,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4316,10 +4316,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4508,10 +4508,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4663,10 +4663,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4811,10 +4811,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4957,10 +4957,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5152,10 +5152,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5298,10 +5298,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5477,10 +5477,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5623,10 +5623,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -5767,10 +5767,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5913,10 +5913,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6059,10 +6059,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6214,10 +6214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6360,10 +6360,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6373,9 +6373,9 @@ "tags": [ "alarm-controller" ], - "summary": "Get Alarms (getAlarms)", + "summary": "Get Alarms (getAlarmsByEntity)", "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAlarms", + "operationId": "getAlarmsByEntity", "parameters": [ { "name": "entityType", @@ -6645,10 +6645,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6912,10 +6912,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7207,10 +7207,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7484,10 +7484,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7629,10 +7629,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7768,10 +7768,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7925,10 +7925,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8081,10 +8081,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8284,10 +8284,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8462,10 +8462,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8607,10 +8607,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8753,10 +8753,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8892,10 +8892,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9038,10 +9038,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9175,10 +9175,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9327,10 +9327,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9338,9 +9338,9 @@ "tags": [ "asset-controller" ], - "summary": "Find related assets (findByQuery)", + "summary": "Find related assets (findAssetsByQuery)", "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findByQuery_4", + "operationId": "findAssetsByQuery", "requestBody": { "content": { "application/json": { @@ -9473,10 +9473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9619,10 +9619,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9765,10 +9765,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9920,10 +9920,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10142,10 +10142,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10355,10 +10355,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10510,10 +10510,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -10663,10 +10663,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10896,10 +10896,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11042,10 +11042,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11255,10 +11255,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11459,10 +11459,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11604,10 +11604,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11754,10 +11754,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11909,10 +11909,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -12046,10 +12046,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12192,10 +12192,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12327,10 +12327,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12473,10 +12473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12667,10 +12667,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12680,9 +12680,9 @@ "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profiles By Ids (getAssetProfilesByIdsV2)", + "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n", - "operationId": "getAssetProfilesByIdsV2", + "operationId": "getAssetProfilesByIds", "parameters": [ { "name": "assetProfileIds", @@ -12819,10 +12819,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13013,10 +13013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13238,10 +13238,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13472,10 +13472,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13715,10 +13715,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13949,10 +13949,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14094,10 +14094,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14222,10 +14222,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14357,10 +14357,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15310,10 +15310,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15325,7 +15325,7 @@ ], "summary": "Test Script expression", "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript_1", + "operationId": "testCalculatedFieldScript", "requestBody": { "description": "Test calculated field TBEL expression.", "content": { @@ -15456,10 +15456,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15601,10 +15601,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -15737,10 +15737,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15882,10 +15882,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15895,9 +15895,9 @@ "tags": [ "calculated-field-controller" ], - "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2)", + "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", "description": "Fetch the Calculated Fields based on the provided Entity Id.", - "operationId": "getCalculatedFieldsByEntityIdV2", + "operationId": "getCalculatedFieldsByEntityId", "parameters": [ { "name": "entityType", @@ -16101,10 +16101,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16340,10 +16340,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16528,10 +16528,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16674,10 +16674,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16839,10 +16839,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17008,10 +17008,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17186,10 +17186,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17332,10 +17332,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -17469,10 +17469,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17615,10 +17615,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17761,10 +17761,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17956,10 +17956,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17969,9 +17969,9 @@ "tags": [ "customer-controller" ], - "summary": "Get customers by Customer Ids (getCustomersByIdsV2)", + "summary": "Get customers by Customer Ids (getCustomersByIds)", "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomersByIdsV2", + "operationId": "getCustomersByIds", "parameters": [ { "name": "customerIds", @@ -18108,10 +18108,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18254,10 +18254,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18400,10 +18400,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -18544,10 +18544,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18699,10 +18699,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -18852,10 +18852,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19062,10 +19062,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19218,10 +19218,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19356,10 +19356,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19491,10 +19491,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19637,10 +19637,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19774,10 +19774,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19911,10 +19911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20067,10 +20067,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -20204,10 +20204,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20363,10 +20363,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20523,10 +20523,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20683,10 +20683,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20696,9 +20696,9 @@ "tags": [ "dashboard-controller" ], - "summary": "Get dashboards by Dashboard Ids (getDashboardsByIdsV2)", + "summary": "Get dashboards by Dashboard Ids (getDashboardsByIds)", "description": "Returns a list of DashboardInfo objects based on the provided ids. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDashboardsByIdsV2", + "operationId": "getDashboardsByIds", "parameters": [ { "name": "dashboardIds", @@ -20835,10 +20835,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20988,10 +20988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -21139,10 +21139,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21340,10 +21340,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21475,10 +21475,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -21611,10 +21611,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21626,7 +21626,7 @@ ], "summary": "Get Tenant Dashboards (getTenantDashboards)", "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDashboards_1", + "operationId": "getTenantDashboards", "parameters": [ { "name": "pageSize", @@ -21812,10 +21812,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21825,9 +21825,9 @@ "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboards)", + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDashboards", + "operationId": "getTenantDashboardsByTenantId", "parameters": [ { "name": "tenantId", @@ -22013,10 +22013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22616,9 +22616,9 @@ "tags": [ "device-api-controller" ], - "summary": "Save claiming information (claimDevice)", + "summary": "Save claiming information (saveClaimingInfo)", "description": "Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation.\n Example of the request payload: \n\n```json\n{\"secretKey\":\"value\", \"durationMs\":60000}\n```\n\nNote: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", - "operationId": "claimDevice", + "operationId": "saveClaimingInfo", "parameters": [ { "name": "deviceToken", @@ -23853,10 +23853,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24013,10 +24013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24160,10 +24160,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24306,10 +24306,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24321,7 +24321,7 @@ ], "summary": "Claim device (claimDevice)", "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority.", - "operationId": "claimDevice_1", + "operationId": "claimDevice", "parameters": [ { "name": "deviceName", @@ -24461,10 +24461,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -24605,10 +24605,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24751,10 +24751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24906,10 +24906,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25137,10 +25137,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25350,10 +25350,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25537,10 +25537,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25552,7 +25552,7 @@ ], "summary": "Create Device (saveDevice) with credentials ", "description": "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)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDeviceWithCredentials_1", + "operationId": "saveDeviceWithCredentials", "parameters": [ { "name": "nameConflictPolicy", @@ -25714,10 +25714,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25859,10 +25859,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26004,10 +26004,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26150,10 +26150,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26289,10 +26289,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26435,10 +26435,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -26572,10 +26572,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26718,10 +26718,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26870,10 +26870,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -26881,9 +26881,9 @@ "tags": [ "device-controller" ], - "summary": "Find related devices (findByQuery)", + "summary": "Find related devices (findDevicesByQuery)", "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_3", + "operationId": "findDevicesByQuery", "requestBody": { "content": { "application/json": { @@ -27016,10 +27016,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27176,10 +27176,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27331,10 +27331,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -27484,10 +27484,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27735,10 +27735,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27881,10 +27881,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28103,10 +28103,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28307,10 +28307,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28462,10 +28462,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28607,10 +28607,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28756,10 +28756,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28769,9 +28769,9 @@ "tags": [ "device-profile-controller" ], - "summary": "Get time series keys (getTimeseriesKeys)", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTimeseriesKeys_1", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { "name": "deviceProfileId", @@ -28905,10 +28905,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29055,10 +29055,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29210,10 +29210,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -29347,10 +29347,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29493,10 +29493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29628,10 +29628,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29774,10 +29774,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29986,10 +29986,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29999,9 +29999,9 @@ "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2)", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n", - "operationId": "getDeviceProfileInfosByIdsV2", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { "name": "deviceProfileIds", @@ -30138,10 +30138,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30334,10 +30334,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30493,10 +30493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30639,10 +30639,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30823,10 +30823,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30962,10 +30962,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30975,9 +30975,9 @@ "tags": [ "domain-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", + "summary": "Update oauth2 clients (updateDomainOauth2Clients)", "description": "Update oauth2 clients for the specified domain. ", - "operationId": "updateOauth2Clients_1", + "operationId": "updateDomainOauth2Clients", "parameters": [ { "name": "id", @@ -31115,10 +31115,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31261,10 +31261,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31407,10 +31407,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31562,10 +31562,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31775,10 +31775,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31988,10 +31988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32133,10 +32133,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32278,10 +32278,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32424,10 +32424,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32584,10 +32584,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32744,10 +32744,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32890,10 +32890,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33036,10 +33036,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33174,10 +33174,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33320,10 +33320,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -33457,10 +33457,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33603,10 +33603,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33758,10 +33758,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33953,10 +33953,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -33964,9 +33964,9 @@ "tags": [ "edge-controller" ], - "summary": "Find related edges (findByQuery)", + "summary": "Find related edges (findEdgesByQuery)", "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_2", + "operationId": "findEdgesByQuery", "requestBody": { "content": { "application/json": { @@ -34099,10 +34099,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34234,10 +34234,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34386,10 +34386,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34532,10 +34532,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34736,10 +34736,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34940,10 +34940,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35164,10 +35164,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35302,10 +35302,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35467,10 +35467,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35613,10 +35613,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35771,10 +35771,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35918,10 +35918,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36067,10 +36067,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36232,10 +36232,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36432,10 +36432,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -36576,10 +36576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36785,10 +36785,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37004,10 +37004,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37151,10 +37151,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37297,10 +37297,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37442,10 +37442,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37576,10 +37576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37713,10 +37713,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37859,10 +37859,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38004,10 +38004,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38184,10 +38184,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38375,10 +38375,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38566,25 +38566,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/relations": { "post": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationsQuery" } } }, @@ -38592,7 +38594,17 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } }, "400": { "description": "Bad Request", @@ -38702,10 +38714,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -38713,48 +38725,12 @@ "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelation)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelation", + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "toId", + "name": "entityId", "in": "query", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -38763,7 +38739,7 @@ } }, { - "name": "toType", + "name": "entityType", "in": "query", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -38884,172 +38860,35 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations": { - "post": { + "/api/relations/from/{fromType}/{fromId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Find related entities (findByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", + "parameters": [ { - "http_login_form": [] + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } }, { - "api_key_form": [] - } - ] - }, - "delete": { - "tags": [ - "entity-relation-controller" - ], - "summary": "Delete common relations (deleteCommonRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", - "parameters": [ - { - "name": "entityId", - "in": "query", + "name": "fromId", + "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { @@ -39057,10 +38896,10 @@ } }, { - "name": "entityType", + "name": "relationTypeGroup", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, "schema": { "type": "string" } @@ -39068,7 +38907,17 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } }, "400": { "description": "Bad Request", @@ -39178,22 +39027,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromV2)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromV2", + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { "name": "fromType", @@ -39213,6 +39062,15 @@ "type": "string" } }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "relationTypeGroup", "in": "query", @@ -39345,60 +39203,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { - "get": { + "/api/relations/info": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromAndRelationType", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -39407,7 +39237,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationInfo" } } } @@ -39425,7 +39255,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -39521,32 +39351,51 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info": { - "post": { + "/api/relations/info/from/{fromType}/{fromId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Find related entity infos (findInfoByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", + "parameters": [ + { + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -39573,7 +39422,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39669,25 +39518,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { + "/api/relations/info/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByFromV2)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByFromV2", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { - "name": "fromType", + "name": "toType", "in": "path", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -39696,7 +39545,7 @@ } }, { - "name": "fromId", + "name": "toId", "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -39836,22 +39685,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/to/{toType}/{toId}": { + "/api/relations/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByToV2)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByToV2", + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", "parameters": [ { "name": "toType", @@ -39889,7 +39738,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelationInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -40003,22 +39852,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}": { + "/api/relations/to/{toType}/{toId}/{relationType}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToV2)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToV2", + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", "parameters": [ { "name": "toType", @@ -40038,6 +39887,15 @@ "type": "string" } }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "relationTypeGroup", "in": "query", @@ -40170,70 +40028,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}/{relationType}": { - "get": { + "/api/v2/relation": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToAndRelationType", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EntityRelation" } } } @@ -40250,7 +40077,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40346,32 +40173,76 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/v2/relation": { - "post": { + }, + "delete": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelationV2)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelationV2", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -40395,7 +40266,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40491,70 +40362,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/customer/entityView/{entityViewId}": { "delete": { "tags": [ - "entity-relation-controller" + "entity-view-controller" ], - "summary": "Delete Relation (deleteRelationV2)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelationV2", + "summary": "Unassign Entity View from customer (unassignEntityViewFromCustomer)", + "description": "Clears assignment of the Entity View to customer. Customer will not be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignEntityViewFromCustomer", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -40567,7 +40395,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityView" } } } @@ -40680,22 +40508,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/entityView/{entityViewId}": { - "delete": { + "/api/customer/public/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Unassign Entity View from customer (unassignEntityViewFromCustomer)", - "description": "Clears assignment of the Entity View to customer. Customer will not be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignEntityViewFromCustomer", + "summary": "Make entity view publicly available (assignEntityViewToPublicCustomer)", + "description": "Entity View 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 entity view.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEntityViewToPublicCustomer", "parameters": [ { "name": "entityViewId", @@ -40730,7 +40558,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40826,23 +40654,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/public/entityView/{entityViewId}": { + "/api/customer/{customerId}/entityView/{entityViewId}": { "post": { "tags": [ "entity-view-controller" ], - "summary": "Make entity view publicly available (assignEntityViewToPublicCustomer)", - "description": "Entity View 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 entity view.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEntityViewToPublicCustomer", + "summary": "Assign Entity View to customer (assignEntityViewToCustomer)", + "description": "Creates assignment of the Entity View to customer. Customer will be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEntityViewToCustomer", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "entityViewId", "in": "path", @@ -40972,22 +40809,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityView/{entityViewId}": { - "post": { + "/api/customer/{customerId}/entityViewInfos": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Assign Entity View to customer (assignEntityViewToCustomer)", - "description": "Creates assignment of the Entity View to customer. Customer will be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEntityViewToCustomer", + "summary": "Get Customer Entity View info (getCustomerEntityViewInfos)", + "description": "Returns a page of Entity View info objects assigned to customer. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViewInfos", "parameters": [ { "name": "customerId", @@ -40999,13 +40836,70 @@ } }, { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -41014,7 +40908,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -41031,7 +40925,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41127,22 +41021,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityViewInfos": { + "/api/customer/{customerId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Customer Entity View info (getCustomerEntityViewInfos)", - "description": "Returns a page of Entity View info objects assigned to customer. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViewInfos", + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", "parameters": [ { "name": "customerId", @@ -41201,8 +41095,7 @@ "enum": [ "createdTime", "name", - "type", - "customerTitle" + "type" ] } }, @@ -41226,7 +41119,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -41339,96 +41232,38 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityViews": { - "get": { + "/api/edge/{edgeId}/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Customer Entity Views (getCustomerEntityViews)", - "description": "Returns a page of Entity View objects assigned to customer. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViews", + "summary": "Assign entity view to edge (assignEntityViewToEdge)", + "description": "Creates assignment of an existing entity view to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity view will be delivered to edge service, it's going to be available for usage on remote edge instance.", + "operationId": "assignEntityViewToEdge", "parameters": [ { - "name": "customerId", + "name": "edgeId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityViewId", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -41437,7 +41272,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -41454,7 +41289,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41550,22 +41385,20 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/edge/{edgeId}/entityView/{entityViewId}": { - "post": { + }, + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Assign entity view to edge (assignEntityViewToEdge)", - "description": "Creates assignment of an existing entity view to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity view will be delivered to edge service, it's going to be available for usage on remote edge instance.", - "operationId": "assignEntityViewToEdge", + "summary": "Unassign entity view from edge (unassignEntityViewFromEdge)", + "description": "Clears assignment of the entity view to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity view locally.", + "operationId": "unassignEntityViewFromEdge", "parameters": [ { "name": "edgeId", @@ -41607,7 +41440,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41703,20 +41536,21 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/entityViews": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Unassign entity view from edge (unassignEntityViewFromEdge)", - "description": "Clears assignment of the entity view to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity view locally.", - "operationId": "unassignEntityViewFromEdge", + "summary": "getEdgeEntityViews", + "operationId": "getEdgeEntityViews", "parameters": [ { "name": "edgeId", @@ -41727,12 +41561,72 @@ } }, { - "name": "entityViewId", - "in": "path", + "name": "pageSize", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, "schema": { "type": "string" } + }, + { + "name": "startTime", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -41741,7 +41635,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -41854,106 +41748,71 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/entityViews": { - "get": { + "/api/entityView": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "getEdgeEntityViews", - "operationId": "getEdgeEntityViews", + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", "parameters": [ { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", + "name": "nameConflictPolicy", "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "startTime", + "name": "uniquifySeparator", "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", "required": false, "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "default": "_" } }, { - "name": "endTime", + "name": "uniquifyStrategy", "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", "required": false, "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -41970,7 +41829,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42066,71 +41925,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView": { - "post": { + "/api/entityView/info/{entityViewId}": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Save or update entity view (saveEntityView)", - "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityView", + "summary": "Get Entity View info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided Entity View Id. Entity Views Info extends the Entity View with customer title and 'is public' flag. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", "parameters": [ { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityViewInfo" } } } @@ -42147,7 +41975,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42243,40 +42071,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView/info/{entityViewId}": { + "/api/entityView/types": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View info (getEntityViewInfoById)", - "description": "Fetch the Entity View info object based on the provided Entity View Id. Entity Views Info extends the Entity View with customer title and 'is public' flag. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewInfoById", - "parameters": [ - { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityViewInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -42389,148 +42209,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] - } - ] - } - }, - "/api/entityView/types": { - "get": { - "tags": [ - "entity-view-controller" - ], - "summary": "Get Entity View Types (getEntityViewTypes)", - "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewTypes", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] - }, - { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42673,10 +42355,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -42810,10 +42492,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42823,9 +42505,9 @@ "tags": [ "entity-view-controller" ], - "summary": "Find related entity views (findByQuery)", + "summary": "Find related entity views (findEntityViewsByQuery)", "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_1", + "operationId": "findEntityViewsByQuery", "requestBody": { "content": { "application/json": { @@ -42958,10 +42640,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42971,9 +42653,9 @@ "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views By Ids (getEntityViewsByIdsV2)", + "summary": "Get Entity Views By Ids (getEntityViewsByIds)", "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. ", - "operationId": "getEntityViewsByIdsV2", + "operationId": "getEntityViewsByIds", "parameters": [ { "name": "entityViewIds", @@ -43110,10 +42792,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43256,10 +42938,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43459,252 +43141,23 @@ }, "security": [ { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/api/tenant/entityViews": { - "get": { - "tags": [ - "entity-view-controller" - ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViews", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityView" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/events/{entityType}/{entityId}": { + "/api/tenant/entityViews": { "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events (Deprecated)", - "description": "Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. ", - "operationId": "getEvents", + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -43725,10 +43178,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The value is not used in searching.", + "description": "The case insensitive 'substring' filter based on the entity view name.", "required": false, "schema": { "type": "string" @@ -43742,8 +43204,9 @@ "schema": { "type": "string", "enum": [ - "ts", - "id" + "createdTime", + "name", + "type" ] } }, @@ -43759,26 +43222,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -43787,7 +43230,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -43900,20 +43343,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/events/{entityType}/{entityId}": { "post": { "tags": [ "event-controller" ], - "summary": "Get Events by event filter (getEvents)", + "summary": "Get Events by event filter (getEventsByFilter)", "description": "Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identifier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEvents_1", + "operationId": "getEventsByFilter", "parameters": [ { "name": "entityType", @@ -44147,10 +43592,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44325,10 +43770,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44338,9 +43783,9 @@ "tags": [ "event-controller" ], - "summary": "Get Events by type (getEvents)", + "summary": "Get Events by type (getEventsByType)", "description": "Returns a page of events for specified entity by specifying event type. 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 response schema for more details. ", - "operationId": "getEvents_2", + "operationId": "getEventsByType", "parameters": [ { "name": "entityType", @@ -44574,10 +44019,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44732,10 +44177,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44876,10 +44321,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45091,10 +44536,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45252,10 +44697,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45427,10 +44872,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -45601,10 +45046,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -45765,10 +45210,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45923,10 +45368,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46081,10 +45526,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -46247,10 +45692,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46422,10 +45867,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46588,10 +46033,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46733,10 +46178,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -46869,10 +46314,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47007,10 +46452,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47145,10 +46590,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47380,10 +46825,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47484,7 +46929,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "W5A2SHXzH4uUsc1TUTppS7jwSkAo5G" + "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" } } } @@ -47594,7 +47039,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "W5A2SHXzH4uUsc1TUTppS7jwSkAo5G" + "resetToken": "udgDQOpS1Q4ZFEL8qHF9s8cSKQ7d1h" } } } @@ -47693,8 +47138,8 @@ "tags": [ "lwm-2m-controller" ], - "summary": "Save device with credentials (Deprecated)", - "operationId": "saveDeviceWithCredentials", + "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated)", + "operationId": "saveLwm2mDeviceWithCredentials", "requestBody": { "content": { "application/json": { @@ -47827,10 +47272,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47973,10 +47418,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47986,9 +47431,9 @@ "tags": [ "mail-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getMailConfigTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates_1", + "operationId": "getMailConfigTemplates", "responses": { "200": { "description": "OK", @@ -48108,10 +47553,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48267,10 +47712,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48413,10 +47858,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48597,10 +48042,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48736,10 +48181,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48749,9 +48194,9 @@ "tags": [ "mobile-app-bundle-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", + "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateOauth2Clients", + "operationId": "updateMobileAppBundleOauth2Clients", "parameters": [ { "name": "id", @@ -48889,10 +48334,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49048,10 +48493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49061,7 +48506,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile app infos (getTenantMobileAppInfos)", + "summary": "Get mobile app infos (getTenantMobileApps)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getTenantMobileApps", "parameters": [ @@ -49241,10 +48686,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -49384,10 +48829,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49397,7 +48842,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile info by id (getMobileAppInfoById)", + "summary": "Get mobile info by id (getMobileAppById)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getMobileAppById", "parameters": [ @@ -49530,10 +48975,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -49667,10 +49112,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49955,10 +49400,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50103,10 +49548,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50248,10 +49693,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50406,10 +49851,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50552,10 +49997,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -50689,10 +50134,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50873,10 +50318,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51008,10 +50453,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -51151,10 +50596,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51285,10 +50730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -51427,10 +50872,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51566,10 +51011,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51705,10 +51150,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51912,10 +51357,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52055,10 +51500,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52206,10 +51651,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52351,10 +51796,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52497,10 +51942,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -52634,10 +52079,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52818,10 +52263,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52963,10 +52408,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53130,10 +52575,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53276,10 +52721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -53413,10 +52858,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53597,10 +53042,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53610,9 +53055,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by ids (getNotificationTargetsByIdsV2)", + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsByIdsV2", + "operationId": "getNotificationTargetsByIds", "parameters": [ { "name": "ids", @@ -53749,10 +53194,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53762,9 +53207,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2)", + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou 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 response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsBySupportedNotificationTypeV2", + "operationId": "getNotificationTargetsBySupportedNotificationType", "parameters": [ { "name": "notificationType", @@ -53936,10 +53381,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54093,10 +53538,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54238,10 +53683,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54384,10 +53829,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -54521,10 +53966,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54717,10 +54162,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54730,9 +54175,9 @@ "tags": [ "o-auth-2-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "getClientRegistrationTemplates", + "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { "description": "OK", @@ -54855,10 +54300,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -54998,10 +54443,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55138,10 +54583,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55438,10 +54883,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55622,10 +55067,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55635,9 +55080,9 @@ "tags": [ "o-auth-2-controller" ], - "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2)", + "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "findTenantOAuth2ClientInfosByIdsV2", + "operationId": "findTenantOAuth2ClientInfosByIds", "parameters": [ { "name": "clientIds", @@ -55774,10 +55219,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55920,10 +55365,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56057,10 +55502,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56192,10 +55637,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56337,10 +55782,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56483,10 +55928,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56629,10 +56074,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56819,10 +56264,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56956,10 +56401,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57103,10 +56548,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57302,10 +56747,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57315,9 +56760,9 @@ "tags": [ "ota-package-controller" ], - "summary": "Get OTA Package Infos (getOtaPackages)", + "summary": "Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType)", "description": "Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackages_1", + "operationId": "getOtaPackagesByDeviceProfileAndType", "parameters": [ { "name": "deviceProfileId", @@ -57523,10 +56968,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57658,10 +57103,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57671,7 +57116,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Get Mobile application settings (getMobileAppSettings)", + "summary": "Get Mobile application settings (getQrCodeSettings)", "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", "operationId": "getQrCodeSettings", "responses": { @@ -57793,10 +57238,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -57936,10 +57381,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58418,10 +57863,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -58578,10 +58023,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58724,10 +58169,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58870,10 +58315,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -59007,10 +58452,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59198,10 +58643,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59211,9 +58656,9 @@ "tags": [ "queue-stats-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIdsV2)", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIdsV2", + "operationId": "getQueueStatsByIds", "parameters": [ { "name": "queueStatsIds", @@ -59350,10 +58795,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59496,10 +58941,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59509,9 +58954,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequest)", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest_1", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -59653,10 +59098,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59666,9 +59111,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequest)", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest_1", + "operationId": "handleTwoWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -59810,10 +59255,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59823,9 +59268,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send one-way RPC request", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest", + "operationId": "handleOneWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -59965,10 +59410,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60186,10 +59631,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60332,10 +59777,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60469,10 +59914,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60482,9 +59927,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send two-way RPC request", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest", + "operationId": "handleTwoWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -60624,10 +60069,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60777,10 +60222,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60928,10 +60373,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61130,10 +60575,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61275,10 +60720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61413,10 +60858,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61426,9 +60871,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Create Default Rule Chain", + "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain_1", + "operationId": "setDeviceDefaultRuleChain", "requestBody": { "content": { "application/json": { @@ -61558,10 +61003,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61715,10 +61160,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61850,10 +61295,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61865,7 +61310,7 @@ ], "summary": "Test Script function", "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript", + "operationId": "testRuleChainScript", "parameters": [ { "name": "scriptLang", @@ -62007,10 +61452,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62153,10 +61598,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -62290,10 +61735,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62436,10 +61881,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -62580,10 +62025,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62726,10 +62171,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62872,10 +62317,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63022,10 +62467,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63171,10 +62616,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63317,10 +62762,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63523,10 +62968,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63670,10 +63115,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63830,10 +63275,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63843,9 +63288,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIdsV2)", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n", - "operationId": "getRuleChainsByIdsV2", + "operationId": "getRuleChainsByIds", "parameters": [ { "name": "ruleChainIds", @@ -63982,10 +63427,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64128,10 +63573,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64141,9 +63586,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push user message to the rule engine (handleRuleEngineRequest)", + "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_3", + "operationId": "handleRuleEngineRequestForUser", "requestBody": { "content": { "application/json": { @@ -64274,10 +63719,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64287,9 +63732,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest", + "operationId": "handleRuleEngineRequestForEntity", "parameters": [ { "name": "entityType", @@ -64440,10 +63885,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64453,9 +63898,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_2", + "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { "name": "entityType", @@ -64625,10 +64070,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64638,9 +64083,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_1", + "operationId": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { "name": "entityType", @@ -64801,10 +64246,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65023,10 +64468,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -65167,10 +64612,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65313,10 +64758,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65468,10 +64913,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65623,10 +65068,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65636,8 +65081,8 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2)", - "operationId": "getSystemOrTenantResourcesByIdsV2", + "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", + "operationId": "getSystemOrTenantResourcesByIds", "parameters": [ { "name": "resourceIds", @@ -65774,10 +65219,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65952,10 +65397,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66147,10 +65592,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66302,10 +65747,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66457,10 +65902,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66470,7 +65915,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get All Resource Infos (getAllResources)", + "summary": "Get All Resource Infos (getTenantResources)", "description": "Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "getTenantResources", "parameters": [ @@ -66651,10 +66096,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66822,10 +66267,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66987,10 +66432,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67143,10 +66588,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67290,10 +66735,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -67442,10 +66887,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67589,10 +67034,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67602,7 +67047,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Download resource (downloadResource)", + "summary": "Download resource (downloadResourceIfChanged)", "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", "operationId": "downloadResourceIfChanged", "parameters": [ @@ -67773,10 +67218,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67948,10 +67393,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68106,10 +67551,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68272,10 +67717,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68439,10 +67884,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68597,10 +68042,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68769,10 +68214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68927,10 +68372,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69140,10 +68585,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69306,10 +68751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69482,10 +68927,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69660,10 +69105,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69852,10 +69297,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70043,10 +69488,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70329,10 +69774,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70496,10 +69941,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70671,10 +70116,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70816,10 +70261,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70962,10 +70407,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71108,10 +70553,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -71245,10 +70690,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71447,10 +70892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71648,10 +71093,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71661,8 +71106,8 @@ "tags": [ "tenant-controller" ], - "summary": "Get Tenants list (getTenantsByIdsV2)", - "operationId": "getTenantsByIdsV2", + "summary": "Get Tenants list (getTenantsByIds)", + "operationId": "getTenantsByIds", "parameters": [ { "name": "tenantIds", @@ -71799,10 +71244,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71944,10 +71389,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72090,10 +71535,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72227,10 +71672,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72373,10 +71818,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72508,10 +71953,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72654,10 +72099,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72846,10 +72291,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73040,10 +72485,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73191,10 +72636,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73326,10 +72771,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73469,10 +72914,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73624,10 +73069,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73777,10 +73222,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73920,10 +73365,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74066,10 +73511,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74204,10 +73649,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74339,10 +73784,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74352,9 +73797,9 @@ "tags": [ "two-factor-auth-config-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderTypes)", "description": "Get the list of provider types available for user to use (the ones configured by tenant or sysadmin).\nExample of response:\n```\n[\n \"TOTP\",\n \"EMAIL\",\n \"SMS\"\n]\n```\n\nAvailable for any authorized user. ", - "operationId": "getAvailableTwoFaProviders_1", + "operationId": "getAvailableTwoFaProviderTypes", "responses": { "200": { "description": "OK", @@ -74477,10 +73922,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74612,10 +74057,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74755,10 +74200,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74890,10 +74335,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74903,9 +74348,9 @@ "tags": [ "two-factor-auth-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderInfos)", "description": "Get the list of 2FA provider infos available for user to use. Example:\n```\n[\n {\n \"type\": \"EMAIL\",\n \"default\": true,\n \"contact\": \"ab*****ko@gmail.com\"\n },\n {\n \"type\": \"TOTP\",\n \"default\": false,\n \"contact\": null\n },\n {\n \"type\": \"SMS\",\n \"default\": false,\n \"contact\": \"+38********12\"\n }\n]\n```", - "operationId": "getAvailableTwoFaProviders", + "operationId": "getAvailableTwoFaProviderInfos", "responses": { "200": { "description": "OK", @@ -75028,10 +74473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75181,10 +74626,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75319,10 +74764,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75454,10 +74899,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75588,10 +75033,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75791,10 +75236,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75994,10 +75439,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76150,10 +75595,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76163,7 +75608,7 @@ "tags": [ "user-controller" ], - "summary": "Get information about last visited and starred dashboards (getLastVisitedDashboards)", + "summary": "Get information about last visited and starred dashboards (getUserDashboardsInfo)", "description": "Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "getUserDashboardsInfo", "responses": { @@ -76285,10 +75730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76440,10 +75885,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76584,10 +76029,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76729,10 +76174,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76864,10 +76309,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77003,10 +76448,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77148,10 +76593,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77161,7 +76606,7 @@ "tags": [ "user-controller" ], - "summary": "Get user settings (getUserSettings)", + "summary": "Get user settings (getGeneralUserSettings)", "description": "Fetch the User settings based on authorized user. ", "operationId": "getGeneralUserSettings", "responses": { @@ -77283,10 +76728,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77294,7 +76739,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putGeneralUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putGeneralUserSettings", "requestBody": { @@ -77419,10 +76864,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77432,9 +76877,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings (deleteGeneralUserSettings)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings_1", + "operationId": "deleteGeneralUserSettings", "parameters": [ { "name": "paths", @@ -77558,10 +77003,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77704,10 +77149,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77715,7 +77160,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putUserSettings", "parameters": [ @@ -77851,10 +77296,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77864,9 +77309,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings by type (deleteUserSettingsByType)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings", + "operationId": "deleteUserSettingsByType", "parameters": [ { "name": "paths", @@ -77999,10 +77444,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78134,10 +77579,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78280,10 +77725,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -78417,10 +77862,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78563,10 +78008,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78709,10 +78154,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78855,10 +78300,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79003,10 +78448,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79197,10 +78642,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79400,10 +78845,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79594,10 +79039,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79607,9 +79052,9 @@ "tags": [ "user-controller" ], - "summary": "Get Users By Ids (getUsersByIdsV2)", + "summary": "Get Users By Ids (getUsersByIds)", "description": "Requested users must be owned by tenant or assigned to customer which user is performing the request. ", - "operationId": "getUsersByIdsV2", + "operationId": "getUsersByIds", "parameters": [ { "name": "userIds", @@ -79746,10 +79191,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79892,10 +79337,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80046,10 +79491,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80201,10 +79646,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80338,10 +79783,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80487,10 +79932,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80633,10 +80078,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80886,10 +80331,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81044,10 +80489,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81289,10 +80734,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81304,7 +80749,7 @@ ], "summary": "Get all Widget types for specified Bundle (getBundleWidgetTypes)", "description": "Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getBundleWidgetTypesV2", + "operationId": "getBundleWidgetTypes", "parameters": [ { "name": "widgetsBundleId", @@ -81438,10 +80883,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81583,10 +81028,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81738,10 +81183,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -81875,10 +81320,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82028,10 +81473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82181,10 +81626,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82401,10 +81846,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82414,9 +81859,9 @@ "tags": [ "widgets-bundle-controller" ], - "summary": "Get all Widget Bundles (getWidgetsBundlesV2)", + "summary": "Get all Widget Bundles (getAllWidgetsBundles)", "description": "Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundlesV2", + "operationId": "getAllWidgetsBundles", "responses": { "200": { "description": "OK", @@ -82539,10 +81984,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82691,10 +82136,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83031,6 +82476,16 @@ "provider" ] }, + "AiModelExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AiModelId": { "type": "object", "properties": { @@ -83261,8 +82716,30 @@ "triggerType" ] }, + "AlarmAssignmentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -83463,6 +82940,29 @@ "triggerType" ] }, + "AlarmCommentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCommentType": { "type": "string", "enum": [ @@ -84183,7 +83683,6 @@ ] }, "AlarmRuleBooleanFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -84338,7 +83837,6 @@ ] }, "AlarmRuleDurationCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -84383,7 +83881,6 @@ ] }, "AlarmRuleNoDataFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -84406,7 +83903,6 @@ ] }, "AlarmRuleNumericFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -84429,7 +83925,6 @@ ] }, "AlarmRuleRepeatingCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -84467,7 +83962,6 @@ ] }, "AlarmRuleSimpleCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -84509,7 +84003,6 @@ ] }, "AlarmRuleStringFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -85020,6 +84513,29 @@ "triggerType" ] }, + "ApiUsageLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ApiUsageStateFilter": { "allOf": [ { @@ -85132,6 +84648,16 @@ "name" ] }, + "AssetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetId": { "type": "object", "properties": { @@ -85285,6 +84811,16 @@ } } }, + "AssetProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetProfileId": { "type": "object", "properties": { @@ -86101,12 +85637,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -86121,12 +85660,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -86141,12 +85683,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -86990,6 +86535,16 @@ "title" ] }, + "CustomerExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "CustomerId": { "type": "object", "properties": { @@ -87104,6 +86659,16 @@ "title" ] }, + "DashboardExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DashboardId": { "type": "object", "properties": { @@ -87294,7 +86859,6 @@ ] }, "DefaultDeviceConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/DeviceConfiguration" @@ -87363,35 +86927,6 @@ "visible" ] }, - "DefaultNotificationRuleRecipientsConfig": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" - }, - { - "type": "object", - "properties": { - "triggerType": { - "$ref": "#/components/schemas/NotificationRuleTriggerType" - }, - "targets": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 1 - } - } - } - ], - "description": "Default notification rule recipients configuration", - "required": [ - "targets", - "triggerType" - ] - }, "DefaultPageId": { "type": "string", "enum": [ @@ -87893,6 +87428,29 @@ "triggerType" ] }, + "DeviceActivityRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "DeviceConfiguration": { "type": "object", "description": "Device configuration", @@ -88311,6 +87869,16 @@ } } }, + "DeviceProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DeviceProfileId": { "type": "object", "properties": { @@ -88659,7 +88227,6 @@ ] }, "DummyJobConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/JobConfiguration" @@ -88958,6 +88525,29 @@ "triggerType" ] }, + "EdgeCommunicationFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectionNotificationRuleTriggerConfig": { "allOf": [ { @@ -88988,6 +88578,29 @@ "triggerType" ] }, + "EdgeConnectionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectivityEvent": { "type": "string", "enum": [ @@ -89439,6 +89052,29 @@ "triggerType" ] }, + "EntitiesLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EntityActionNotificationRuleTriggerConfig": { "allOf": [ { @@ -89470,8 +89106,30 @@ "triggerType" ] }, + "EntityActionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EntityAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -89673,11 +89331,22 @@ "discriminator": { "propertyName": "entityType", "mapping": { + "CUSTOMER": "#/components/schemas/CustomerExportData", "DEVICE": "#/components/schemas/DeviceExportData", "RULE_CHAIN": "#/components/schemas/RuleChainExportData", "WIDGET_TYPE": "#/components/schemas/WidgetTypeExportData", "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleExportData", - "OTA_PACKAGE": "#/components/schemas/OtaPackageExportData" + "OTA_PACKAGE": "#/components/schemas/OtaPackageExportData", + "TB_RESOURCE": "#/components/schemas/TbResourceExportData", + "DASHBOARD": "#/components/schemas/DashboardExportData", + "ASSET_PROFILE": "#/components/schemas/AssetProfileExportData", + "ASSET": "#/components/schemas/AssetExportData", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileExportData", + "ENTITY_VIEW": "#/components/schemas/EntityViewExportData", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateExportData", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetExportData", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleExportData", + "AI_MODEL": "#/components/schemas/AiModelExportData" } }, "properties": { @@ -90230,6 +89899,16 @@ "type" ] }, + "EntityViewExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "EntityViewId": { "type": "object", "properties": { @@ -90448,7 +90127,6 @@ ] }, "EscalatedNotificationRuleRecipientsConfig": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" @@ -90601,19 +90279,19 @@ "FeaturesInfo": { "type": "object", "properties": { - "notificationEnabled": { + "smsEnabled": { "type": "boolean" }, - "twoFaEnabled": { + "oauthEnabled": { "type": "boolean" }, - "emailEnabled": { + "notificationEnabled": { "type": "boolean" }, - "smsEnabled": { + "twoFaEnabled": { "type": "boolean" }, - "oauthEnabled": { + "emailEnabled": { "type": "boolean" } } @@ -90695,7 +90373,6 @@ } }, "GeofencingCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -92523,6 +92200,29 @@ "triggerType" ] }, + "NewPlatformVersionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "NoSecLwM2MBootstrapServerCredential": { "allOf": [ { @@ -92957,6 +92657,7 @@ "sent": { "type": "object", "additionalProperties": { + "type": "integer", "format": "int32" }, "description": "Number of successfully sent notifications per delivery method", @@ -92976,6 +92677,7 @@ "description": "Errors per delivery method. Each entry maps recipient name to error message" }, "totalErrors": { + "type": "integer", "format": "int32", "description": "Total number of errors across all delivery methods" }, @@ -93048,6 +92750,16 @@ } } }, + "NotificationRuleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationRuleId": { "type": "object", "properties": { @@ -93132,20 +92844,20 @@ "discriminator": { "propertyName": "triggerType", "mapping": { - "ENTITY_ACTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", + "ENTITY_ACTION": "#/components/schemas/EntityActionRecipientsConfig", "ALARM": "#/components/schemas/EscalatedNotificationRuleRecipientsConfig", - "ALARM_COMMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ALARM_ASSIGNMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "DEVICE_ACTIVITY": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_CONNECTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "NEW_PLATFORM_VERSION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ENTITIES_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "API_USAGE_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RATE_LIMITS": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "TASK_PROCESSING_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RESOURCES_SHORTAGE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig" + "ALARM_COMMENT": "#/components/schemas/AlarmCommentRecipientsConfig", + "ALARM_ASSIGNMENT": "#/components/schemas/AlarmAssignmentRecipientsConfig", + "DEVICE_ACTIVITY": "#/components/schemas/DeviceActivityRecipientsConfig", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/RuleEngineComponentLifecycleEventRecipientsConfig", + "EDGE_CONNECTION": "#/components/schemas/EdgeConnectionRecipientsConfig", + "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/EdgeCommunicationFailureRecipientsConfig", + "NEW_PLATFORM_VERSION": "#/components/schemas/NewPlatformVersionRecipientsConfig", + "ENTITIES_LIMIT": "#/components/schemas/EntitiesLimitRecipientsConfig", + "API_USAGE_LIMIT": "#/components/schemas/ApiUsageLimitRecipientsConfig", + "RATE_LIMITS": "#/components/schemas/RateLimitsRecipientsConfig", + "TASK_PROCESSING_FAILURE": "#/components/schemas/TaskProcessingFailureRecipientsConfig", + "RESOURCES_SHORTAGE": "#/components/schemas/ResourceShortageRecipientsConfig" } }, "properties": { @@ -93279,6 +92991,42 @@ "type" ] }, + "NotificationTargetExportData": { + "type": "object", + "properties": { + "entityType": { + "$ref": "#/components/schemas/EntityType" + }, + "entity": { + "$ref": "#/components/schemas/ExportableEntity" + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttributeExportData" + } + }, + "description": "Map of attributes where key is the scope of attributes and value is the list of attributes for that scope" + }, + "calculatedFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalculatedField" + } + } + }, + "required": [ + "entityType" + ] + }, "NotificationTargetId": { "type": "object", "properties": { @@ -93350,6 +93098,16 @@ "deliveryMethodsTemplates" ] }, + "NotificationTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTemplateId": { "type": "object", "properties": { @@ -96239,7 +95997,6 @@ ] }, "PropagationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -96650,6 +96407,29 @@ "triggerType" ] }, + "RateLimitsRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ReferencedEntityKey": { "type": "object", "properties": { @@ -96665,7 +96445,6 @@ } }, "RelatedEntitiesAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -97004,6 +96783,29 @@ } } }, + "ResourceShortageRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ResourceSubType": { "type": "string", "enum": [ @@ -97492,6 +97294,29 @@ "triggerType" ] }, + "RuleEngineComponentLifecycleEventRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "RuleNode": { "type": "object", "properties": { @@ -97782,7 +97607,6 @@ } }, "ScriptCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -97931,7 +97755,6 @@ ] }, "SimpleCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -98678,6 +98501,29 @@ "triggerType" ] }, + "TaskProcessingFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "TaskResult": { "type": "object", "discriminator": { @@ -98855,11 +98701,11 @@ "public": { "type": "boolean" }, - "link": { + "publicLink": { "type": "string", "readOnly": true }, - "publicLink": { + "link": { "type": "string", "readOnly": true } @@ -98882,6 +98728,16 @@ } } }, + "TbResourceExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "TbResourceId": { "type": "object", "properties": { @@ -98971,11 +98827,11 @@ "public": { "type": "boolean" }, - "link": { + "publicLink": { "type": "string", "readOnly": true }, - "publicLink": { + "link": { "type": "string", "readOnly": true } @@ -101162,13 +101018,13 @@ } }, "securitySchemes": { - "http_login_form": { + "HttpLoginForm": { "type": "http", "description": "Enter Username / Password", "scheme": "loginPassword", "bearerFormat": "/api/auth/login|X-Authorization" }, - "api_key_form": { + "ApiKeyForm": { "type": "apiKey", "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey \u003Cyour_api_key_value\u003E**\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n\u003Cbr\u003E**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.\u003Cbr\u003E\n", "name": "X-Authorization", diff --git a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index f1d8c6a3..d958fc0a 100644 --- a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -3955,129 +3955,6 @@ private HttpRequest.Builder checkUpdatesRequestBuilder(Map heade return localVarRequestBuilder; } - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDevice(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDeviceWithHttpInfo(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceToken, body, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - // verify the required parameter 'deviceToken' is set - if (deviceToken == null) { - throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling claimDevice"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/claim" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Claim device (claimDevice) * Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. @@ -4086,8 +3963,8 @@ private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1(deviceName, claimRequest, null); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDevice(deviceName, claimRequest, null); } /** @@ -4099,8 +3976,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDevice1WithHttpInfo(deviceName, claimRequest, headers); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceName, claimRequest, headers); return localVarResponse.getData(); } @@ -4112,8 +3989,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1WithHttpInfo(deviceName, claimRequest, null); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDeviceWithHttpInfo(deviceName, claimRequest, null); } /** @@ -4125,8 +4002,8 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDevice1RequestBuilder(deviceName, claimRequest, headers); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceName, claimRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -4137,7 +4014,7 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice1", localVarResponse); + throw getApiException("claimDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -4173,10 +4050,10 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St } } - private HttpRequest.Builder claimDevice1RequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { // verify the required parameter 'deviceName' is set if (deviceName == null) { - throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice1"); + throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -4476,134 +4353,6 @@ private HttpRequest.Builder clearEventsRequestBuilder(@javax.annotation.Nonnull return localVarRequestBuilder; } - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @throws ApiException if fails to make API call - */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - codeProcessingUrl(code, state, null); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - codeProcessingUrlWithHttpInfo(code, state, headers); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - return codeProcessingUrlWithHttpInfo(code, state, null); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = codeProcessingUrlRequestBuilder(code, state, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("codeProcessingUrl", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder codeProcessingUrlRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - // verify the required parameter 'code' is set - if (code == null) { - throw new ApiException(400, "Missing the required parameter 'code' when calling codeProcessingUrl"); - } - // verify the required parameter 'state' is set - if (state == null) { - throw new ApiException(400, "Missing the required parameter 'state' when calling codeProcessingUrl"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/admin/mail/oauth2/code"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "code"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); - localVarQueryParameterBaseName = "state"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Compare entity data to version (compareEntityDataToVersion) * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. @@ -7437,6 +7186,110 @@ private HttpRequest.Builder deleteEntityViewRequestBuilder(@javax.annotation.Non return localVarRequestBuilder; } + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths) throws ApiException { + deleteGeneralUserSettings(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + deleteGeneralUserSettingsWithHttpInfo(paths, headers); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { + return deleteGeneralUserSettingsWithHttpInfo(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteGeneralUserSettingsRequestBuilder(paths, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteGeneralUserSettings", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteGeneralUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + // verify the required parameter 'paths' is set + if (paths == null) { + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteGeneralUserSettings"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/user/settings/{paths}" + .replace("{paths}", ApiClient.urlEncode(paths.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * deleteImage * @@ -8736,10 +8589,11 @@ private HttpRequest.Builder deleteQueueRequestBuilder(@javax.annotation.Nonnull * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } /** @@ -8752,10 +8606,12 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse localVarResponse = deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + return localVarResponse.getData(); } /** @@ -8767,10 +8623,10 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { return deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } @@ -8784,10 +8640,10 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = deleteRelationRequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -8802,173 +8658,6 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St throw getApiException("deleteRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelation"); - } - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelation"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelation"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelation"); - } - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "fromId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromId", fromId)); - localVarQueryParameterBaseName = "fromType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromType", fromType)); - localVarQueryParameterBaseName = "relationType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationType", relationType)); - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - localVarQueryParameterBaseName = "toId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toId", toId)); - localVarQueryParameterBaseName = "toType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toType", toType)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse localVarResponse = deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteRelationV2RequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -9002,26 +8691,26 @@ public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { // verify the required parameter 'fromId' is set if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelation"); } // verify the required parameter 'fromType' is set if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelation"); } // verify the required parameter 'relationType' is set if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelation"); } // verify the required parameter 'toId' is set if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelation"); } // verify the required parameter 'toType' is set if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -9070,7 +8759,7 @@ private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Non } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -9081,7 +8770,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -9093,7 +8782,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -9105,7 +8794,7 @@ public ApiResponse deleteRelationsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -10082,42 +9771,42 @@ private HttpRequest.Builder deleteUserRequestBuilder(@javax.annotation.Nonnull S } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - deleteUserSettings(paths, type, null); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + deleteUserSettingsByType(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - deleteUserSettingsWithHttpInfo(paths, type, headers); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + deleteUserSettingsByTypeWithHttpInfo(paths, type, headers); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - return deleteUserSettingsWithHttpInfo(paths, type, null); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + return deleteUserSettingsByTypeWithHttpInfo(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) @@ -10125,8 +9814,8 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsRequestBuilder(paths, type, headers); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsByTypeRequestBuilder(paths, type, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -10137,7 +9826,7 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings", localVarResponse); + throw getApiException("deleteUserSettingsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -10162,14 +9851,14 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + private HttpRequest.Builder deleteUserSettingsByTypeRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { // verify the required parameter 'paths' is set if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettingsByType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettingsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -10194,110 +9883,6 @@ private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.N return localVarRequestBuilder; } - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @throws ApiException if fails to make API call - */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths) throws ApiException { - deleteUserSettings1(paths, null); - } - - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - deleteUserSettings1WithHttpInfo(paths, headers); - } - - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { - return deleteUserSettings1WithHttpInfo(paths, null); - } - - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettings1RequestBuilder(paths, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteUserSettings1RequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - // verify the required parameter 'paths' is set - if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/user/settings/{paths}" - .replace("{paths}", ApiClient.urlEncode(paths.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Delete widget type (deleteWidgetType) * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -11765,7 +11350,7 @@ private HttpRequest.Builder downloadResourceRequestBuilder(@javax.annotation.Non } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -11779,7 +11364,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -11795,7 +11380,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -11809,7 +11394,7 @@ public ApiResponse downloadResourceIfChangedWithHttpInfo(@javax.annotation } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -12532,6 +12117,129 @@ private HttpRequest.Builder findAlarmDataByQueryRequestBuilder(@javax.annotation return localVarRequestBuilder; } + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @return List<Asset> + * @throws ApiException if fails to make API call + */ + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQuery(assetSearchQuery, null); + } + + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @param headers Optional headers to include in the request + * @return List<Asset> + * @throws ApiException if fails to make API call + */ + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findAssetsByQueryWithHttpInfo(assetSearchQuery, headers); + return localVarResponse.getData(); + } + + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @return ApiResponse<List<Asset>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQueryWithHttpInfo(assetSearchQuery, null); + } + + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<Asset>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAssetsByQueryRequestBuilder(assetSearchQuery, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("findAssetsByQuery", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder findAssetsByQueryRequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'assetSearchQuery' is set + if (assetSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findAssetsByQuery"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/assets"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Find Available Entity Keys by Query (deprecated) * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -12863,62 +12571,50 @@ private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@java } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQuery(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findDevicesByQueryWithHttpInfo(deviceSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQueryWithHttpInfo(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findDevicesByQueryRequestBuilder(deviceSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -12929,11 +12625,11 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromAndRelationType", localVarResponse); + throw getApiException("findDevicesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -12943,10 +12639,10 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -12965,193 +12661,27 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ } } - private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromAndRelationType"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromAndRelationType"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByFromAndRelationType"); + private HttpRequest.Builder findDevicesByQueryRequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'deviceSearchQuery' is set + if (deviceSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findDevicesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/devices"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> - * @throws ApiException if fails to make API call - */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2(fromType, fromId, relationTypeGroup, null); - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return List<EntityRelation> - * @throws ApiException if fails to make API call - */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromV2"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relations/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -13164,50 +12694,50 @@ private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return List<EntityRelation> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQuery(entityRelationsQuery, null); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQuery(edgeSearchQuery, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQueryWithHttpInfo(entityRelationsQuery, headers); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEdgesByQueryWithHttpInfo(edgeSearchQuery, headers); return localVarResponse.getData(); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelation>> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQueryWithHttpInfo(edgeSearchQuery, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEdgesByQueryRequestBuilder(edgeSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13218,11 +12748,11 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery", localVarResponse); + throw getApiException("findEdgesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13232,10 +12762,10 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13254,15 +12784,15 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findByQuery"); + private HttpRequest.Builder findEdgesByQueryRequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'edgeSearchQuery' is set + if (edgeSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findEdgesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations"; + String localVarPath = "/api/edges"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13270,7 +12800,7 @@ private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -13287,50 +12817,50 @@ private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return List<EntityView> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1(entityViewSearchQuery, null); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQuery(entityDataQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityView> + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery1WithHttpInfo(entityViewSearchQuery, headers); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); return localVarResponse.getData(); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return ApiResponse<List<EntityView>> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1WithHttpInfo(entityViewSearchQuery, null); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityView>> + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery1RequestBuilder(entityViewSearchQuery, headers); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13341,11 +12871,11 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery1", localVarResponse); + throw getApiException("findEntityDataByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13355,10 +12885,10 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13377,15 +12907,15 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'entityViewSearchQuery' is set - if (entityViewSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findByQuery1"); + private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + // verify the required parameter 'entityDataQuery' is set + if (entityDataQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entityViews"; + String localVarPath = "/api/entitiesQuery/find"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13393,7 +12923,7 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -13410,50 +12940,58 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return List<Edge> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2(edgeSearchQuery, null); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<Edge> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery2WithHttpInfo(edgeSearchQuery, headers); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return ApiResponse<List<Edge>> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2WithHttpInfo(edgeSearchQuery, null); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Edge>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery2RequestBuilder(edgeSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13464,11 +13002,11 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery2", localVarResponse); + throw getApiException("findEntityRelationInfosByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13478,10 +13016,10 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13500,27 +13038,42 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'edgeSearchQuery' is set - if (edgeSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findByQuery2"); + private HttpRequest.Builder findEntityRelationInfosByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationInfosByFrom"); + } + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationInfosByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edges"; + String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -13533,50 +13086,50 @@ private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) - * @return List<Device> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3(deviceSearchQuery, null); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQuery(entityRelationsQuery, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return List<Device> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery3WithHttpInfo(deviceSearchQuery, headers); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) - * @return ApiResponse<List<Device>> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3WithHttpInfo(deviceSearchQuery, null); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Device>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery3RequestBuilder(deviceSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13587,11 +13140,11 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery3", localVarResponse); + throw getApiException("findEntityRelationInfosByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13601,10 +13154,10 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13623,15 +13176,15 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn } } - private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'deviceSearchQuery' is set - if (deviceSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findByQuery3"); + private HttpRequest.Builder findEntityRelationInfosByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationInfosByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/devices"; + String localVarPath = "/api/relations/info"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13639,7 +13192,7 @@ private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -13656,50 +13209,58 @@ private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) - * @return List<Asset> + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4(assetSearchQuery, null); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByTo(toType, toId, relationTypeGroup, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<Asset> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery4WithHttpInfo(assetSearchQuery, headers); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) - * @return ApiResponse<List<Asset>> + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4WithHttpInfo(assetSearchQuery, null); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Asset>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery4RequestBuilder(assetSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13710,11 +13271,11 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery4", localVarResponse); + throw getApiException("findEntityRelationInfosByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13724,10 +13285,10 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13746,27 +13307,42 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'assetSearchQuery' is set - if (assetSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findByQuery4"); + private HttpRequest.Builder findEntityRelationInfosByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationInfosByTo"); + } + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationInfosByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/assets"; + String localVarPath = "/api/relations/info/to/{toType}/{toId}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -13779,62 +13355,58 @@ private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13845,7 +13417,7 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToAndRelationType", localVarResponse); + throw getApiException("findEntityRelationsByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -13881,26 +13453,21 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja } } - private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToAndRelationType"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToAndRelationType"); + private HttpRequest.Builder findEntityRelationsByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFrom"); } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByToAndRelationType"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -13934,58 +13501,62 @@ private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotat } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2(toType, toId, relationTypeGroup, null); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13996,7 +13567,7 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToV2", localVarResponse); + throw getApiException("findEntityRelationsByFromAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -14032,21 +13603,26 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToV2"); + private HttpRequest.Builder findEntityRelationsByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFromAndRelationType"); } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToV2"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFromAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByFromAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -14080,50 +13656,50 @@ private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull S } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return PageDataEntityData + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQuery(entityDataQuery, null); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQuery(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return PageDataEntityData + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return ApiResponse<PageDataEntityData> + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEntityData> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14134,11 +13710,11 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findEntityDataByQuery", localVarResponse); + throw getApiException("findEntityRelationsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14148,10 +13724,10 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14170,15 +13746,15 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - // verify the required parameter 'entityDataQuery' is set - if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); + private HttpRequest.Builder findEntityRelationsByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entitiesQuery/find"; + String localVarPath = "/api/relations"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -14186,7 +13762,7 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -14203,58 +13779,58 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2(fromType, fromId, relationTypeGroup, null); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByTo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14265,11 +13841,11 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByFromV2", localVarResponse); + throw getApiException("findEntityRelationsByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14279,10 +13855,10 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14301,21 +13877,21 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax } } - private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findInfoByFromV2"); + private HttpRequest.Builder findEntityRelationsByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByTo"); } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findInfoByFromV2"); + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); + String localVarPath = "/api/relations/to/{toType}/{toId}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -14349,50 +13925,62 @@ private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Non } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return List<EntityRelationInfo> + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQuery(entityRelationsQuery, null); + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByQueryWithHttpInfo(entityRelationsQuery, headers); + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelationInfo>> + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14403,11 +13991,11 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByQuery", localVarResponse); + throw getApiException("findEntityRelationsByToAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14417,10 +14005,10 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14439,27 +14027,47 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findInfoByQuery"); + private HttpRequest.Builder findEntityRelationsByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByToAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info"; + String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -14472,58 +14080,50 @@ private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonn } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2(toType, toId, relationTypeGroup, null); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQuery(entityViewSearchQuery, null); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, null); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityViewsByQueryRequestBuilder(entityViewSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14534,11 +14134,11 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByToV2", localVarResponse); + throw getApiException("findEntityViewsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14548,10 +14148,10 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14570,42 +14170,27 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a } } - private HttpRequest.Builder findInfoByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findInfoByToV2"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findInfoByToV2"); + private HttpRequest.Builder findEntityViewsByQueryRequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'entityViewSearchQuery' is set + if (entityViewSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findEntityViewsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/entityViews"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -14896,50 +14481,50 @@ private HttpRequest.Builder findTenantOAuth2ClientInfosRequestBuilder(@javax.ann } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2(clientIds, null); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIds(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, headers); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, headers); return localVarResponse.getData(); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, null); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsV2RequestBuilder(clientIds, headers); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsRequestBuilder(clientIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14950,7 +14535,7 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findTenantOAuth2ClientInfosByIdsV2", localVarResponse); + throw getApiException("findTenantOAuth2ClientInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -14986,10 +14571,10 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit } } - private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsRequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { // verify the required parameter 'clientIds' is set if (clientIds == null) { - throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -16608,7 +16193,7 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16626,12 +16211,12 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16650,13 +16235,13 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - ApiResponse localVarResponse = getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + ApiResponse localVarResponse = getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); return localVarResponse.getData(); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16674,12 +16259,12 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16698,8 +16283,8 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAlarmsRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmsByEntityRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16710,7 +16295,7 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAlarms", localVarResponse); + throw getApiException("getAlarmsByEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -16746,22 +16331,22 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder getAlarmsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + private HttpRequest.Builder getAlarmsByEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmsByEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmsByEntity"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmsByEntity"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmsByEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -17427,6 +17012,115 @@ private HttpRequest.Builder getAllAlarmsV2RequestBuilder(@javax.annotation.Nonnu return localVarRequestBuilder; } + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return List<WidgetsBundle> + * @throws ApiException if fails to make API call + */ + public List getAllWidgetsBundles() throws ApiException { + return getAllWidgetsBundles(null); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return List<WidgetsBundle> + * @throws ApiException if fails to make API call + */ + public List getAllWidgetsBundles(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllWidgetsBundlesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return ApiResponse<List<WidgetsBundle>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllWidgetsBundlesWithHttpInfo() throws ApiException { + return getAllWidgetsBundlesWithHttpInfo(null); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetsBundle>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllWidgetsBundlesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllWidgetsBundlesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAllWidgetsBundles", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAllWidgetsBundlesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundles/all"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * getApplicationRedirect * @@ -18487,50 +18181,50 @@ private HttpRequest.Builder getAssetProfilesRequestBuilder(@javax.annotation.Non } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2(assetProfileIds, null); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIds(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, headers); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAssetProfilesByIdsWithHttpInfo(assetProfileIds, headers); return localVarResponse.getData(); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, null); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIdsWithHttpInfo(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsV2RequestBuilder(assetProfileIds, headers); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsRequestBuilder(assetProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18541,7 +18235,7 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAssetProfilesByIdsV2", localVarResponse); + throw getApiException("getAssetProfilesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -18577,10 +18271,10 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ } } - private HttpRequest.Builder getAssetProfilesByIdsV2RequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getAssetProfilesByIdsRequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { // verify the required parameter 'assetProfileIds' is set if (assetProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -19937,205 +19631,10 @@ private HttpRequest.Builder getAuditLogsByCustomerIdRequestBuilder(@javax.annota } /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @return PageDataAuditLog - * @throws ApiException if fails to make API call - */ - public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByEntityId(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); - } - - /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @param headers Optional headers to include in the request - * @return PageDataAuditLog - * @throws ApiException if fails to make API call - */ - public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - ApiResponse localVarResponse = getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); - return localVarResponse.getData(); - } - - /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @return ApiResponse<PageDataAuditLog> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); - } - - /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataAuditLog> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuditLogsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuditLogsByEntityId", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataAuditLog responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getAuditLogsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAuditLogsByEntityId"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAuditLogsByEntityId"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByEntityId"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByEntityId"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/audit/logs/entity/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); - localVarQueryParameterBaseName = "actionTypes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("actionTypes", actionTypes)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20147,14 +19646,15 @@ private HttpRequest.Builder getAuditLogsByEntityIdRequestBuilder(@javax.annotati * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByUserId(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); + public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByEntityId(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20167,15 +19667,16 @@ public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String us * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - ApiResponse localVarResponse = getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); + public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + ApiResponse localVarResponse = getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); return localVarResponse.getData(); } /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20187,14 +19688,15 @@ public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String us * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); + public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20207,8 +19709,8 @@ public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.ann * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuditLogsByUserIdRequestBuilder(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); + public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAuditLogsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20219,7 +19721,7 @@ public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuditLogsByUserId", localVarResponse); + throw getApiException("getAuditLogsByEntityId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20255,24 +19757,29 @@ public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.ann } } - private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException(400, "Missing the required parameter 'userId' when calling getAuditLogsByUserId"); + private HttpRequest.Builder getAuditLogsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAuditLogsByEntityId"); + } + // verify the required parameter 'entityId' is set + if (entityId == null) { + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAuditLogsByEntityId"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByUserId"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByEntityId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByUserId"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByEntityId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/audit/logs/user/{userId}" - .replace("{userId}", ApiClient.urlEncode(userId.toString())); + String localVarPath = "/api/audit/logs/entity/{entityType}/{entityId}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -20320,46 +19827,82 @@ private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return String + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) + * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public String getAuthorizationUrl() throws ApiException { - return getAuthorizationUrl(null); + public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByUserId(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) * @param headers Optional headers to include in the request - * @return String + * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public String getAuthorizationUrl(Map headers) throws ApiException { - ApiResponse localVarResponse = getAuthorizationUrlWithHttpInfo(headers); + public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + ApiResponse localVarResponse = getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); return localVarResponse.getData(); } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return ApiResponse<String> + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) + * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuthorizationUrlWithHttpInfo() throws ApiException { - return getAuthorizationUrlWithHttpInfo(null); + public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<String> + * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuthorizationUrlWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuthorizationUrlRequestBuilder(headers); + public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAuditLogsByUserIdRequestBuilder(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20370,11 +19913,11 @@ public ApiResponse getAuthorizationUrlWithHttpInfo(Map h InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuthorizationUrl", localVarResponse); + throw getApiException("getAuditLogsByUserId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -20384,10 +19927,10 @@ public ApiResponse getAuthorizationUrlWithHttpInfo(Map h String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + PageDataAuditLog responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -20406,15 +19949,57 @@ public ApiResponse getAuthorizationUrlWithHttpInfo(Map h } } - private HttpRequest.Builder getAuthorizationUrlRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException(400, "Missing the required parameter 'userId' when calling getAuditLogsByUserId"); + } + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByUserId"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByUserId"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/admin/mail/oauth2/authorize"; + String localVarPath = "/api/audit/logs/user/{userId}" + .replace("{userId}", ApiClient.urlEncode(userId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + localVarQueryParameterBaseName = "startTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); + localVarQueryParameterBaseName = "endTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "actionTypes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("actionTypes", actionTypes)); - localVarRequestBuilder.header("Accept", "application/text, application/json"); + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -20756,46 +20341,46 @@ private HttpRequest.Builder getAvailableDeliveryMethodsRequestBuilder(Map getAvailableTwoFaProviders() throws ApiException { - return getAvailableTwoFaProviders(null); + public List getAvailableTwoFaProviderInfos() throws ApiException { + return getAvailableTwoFaProviderInfos(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return List<TwoFaProviderInfo> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProvidersWithHttpInfo(headers); + public List getAvailableTwoFaProviderInfos(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderInfosWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo() throws ApiException { - return getAvailableTwoFaProvidersWithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderInfosWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProvidersRequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderInfosRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20806,7 +20391,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders", localVarResponse); + throw getApiException("getAvailableTwoFaProviderInfos", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20842,7 +20427,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn } } - private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderInfosRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -20865,46 +20450,46 @@ private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map getAvailableTwoFaProviders1() throws ApiException { - return getAvailableTwoFaProviders1(null); + public List getAvailableTwoFaProviderTypes() throws ApiException { + return getAvailableTwoFaProviderTypes(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return List<TwoFaProviderType> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders1(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProviders1WithHttpInfo(headers); + public List getAvailableTwoFaProviderTypes(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderTypesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo() throws ApiException { - return getAvailableTwoFaProviders1WithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderTypesWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviders1RequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderTypesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20915,7 +20500,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders1", localVarResponse); + throw getApiException("getAvailableTwoFaProviderTypes", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20951,7 +20536,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI } } - private HttpRequest.Builder getAvailableTwoFaProviders1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderTypesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -21105,6 +20690,124 @@ private HttpRequest.Builder getBundleWidgetTypeFqnsRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypes(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getBundleWidgetTypesWithHttpInfo(widgetsBundleId, headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypesWithHttpInfo(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesRequestBuilder(widgetsBundleId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getBundleWidgetTypes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getBundleWidgetTypesRequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + // verify the required parameter 'widgetsBundleId' is set + if (widgetsBundleId == null) { + throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" + .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) * Returns an array of Widget Type Details objects that belong to specified Widget Bundle.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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -21431,124 +21134,6 @@ private HttpRequest.Builder getBundleWidgetTypesInfosRequestBuilder(@javax.annot return localVarRequestBuilder; } - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, headers); - return localVarResponse.getData(); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesV2RequestBuilder(widgetsBundleId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getBundleWidgetTypesV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getBundleWidgetTypesV2RequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - // verify the required parameter 'widgetsBundleId' is set - if (widgetsBundleId == null) { - throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypesV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" - .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Calculated Field (getCalculatedFieldById) * Fetch the Calculated Field object based on the provided Calculated Field Id. @@ -22016,230 +21601,78 @@ private HttpRequest.Builder getCalculatedFieldsRequestBuilder(@javax.annotation. } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return PageDataCalculatedField - * @throws ApiException if fails to make API call - */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); - } - - /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return PageDataCalculatedField - * @throws ApiException if fails to make API call - */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); - return localVarResponse.getData(); - } - - /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return ApiResponse<PageDataCalculatedField> - * @throws ApiException if fails to make API call - */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); - } - - /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataCalculatedField> - * @throws ApiException if fails to make API call - */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdV2RequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCalculatedFieldsByEntityIdV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataCalculatedField responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getCalculatedFieldsByEntityIdV2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityIdV2"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityIdV2"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityIdV2"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityIdV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/calculatedField/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "type"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return List<OAuth2ClientRegistrationTemplate> + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public List getClientRegistrationTemplates() throws ApiException { - return getClientRegistrationTemplates(null); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @param headers Optional headers to include in the request - * @return List<OAuth2ClientRegistrationTemplate> + * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public List getClientRegistrationTemplates(Map headers) throws ApiException { - ApiResponse> localVarResponse = getClientRegistrationTemplatesWithHttpInfo(headers); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo() throws ApiException { - return getClientRegistrationTemplatesWithHttpInfo(null); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplatesRequestBuilder(headers); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -22250,11 +21683,11 @@ public ApiResponse> getClientRegistration InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates", localVarResponse); + throw getApiException("getCalculatedFieldsByEntityId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -22264,10 +21697,10 @@ public ApiResponse> getClientRegistration String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + PageDataCalculatedField responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -22286,122 +21719,56 @@ public ApiResponse> getClientRegistration } } - private HttpRequest.Builder getClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/oauth2/config/template"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); + private HttpRequest.Builder getCalculatedFieldsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityId"); } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); + // verify the required parameter 'entityId' is set + if (entityId == null) { + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityId"); } - return localVarRequestBuilder; - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() throws ApiException { - return getClientRegistrationTemplates1(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @param headers Optional headers to include in the request - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1(Map headers) throws ApiException { - ApiResponse localVarResponse = getClientRegistrationTemplates1WithHttpInfo(headers); - return localVarResponse.getData(); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo() throws ApiException { - return getClientRegistrationTemplates1WithHttpInfo(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @param headers Optional headers to include in the request - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplates1RequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityId"); } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityId"); } - } - - private HttpRequest.Builder getClientRegistrationTemplates1RequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/mail/config/template"; + String localVarPath = "/api/calculatedField/{entityType}/{entityId}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Accept", "application/json"); @@ -24969,50 +24336,50 @@ private HttpRequest.Builder getCustomersRequestBuilder(@javax.annotation.Nonnull } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2(customerIds, null); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIds(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getCustomersByIdsV2WithHttpInfo(customerIds, headers); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getCustomersByIdsWithHttpInfo(customerIds, headers); return localVarResponse.getData(); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2WithHttpInfo(customerIds, null); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIdsWithHttpInfo(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsV2RequestBuilder(customerIds, headers); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsRequestBuilder(customerIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -25023,7 +24390,7 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCustomersByIdsV2", localVarResponse); + throw getApiException("getCustomersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -25059,10 +24426,10 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota } } - private HttpRequest.Builder getCustomersByIdsV2RequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + private HttpRequest.Builder getCustomersByIdsRequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { // verify the required parameter 'customerIds' is set if (customerIds == null) { - throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -25349,50 +24716,50 @@ private HttpRequest.Builder getDashboardInfoByIdRequestBuilder(@javax.annotation } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @return List<DashboardInfo> * @throws ApiException if fails to make API call */ - public List getDashboardsByIdsV2(@javax.annotation.Nonnull List dashboardIds) throws ApiException { - return getDashboardsByIdsV2(dashboardIds, null); + public List getDashboardsByIds(@javax.annotation.Nonnull List dashboardIds) throws ApiException { + return getDashboardsByIds(dashboardIds, null); } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<DashboardInfo> * @throws ApiException if fails to make API call */ - public List getDashboardsByIdsV2(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getDashboardsByIdsV2WithHttpInfo(dashboardIds, headers); + public List getDashboardsByIds(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDashboardsByIdsWithHttpInfo(dashboardIds, headers); return localVarResponse.getData(); } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @return ApiResponse<List<DashboardInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List dashboardIds) throws ApiException { - return getDashboardsByIdsV2WithHttpInfo(dashboardIds, null); + public ApiResponse> getDashboardsByIdsWithHttpInfo(@javax.annotation.Nonnull List dashboardIds) throws ApiException { + return getDashboardsByIdsWithHttpInfo(dashboardIds, null); } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<DashboardInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDashboardsByIdsV2RequestBuilder(dashboardIds, headers); + public ApiResponse> getDashboardsByIdsWithHttpInfo(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDashboardsByIdsRequestBuilder(dashboardIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -25403,7 +24770,7 @@ public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDashboardsByIdsV2", localVarResponse); + throw getApiException("getDashboardsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -25439,10 +24806,10 @@ public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax. } } - private HttpRequest.Builder getDashboardsByIdsV2RequestBuilder(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { + private HttpRequest.Builder getDashboardsByIdsRequestBuilder(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { // verify the required parameter 'dashboardIds' is set if (dashboardIds == null) { - throw new ApiException(400, "Missing the required parameter 'dashboardIds' when calling getDashboardsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'dashboardIds' when calling getDashboardsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -26734,50 +26101,50 @@ private HttpRequest.Builder getDeviceProfileInfosRequestBuilder(@javax.annotatio } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @return List<DeviceProfileInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2(deviceProfileIds, null); + public List getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIds(deviceProfileIds, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<DeviceProfileInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, headers); + public List getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, headers); return localVarResponse.getData(); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @return ApiResponse<List<DeviceProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, null); + public ApiResponse> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<DeviceProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsV2RequestBuilder(deviceProfileIds, headers); + public ApiResponse> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsRequestBuilder(deviceProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -26788,7 +26155,7 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDeviceProfileInfosByIdsV2", localVarResponse); + throw getApiException("getDeviceProfileInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -26824,10 +26191,10 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp } } - private HttpRequest.Builder getDeviceProfileInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getDeviceProfileInfosByIdsRequestBuilder(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { // verify the required parameter 'deviceProfileIds' is set if (deviceProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileIds' when calling getDeviceProfileInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileIds' when calling getDeviceProfileInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -26993,6 +26360,134 @@ private HttpRequest.Builder getDeviceProfileNamesRequestBuilder(@javax.annotatio return localVarRequestBuilder; } + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeys(deviceProfileId, null); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param headers Optional headers to include in the request + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, headers); + return localVarResponse.getData(); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @return ApiResponse<List<String>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, null); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<String>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileTimeseriesKeysRequestBuilder(deviceProfileId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDeviceProfileTimeseriesKeys", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDeviceProfileTimeseriesKeysRequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "deviceProfileId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Device Profiles (getDeviceProfiles) * Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. @@ -30212,50 +29707,50 @@ private HttpRequest.Builder getEntityViewTypesRequestBuilder(Map } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2(entityViewIds, null); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIds(entityViewIds, null); } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getEntityViewsByIdsV2WithHttpInfo(entityViewIds, headers); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getEntityViewsByIdsWithHttpInfo(entityViewIds, headers); return localVarResponse.getData(); } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2WithHttpInfo(entityViewIds, null); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIdsWithHttpInfo(entityViewIds, null); } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsV2RequestBuilder(entityViewIds, headers); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsRequestBuilder(entityViewIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30266,7 +29761,7 @@ public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEntityViewsByIdsV2", localVarResponse); + throw getApiException("getEntityViewsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30302,10 +29797,10 @@ public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.an } } - private HttpRequest.Builder getEntityViewsByIdsV2RequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + private HttpRequest.Builder getEntityViewsByIdsRequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { // verify the required parameter 'entityViewIds' is set if (entityViewIds == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -30344,207 +29839,7 @@ private HttpRequest.Builder getEntityViewsByIdsV2RequestBuilder(@javax.annotatio } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return PageDataEventInfo - * @throws ApiException if fails to make API call - */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @param headers Optional headers to include in the request - * @return PageDataEventInfo - * @throws ApiException if fails to make API call - */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); - return localVarResponse.getData(); - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return ApiResponse<PageDataEventInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEventInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEventsRequestBuilder(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEventInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents"); - } - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/events/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "tenantId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("tenantId", tenantId)); - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30560,12 +29855,12 @@ private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull St * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30582,13 +29877,13 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30604,12 +29899,12 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30626,8 +29921,8 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents1RequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByFilterRequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30638,7 +29933,7 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents1", localVarResponse); + throw getApiException("getEventsByFilter", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30674,30 +29969,30 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByFilterRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByFilter"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByFilter"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByFilter"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByFilter"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByFilter"); } // verify the required parameter 'eventFilter' is set if (eventFilter == null) { - throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEventsByFilter"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -30758,7 +30053,7 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30774,12 +30069,12 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30796,13 +30091,13 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30818,12 +30113,12 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30840,8 +30135,8 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents2RequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByTypeRequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30852,7 +30147,7 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents2", localVarResponse); + throw getApiException("getEventsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30888,30 +30183,30 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByTypeRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByType"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByType"); } // verify the required parameter 'eventType' is set if (eventType == null) { - throw new ApiException(400, "Missing the required parameter 'eventType' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'eventType' when calling getEventsByType"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -31239,7 +30534,7 @@ private HttpRequest.Builder getFirmwareRequestBuilder(@javax.annotation.Nonnull } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call @@ -31249,7 +30544,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() throws A } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode @@ -31261,7 +30556,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings(Map getGeneralUserSettin } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> @@ -33457,66 +32752,206 @@ private HttpRequest.Builder getLwm2mListObjectsRequestBuilder(@javax.annotation. } /** - * Get LwM2M Objects (getLwm2mListObjectsPage) - * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return List<LwM2mObject> + * Get LwM2M Objects (getLwm2mListObjectsPage) + * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return List<LwM2mObject> + * @throws ApiException if fails to make API call + */ + public List getLwm2mListObjectsPage(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getLwm2mListObjectsPage(pageSize, page, textSearch, sortProperty, sortOrder, null); + } + + /** + * Get LwM2M Objects (getLwm2mListObjectsPage) + * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param headers Optional headers to include in the request + * @return List<LwM2mObject> + * @throws ApiException if fails to make API call + */ + public List getLwm2mListObjectsPage(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse> localVarResponse = getLwm2mListObjectsPageWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, headers); + return localVarResponse.getData(); + } + + /** + * Get LwM2M Objects (getLwm2mListObjectsPage) + * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return ApiResponse<List<LwM2mObject>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getLwm2mListObjectsPageWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); + } + + /** + * Get LwM2M Objects (getLwm2mListObjectsPage) + * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<LwM2mObject>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getLwm2mListObjectsPageRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getLwm2mListObjectsPage", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getLwm2mListObjectsPageRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getLwm2mListObjectsPage"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getLwm2mListObjectsPage"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/resource/lwm2m/page"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports + * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public List getLwm2mListObjectsPage(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getLwm2mListObjectsPage(pageSize, page, textSearch, sortProperty, sortOrder, null); + public com.fasterxml.jackson.databind.JsonNode getMailConfigTemplates() throws ApiException { + return getMailConfigTemplates(null); } /** - * Get LwM2M Objects (getLwm2mListObjectsPage) - * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports * @param headers Optional headers to include in the request - * @return List<LwM2mObject> + * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public List getLwm2mListObjectsPage(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse> localVarResponse = getLwm2mListObjectsPageWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, headers); + public com.fasterxml.jackson.databind.JsonNode getMailConfigTemplates(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailConfigTemplatesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get LwM2M Objects (getLwm2mListObjectsPage) - * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return ApiResponse<List<LwM2mObject>> + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getLwm2mListObjectsPageWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getMailConfigTemplatesWithHttpInfo() throws ApiException { + return getMailConfigTemplatesWithHttpInfo(null); } /** - * Get LwM2M Objects (getLwm2mListObjectsPage) - * Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. 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 response schema for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. Available for users with 'TENANT_ADMIN' authority. - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on the resource title. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports * @param headers Optional headers to include in the request - * @return ApiResponse<List<LwM2mObject>> + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getLwm2mListObjectsPageRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getMailConfigTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailConfigTemplatesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -33527,11 +32962,11 @@ public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getLwm2mListObjectsPage", localVarResponse); + throw getApiException("getMailConfigTemplates", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -33541,10 +32976,10 @@ public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -33563,46 +32998,124 @@ public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax } } - private HttpRequest.Builder getLwm2mListObjectsPageRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getLwm2mListObjectsPage"); + private HttpRequest.Builder getMailConfigTemplatesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/mail/config/template"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getLwm2mListObjectsPage"); + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); } + return localVarRequestBuilder; + } - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl() throws ApiException { + return getMailOAuth2AuthorizationUrl(null); + } - String localVarPath = "/api/resource/lwm2m/page"; + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailOAuth2AuthorizationUrlWithHttpInfo(headers); + return localVarResponse.getData(); + } - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo() throws ApiException { + return getMailOAuth2AuthorizationUrlWithHttpInfo(null); + } - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailOAuth2AuthorizationUrlRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getMailOAuth2AuthorizationUrl", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } - localVarRequestBuilder.header("Accept", "application/json"); + private HttpRequest.Builder getMailOAuth2AuthorizationUrlRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/admin/mail/oauth2/authorize"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/text, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -33953,7 +33466,7 @@ private HttpRequest.Builder getMobileAppBundleInfoByIdRequestBuilder(@javax.anno } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @return MobileApp @@ -33964,7 +33477,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id) throws ApiE } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -33977,7 +33490,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id, Map getMobileAppByIdWithHttpInfo(@javax.annotation.Non } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -35379,50 +34892,50 @@ private HttpRequest.Builder getNotificationTargetsRequestBuilder(@javax.annotati } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2(ids, null); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIds(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - ApiResponse> localVarResponse = getNotificationTargetsByIdsV2WithHttpInfo(ids, headers); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + ApiResponse> localVarResponse = getNotificationTargetsByIdsWithHttpInfo(ids, headers); return localVarResponse.getData(); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2WithHttpInfo(ids, null); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIdsWithHttpInfo(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsV2RequestBuilder(ids, headers); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsRequestBuilder(ids, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -35433,7 +34946,7 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsByIdsV2", localVarResponse); + throw getApiException("getNotificationTargetsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -35469,10 +34982,10 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt } } - private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsByIdsRequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { // verify the required parameter 'ids' is set if (ids == null) { - throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -35511,7 +35024,7 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35522,12 +35035,12 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35539,13 +35052,13 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35556,12 +35069,12 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35573,8 +35086,8 @@ public ApiResponse getNotificationTargetsBySupported * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeRequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -35585,7 +35098,7 @@ public ApiResponse getNotificationTargetsBySupported InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsBySupportedNotificationTypeV2", localVarResponse); + throw getApiException("getNotificationTargetsBySupportedNotificationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -35621,18 +35134,18 @@ public ApiResponse getNotificationTargetsBySupported } } - private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeRequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'notificationType' is set if (notificationType == null) { - throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -36253,6 +35766,115 @@ private HttpRequest.Builder getOAuth2ClientByIdRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates() throws ApiException { + return getOAuth2ClientRegistrationTemplates(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse> localVarResponse = getOAuth2ClientRegistrationTemplatesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getOAuth2ClientRegistrationTemplatesWithHttpInfo(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientRegistrationTemplatesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getOAuth2ClientRegistrationTemplates", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getOAuth2ClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/oauth2/config/template"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 clients (getOAuth2Clients) * Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header) @@ -36784,7 +36406,7 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36796,12 +36418,12 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36814,13 +36436,13 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36832,12 +36454,12 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36850,8 +36472,8 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getOtaPackages1RequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOtaPackagesByDeviceProfileAndTypeRequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -36862,7 +36484,7 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getOtaPackages1", localVarResponse); + throw getApiException("getOtaPackagesByDeviceProfileAndType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -36898,22 +36520,22 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an } } - private HttpRequest.Builder getOtaPackages1RequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getOtaPackagesByDeviceProfileAndTypeRequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'deviceProfileId' is set if (deviceProfileId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackagesByDeviceProfileAndType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackagesByDeviceProfileAndType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackagesByDeviceProfileAndType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackagesByDeviceProfileAndType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -37364,7 +36986,7 @@ private HttpRequest.Builder getPlatformTwoFaSettingsRequestBuilder(Map headers) throws ApiE } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @return ApiResponse<QrCodeSettings> * @throws ApiException if fails to make API call @@ -37396,7 +37018,7 @@ public ApiResponse getQrCodeSettingsWithHttpInfo() throws ApiExc } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<QrCodeSettings> @@ -37827,50 +37449,50 @@ private HttpRequest.Builder getQueueStatsByIdRequestBuilder(@javax.annotation.No } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2(queueStatsIds, null); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIds(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, headers); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getQueueStatsByIdsWithHttpInfo(queueStatsIds, headers); return localVarResponse.getData(); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, null); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIdsWithHttpInfo(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsV2RequestBuilder(queueStatsIds, headers); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsRequestBuilder(queueStatsIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -37881,7 +37503,7 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getQueueStatsByIdsV2", localVarResponse); + throw getApiException("getQueueStatsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -37917,10 +37539,10 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann } } - private HttpRequest.Builder getQueueStatsByIdsV2RequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + private HttpRequest.Builder getQueueStatsByIdsRequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { // verify the required parameter 'queueStatsIds' is set if (queueStatsIds == null) { - throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -39701,50 +39323,50 @@ private HttpRequest.Builder getRuleChainsRequestBuilder(@javax.annotation.Nonnul } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2(ruleChainIds, null); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIds(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, headers); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getRuleChainsByIdsWithHttpInfo(ruleChainIds, headers); return localVarResponse.getData(); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, null); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIdsWithHttpInfo(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsV2RequestBuilder(ruleChainIds, headers); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsRequestBuilder(ruleChainIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -39755,7 +39377,7 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getRuleChainsByIdsV2", localVarResponse); + throw getApiException("getRuleChainsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -39791,10 +39413,10 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno } } - private HttpRequest.Builder getRuleChainsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + private HttpRequest.Builder getRuleChainsByIdsRequestBuilder(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { // verify the required parameter 'ruleChainIds' is set if (ruleChainIds == null) { - throw new ApiException(400, "Missing the required parameter 'ruleChainIds' when calling getRuleChainsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ruleChainIds' when calling getRuleChainsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -40441,50 +40063,50 @@ private HttpRequest.Builder getSystemInfoRequestBuilder(Map head } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2(resourceIds, null); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIds(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, headers); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, headers); return localVarResponse.getData(); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, null); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsV2RequestBuilder(resourceIds, headers); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsRequestBuilder(resourceIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -40495,7 +40117,7 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getSystemOrTenantResourcesByIdsV2", localVarResponse); + throw getApiException("getSystemOrTenantResourcesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -40531,10 +40153,10 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt } } - private HttpRequest.Builder getSystemOrTenantResourcesByIdsV2RequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + private HttpRequest.Builder getSystemOrTenantResourcesByIdsRequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { // verify the required parameter 'resourceIds' is set if (resourceIds == null) { - throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -41462,27 +41084,27 @@ private HttpRequest.Builder getTenantCustomerRequestBuilder(@javax.annotation.No } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41490,33 +41112,33 @@ public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Strin * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41524,8 +41146,8 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -41572,11 +41194,7 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax } } - private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboards"); - } + private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards"); @@ -41588,8 +41206,7 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/{tenantId}/dashboards" - .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); + String localVarPath = "/api/tenant/dashboards"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -41598,6 +41215,8 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "mobile"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -41631,27 +41250,27 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41659,33 +41278,33 @@ public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Inte * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41693,8 +41312,8 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboards1RequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsByTenantIdRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -41705,7 +41324,7 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantDashboards1", localVarResponse); + throw getApiException("getTenantDashboardsByTenantId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -41741,19 +41360,24 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java } } - private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getTenantDashboardsByTenantIdRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboardsByTenantId"); + } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboardsByTenantId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboardsByTenantId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/dashboards"; + String localVarPath = "/api/tenant/{tenantId}/dashboards" + .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -41762,8 +41386,6 @@ private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "mobile"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -43908,7 +43530,7 @@ private HttpRequest.Builder getTenantMobileAppBundleInfosRequestBuilder(@javax.a } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -43924,7 +43546,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -43942,7 +43564,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -43958,7 +43580,7 @@ public ApiResponse getTenantMobileAppsWithHttpInfo(@javax.ann } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45092,7 +44714,7 @@ private HttpRequest.Builder getTenantQueuesByServiceTypeRequestBuilder(@javax.an } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45107,7 +44729,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45124,7 +44746,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45139,7 +44761,7 @@ public ApiResponse getTenantResourcesWithHttpInfo(@javax } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45521,50 +45143,50 @@ private HttpRequest.Builder getTenantsRequestBuilder(@javax.annotation.Nonnull I } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2(tenantIds, null); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIds(tenantIds, null); } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTenantsByIdsV2WithHttpInfo(tenantIds, headers); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getTenantsByIdsWithHttpInfo(tenantIds, headers); return localVarResponse.getData(); } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2WithHttpInfo(tenantIds, null); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIdsWithHttpInfo(tenantIds, null); } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsV2RequestBuilder(tenantIds, headers); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsRequestBuilder(tenantIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -45575,7 +45197,7 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantsByIdsV2", localVarResponse); + throw getApiException("getTenantsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -45611,10 +45233,10 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation } } - private HttpRequest.Builder getTenantsByIdsV2RequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + private HttpRequest.Builder getTenantsByIdsRequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { // verify the required parameter 'tenantIds' is set if (tenantIds == null) { - throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -45993,134 +45615,6 @@ private HttpRequest.Builder getTimeseriesKeysRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTimeseriesKeys1WithHttpInfo(deviceProfileId, headers); - return localVarResponse.getData(); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1WithHttpInfo(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTimeseriesKeys1RequestBuilder(deviceProfileId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTimeseriesKeys1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getTimeseriesKeys1RequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "deviceProfileId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Trendz Settings (getTrendzSettings) * Retrieves Trendz settings for this tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -46755,7 +46249,7 @@ private HttpRequest.Builder getUserByIdRequestBuilder(@javax.annotation.Nonnull } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @return UserDashboardsInfo * @throws ApiException if fails to make API call @@ -46765,7 +46259,7 @@ public UserDashboardsInfo getUserDashboardsInfo() throws ApiException { } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param headers Optional headers to include in the request * @return UserDashboardsInfo @@ -46777,7 +46271,7 @@ public UserDashboardsInfo getUserDashboardsInfo(Map headers) thr } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @return ApiResponse<UserDashboardsInfo> * @throws ApiException if fails to make API call @@ -46787,7 +46281,7 @@ public ApiResponse getUserDashboardsInfoWithHttpInfo() throw } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param headers Optional headers to include in the request * @return ApiResponse<UserDashboardsInfo> @@ -47738,50 +47232,50 @@ private HttpRequest.Builder getUsersRequestBuilder(@javax.annotation.Nonnull Int } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2(userIds, null); + public List getUsersByIds(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIds(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getUsersByIdsV2WithHttpInfo(userIds, headers); + public List getUsersByIds(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getUsersByIdsWithHttpInfo(userIds, headers); return localVarResponse.getData(); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2WithHttpInfo(userIds, null); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIdsWithHttpInfo(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getUsersByIdsV2RequestBuilder(userIds, headers); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getUsersByIdsRequestBuilder(userIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -47792,7 +47286,7 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getUsersByIdsV2", localVarResponse); + throw getApiException("getUsersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -47828,10 +47322,10 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder getUsersByIdsV2RequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + private HttpRequest.Builder getUsersByIdsRequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { // verify the required parameter 'userIds' is set if (userIds == null) { - throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -49299,46 +48793,51 @@ private HttpRequest.Builder getWidgetsBundlesListRequestBuilder(@javax.annotatio } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return List<WidgetsBundle> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2() throws ApiException { - return getWidgetsBundlesV2(null); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + handleMailOAuth2Callback(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return List<WidgetsBundle> * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2(Map headers) throws ApiException { - ApiResponse> localVarResponse = getWidgetsBundlesV2WithHttpInfo(headers); - return localVarResponse.getData(); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + handleMailOAuth2CallbackWithHttpInfo(code, state, headers); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return ApiResponse<List<WidgetsBundle>> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo() throws ApiException { - return getWidgetsBundlesV2WithHttpInfo(null); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + return handleMailOAuth2CallbackWithHttpInfo(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetsBundle>> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getWidgetsBundlesV2RequestBuilder(headers); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleMailOAuth2CallbackRequestBuilder(code, state, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49349,27 +48848,16 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -49385,13 +48873,38 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { + private HttpRequest.Builder handleMailOAuth2CallbackRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException(400, "Missing the required parameter 'code' when calling handleMailOAuth2Callback"); + } + // verify the required parameter 'state' is set + if (state == null) { + throw new ApiException(400, "Missing the required parameter 'state' when calling handleMailOAuth2Callback"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/widgetsBundles/all"; + String localVarPath = "/api/admin/mail/oauth2/code"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "code"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); + localVarQueryParameterBaseName = "state"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Accept", "application/json"); @@ -49408,54 +48921,54 @@ private HttpRequest.Builder getWidgetsBundlesV2RequestBuilder(Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49466,7 +48979,7 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49502,19 +49015,19 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/oneway/{deviceId}" + String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -49535,54 +49048,54 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1(deviceId, body, null); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49593,7 +49106,7 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49629,19 +49142,19 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" + String localVarPath = "/api/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -49662,7 +49175,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49670,12 +49183,12 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest(entityType, entityId, body, null); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntity(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49684,13 +49197,13 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, headers); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, headers); return localVarResponse.getData(); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49698,12 +49211,12 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49712,8 +49225,8 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestRequestBuilder(entityType, entityId, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityRequestBuilder(entityType, entityId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49724,7 +49237,7 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49760,18 +49273,18 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation } } - private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -49798,62 +49311,66 @@ private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotat } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1(entityType, entityId, timeout, body, null); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest1RequestBuilder(entityType, entityId, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(entityType, entityId, queueName, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49864,7 +49381,7 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest1", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithQueueAndTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49900,29 +49417,34 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); + } + // verify the required parameter 'queueName' is set + if (queueName == null) { + throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) + .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -49943,66 +49465,62 @@ private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annota } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body, null); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest2RequestBuilder(entityType, entityId, queueName, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(entityType, entityId, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50013,7 +49531,7 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest2", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50049,34 +49567,29 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest2"); - } - // verify the required parameter 'queueName' is set - if (queueName == null) { - throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) - .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -50097,50 +49610,50 @@ private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annota } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3(body, null); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUser(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest3WithHttpInfo(body, headers); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForUserWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3WithHttpInfo(body, null); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUserWithHttpInfo(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest3RequestBuilder(body, headers); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForUserRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50151,7 +49664,7 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest3", localVarResponse); + throw getApiException("handleRuleEngineRequestForUser", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50187,10 +49700,10 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForUserRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest3"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -50215,54 +49728,54 @@ private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annota } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50273,7 +49786,7 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50309,19 +49822,19 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/twoway/{deviceId}" + String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -50342,54 +49855,54 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50400,7 +49913,7 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50436,19 +49949,19 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" + String localVarPath = "/api/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -53740,7 +53253,7 @@ private HttpRequest.Builder provisionDeviceRequestBuilder(@javax.annotation.Nonn } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @throws ApiException if fails to make API call @@ -53750,7 +53263,7 @@ public void putGeneralUserSettings(@javax.annotation.Nullable Object body) throw } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @param headers Optional headers to include in the request @@ -53761,7 +53274,7 @@ public void putGeneralUserSettings(@javax.annotation.Nullable Object body, Map putGeneralUserSettingsWithHttpInfo(@javax.annotation.Nu } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @param headers Optional headers to include in the request @@ -53849,7 +53362,7 @@ private HttpRequest.Builder putGeneralUserSettingsRequestBuilder(@javax.annotati } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -53860,7 +53373,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -53872,7 +53385,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -53884,7 +53397,7 @@ public ApiResponse putUserSettingsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -56400,6 +55913,129 @@ private HttpRequest.Builder saveCalculatedFieldRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + ApiResponse localVarResponse = saveClaimingInfoWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfoWithHttpInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveClaimingInfoRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveClaimingInfo", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveClaimingInfoRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling saveClaimingInfo"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/claim" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients @@ -57226,129 +56862,6 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody) throws ApiException { - return saveDeviceWithCredentials(requestBody, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param headers Optional headers to include in the request - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(requestBody, headers); - return localVarResponse.getData(); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws ApiException { - return saveDeviceWithCredentialsWithHttpInfo(requestBody, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(requestBody, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { - // verify the required parameter 'requestBody' is set - if (requestBody == null) { - throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveDeviceWithCredentials"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/lwm2m/device-credentials"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Create Device (saveDevice) with credentials * 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)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -57359,8 +56872,8 @@ private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annot * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -57374,8 +56887,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); return localVarResponse.getData(); } @@ -57389,8 +56902,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -57404,8 +56917,8 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentials1RequestBuilder(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -57416,7 +56929,7 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials1", localVarResponse); + throw getApiException("saveDeviceWithCredentials", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -57452,10 +56965,10 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat } } - private HttpRequest.Builder saveDeviceWithCredentials1RequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { // verify the required parameter 'saveDeviceWithCredentialsRequest' is set if (saveDeviceWithCredentialsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials1"); + throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -58757,6 +58270,129 @@ private HttpRequest.Builder saveJwtSettingsRequestBuilder(@javax.annotation.Nonn return localVarRequestBuilder; } + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody) throws ApiException { + return saveLwm2mDeviceWithCredentials(requestBody, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @param headers Optional headers to include in the request + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { + ApiResponse localVarResponse = saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, headers); + return localVarResponse.getData(); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws ApiException { + return saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveLwm2mDeviceWithCredentialsRequestBuilder(requestBody, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveLwm2mDeviceWithCredentials", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveLwm2mDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveLwm2mDeviceWithCredentials"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/lwm2m/device-credentials"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Save Or update Mobile app (saveMobileApp) * Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error. The pair of mobile app package name and platform type is unique for entire platform setup. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -60465,10 +60101,11 @@ private HttpRequest.Builder saveQueueRequestBuilder(@javax.annotation.Nonnull St * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - saveRelation(entityRelation, null); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + return saveRelation(entityRelation, null); } /** @@ -60476,20 +60113,22 @@ public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - saveRelationWithHttpInfo(entityRelation, headers); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + ApiResponse localVarResponse = saveRelationWithHttpInfo(entityRelation, headers); + return localVarResponse.getData(); } /** * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { return saveRelationWithHttpInfo(entityRelation, null); } @@ -60498,10 +60137,10 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = saveRelationRequestBuilder(entityRelation, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -60516,118 +60155,6 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti throw getApiException("saveRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - // verify the required parameter 'entityRelation' is set - if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelation); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRelationV2WithHttpInfo(entityRelation, headers); - return localVarResponse.getData(); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2WithHttpInfo(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRelationV2RequestBuilder(entityRelation, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -60661,10 +60188,10 @@ public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder saveRelationV2RequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { // verify the required parameter 'entityRelation' is set if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelationV2"); + throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -61070,129 +60597,6 @@ private HttpRequest.Builder saveRuleChainRequestBuilder(@javax.annotation.Nonnul return localVarRequestBuilder; } - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, headers); - return localVarResponse.getData(); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRuleChain1RequestBuilder(defaultRuleChainCreateRequest, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRuleChain1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRuleChain1RequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - // verify the required parameter 'defaultRuleChainCreateRequest' is set - if (defaultRuleChainCreateRequest == null) { - throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling saveRuleChain1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/ruleChain/device/default"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Update Rule Chain Metadata * Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. @@ -63515,6 +62919,129 @@ private HttpRequest.Builder setDefaultTenantProfileRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @return RuleChain + * @throws ApiException if fails to make API call + */ + public RuleChain setDeviceDefaultRuleChain(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { + return setDeviceDefaultRuleChain(defaultRuleChainCreateRequest, null); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @param headers Optional headers to include in the request + * @return RuleChain + * @throws ApiException if fails to make API call + */ + public RuleChain setDeviceDefaultRuleChain(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = setDeviceDefaultRuleChainWithHttpInfo(defaultRuleChainCreateRequest, headers); + return localVarResponse.getData(); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @return ApiResponse<RuleChain> + * @throws ApiException if fails to make API call + */ + public ApiResponse setDeviceDefaultRuleChainWithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { + return setDeviceDefaultRuleChainWithHttpInfo(defaultRuleChainCreateRequest, null); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<RuleChain> + * @throws ApiException if fails to make API call + */ + public ApiResponse setDeviceDefaultRuleChainWithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = setDeviceDefaultRuleChainRequestBuilder(defaultRuleChainCreateRequest, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("setDeviceDefaultRuleChain", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder setDeviceDefaultRuleChainRequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + // verify the required parameter 'defaultRuleChainCreateRequest' is set + if (defaultRuleChainCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling setDeviceDefaultRuleChain"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/ruleChain/device/default"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Set root rule chain for provided edge (setEdgeRootRuleChain) * Change root rule chain of the edge to the new provided rule chain. This operation will send a notification to update root rule chain on remote edge service. Available for users with 'TENANT_ADMIN' authority. @@ -64612,54 +64139,50 @@ private HttpRequest.Builder syncEdgeRequestBuilder(@javax.annotation.Nonnull Str } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScript(body, scriptLang, null); + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScript(body, null); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - ApiResponse localVarResponse = testScriptWithHttpInfo(body, scriptLang, headers); + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + ApiResponse localVarResponse = testCalculatedFieldScriptWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScriptWithHttpInfo(body, scriptLang, null); + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScriptWithHttpInfo(body, null); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScriptRequestBuilder(body, scriptLang, headers); + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testCalculatedFieldScriptRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -64670,7 +64193,7 @@ public ApiResponse testScriptWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript", localVarResponse); + throw getApiException("testCalculatedFieldScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -64706,32 +64229,17 @@ public ApiResponse testScriptWithHttpIn } } - private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + private HttpRequest.Builder testCalculatedFieldScriptRequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testCalculatedFieldScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/ruleChain/testScript"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "scriptLang"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + String localVarPath = "/api/calculatedField/testScript"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); @@ -64754,50 +64262,54 @@ private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1(body, null); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScript(body, scriptLang, null); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - ApiResponse localVarResponse = testScript1WithHttpInfo(body, headers); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + ApiResponse localVarResponse = testRuleChainScriptWithHttpInfo(body, scriptLang, headers); return localVarResponse.getData(); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1WithHttpInfo(body, null); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScriptWithHttpInfo(body, scriptLang, null); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScript1RequestBuilder(body, headers); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testRuleChainScriptRequestBuilder(body, scriptLang, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -64808,7 +64320,7 @@ public ApiResponse testScript1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript1", localVarResponse); + throw getApiException("testRuleChainScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -64844,17 +64356,32 @@ public ApiResponse testScript1WithHttpI } } - private HttpRequest.Builder testScript1RequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + private HttpRequest.Builder testRuleChainScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testRuleChainScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/calculatedField/testScript"; + String localVarPath = "/api/ruleChain/testScript"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "scriptLang"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); @@ -66838,6 +66365,124 @@ private HttpRequest.Builder updateDeviceCredentialsRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @throws ApiException if fails to make API call + */ + public void updateDomainOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateDomainOauth2Clients(id, UUID, null); + } + + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void updateDomainOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateDomainOauth2ClientsWithHttpInfo(id, UUID, headers); + } + + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateDomainOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateDomainOauth2ClientsWithHttpInfo(id, UUID, null); + } + + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateDomainOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateDomainOauth2ClientsRequestBuilder(id, UUID, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateDomainOauth2Clients", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateDomainOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateDomainOauth2Clients"); + } + // verify the required parameter 'UUID' is set + if (UUID == null) { + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateDomainOauth2Clients"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/domain/{id}/oauth2Clients" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(UUID); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * updateImage * @@ -67285,42 +66930,42 @@ private HttpRequest.Builder updateImagePublicStatusRequestBuilder(@javax.annotat } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients(id, UUID, null); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateMobileAppBundleOauth2Clients(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2ClientsWithHttpInfo(id, UUID, headers); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, headers); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2ClientsWithHttpInfo(id, UUID, null); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) @@ -67328,8 +66973,8 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2ClientsRequestBuilder(id, UUID, headers); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateMobileAppBundleOauth2ClientsRequestBuilder(id, UUID, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -67340,7 +66985,7 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients", localVarResponse); + throw getApiException("updateMobileAppBundleOauth2Clients", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -67365,14 +67010,14 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + private HttpRequest.Builder updateMobileAppBundleOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateMobileAppBundleOauth2Clients"); } // verify the required parameter 'UUID' is set if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateMobileAppBundleOauth2Clients"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -67402,124 +67047,6 @@ private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation. return localVarRequestBuilder; } - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @throws ApiException if fails to make API call - */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients1(id, UUID, null); - } - - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2Clients1WithHttpInfo(id, UUID, headers); - } - - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2Clients1WithHttpInfo(id, UUID, null); - } - - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2Clients1RequestBuilder(id, UUID, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder updateOauth2Clients1RequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients1"); - } - // verify the required parameter 'UUID' is set - if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/domain/{id}/oauth2Clients" - .replace("{id}", ApiClient.urlEncode(id.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(UUID); - localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * updateResourceData * diff --git a/ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java b/ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java new file mode 100644 index 00000000..0a9d6d84 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AiModelExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AiModelExportData extends EntityExportData { + public AiModelExportData() { + } + + @Override + public AiModelExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AiModelExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AiModelExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AiModelExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AiModelExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AiModelExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiModelExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelExportData", AiModelExportData.class); + JSON.registerDiscriminator(AiModelExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java new file mode 100644 index 00000000..62a6084e --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmAssignmentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmAssignmentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmAssignmentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmAssignmentRecipientsConfig() { + } + + public AlarmAssignmentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmAssignmentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmAssignmentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmAssignmentRecipientsConfig alarmAssignmentRecipientsConfig = (AlarmAssignmentRecipientsConfig) o; + return Objects.equals(this.targets, alarmAssignmentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmAssignmentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmAssignmentRecipientsConfig", AlarmAssignmentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmAssignmentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java new file mode 100644 index 00000000..910e38e3 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmCommentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmCommentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmCommentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmCommentRecipientsConfig() { + } + + public AlarmCommentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmCommentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmCommentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmCommentRecipientsConfig alarmCommentRecipientsConfig = (AlarmCommentRecipientsConfig) o; + return Objects.equals(this.targets, alarmCommentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmCommentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmCommentRecipientsConfig", AlarmCommentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmCommentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java new file mode 100644 index 00000000..09389b53 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageLimitRecipientsConfig + */ +@JsonPropertyOrder({ + ApiUsageLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ApiUsageLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ApiUsageLimitRecipientsConfig() { + } + + public ApiUsageLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ApiUsageLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ApiUsageLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiUsageLimitRecipientsConfig apiUsageLimitRecipientsConfig = (ApiUsageLimitRecipientsConfig) o; + return Objects.equals(this.targets, apiUsageLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageLimitRecipientsConfig", ApiUsageLimitRecipientsConfig.class); + JSON.registerDiscriminator(ApiUsageLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetExportData.java b/ce/src/main/java/org/thingsboard/client/model/AssetExportData.java new file mode 100644 index 00000000..b2464a0f --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AssetExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetExportData extends EntityExportData { + public AssetExportData() { + } + + @Override + public AssetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetExportData", AssetExportData.class); + JSON.registerDiscriminator(AssetExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java b/ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java new file mode 100644 index 00000000..94e83fb2 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetProfileExportData extends EntityExportData { + public AssetProfileExportData() { + } + + @Override + public AssetProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileExportData", AssetProfileExportData.class); + JSON.registerDiscriminator(AssetProfileExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java index d2703af9..989314e3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java +++ b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultAsset { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultAsset { public BulkImportResultAsset() { } - public BulkImportResultAsset created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultAsset created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultAsset created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultAsset updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultAsset errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultAsset bulkImportResultAsset = (BulkImportResultAsset) o; - return equalsNullable(this.created, bulkImportResultAsset.created) && - equalsNullable(this.updated, bulkImportResultAsset.updated) && - equalsNullable(this.errors, bulkImportResultAsset.errors) && + return Objects.equals(this.created, bulkImportResultAsset.created) && + Objects.equals(this.updated, bulkImportResultAsset.updated) && + Objects.equals(this.errors, bulkImportResultAsset.errors) && Objects.equals(this.errorsList, bulkImportResultAsset.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java index dfd9c000..04a16777 100644 --- a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java +++ b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultDevice { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultDevice { public BulkImportResultDevice() { } - public BulkImportResultDevice created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultDevice created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultDevice created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultDevice updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultDevice errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultDevice bulkImportResultDevice = (BulkImportResultDevice) o; - return equalsNullable(this.created, bulkImportResultDevice.created) && - equalsNullable(this.updated, bulkImportResultDevice.updated) && - equalsNullable(this.errors, bulkImportResultDevice.errors) && + return Objects.equals(this.created, bulkImportResultDevice.created) && + Objects.equals(this.updated, bulkImportResultDevice.updated) && + Objects.equals(this.errors, bulkImportResultDevice.errors) && Objects.equals(this.errorsList, bulkImportResultDevice.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java index db2ffa8f..15572565 100644 --- a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java +++ b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultEdge { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultEdge { public BulkImportResultEdge() { } - public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultEdge created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultEdge updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultEdge errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultEdge bulkImportResultEdge = (BulkImportResultEdge) o; - return equalsNullable(this.created, bulkImportResultEdge.created) && - equalsNullable(this.updated, bulkImportResultEdge.updated) && - equalsNullable(this.errors, bulkImportResultEdge.errors) && + return Objects.equals(this.created, bulkImportResultEdge.created) && + Objects.equals(this.updated, bulkImportResultEdge.updated) && + Objects.equals(this.errors, bulkImportResultEdge.errors) && Objects.equals(this.errorsList, bulkImportResultEdge.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java b/ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java new file mode 100644 index 00000000..af5c6235 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * CustomerExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class CustomerExportData extends EntityExportData { + public CustomerExportData() { + } + + @Override + public CustomerExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public CustomerExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public CustomerExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public CustomerExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public CustomerExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this CustomerExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerExportData", CustomerExportData.class); + JSON.registerDiscriminator(CustomerExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java b/ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java new file mode 100644 index 00000000..236285a8 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DashboardExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DashboardExportData extends EntityExportData { + public DashboardExportData() { + } + + @Override + public DashboardExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DashboardExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DashboardExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DashboardExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DashboardExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DashboardExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DashboardExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardExportData", DashboardExportData.class); + JSON.registerDiscriminator(DashboardExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java index e786f73b..7678be98 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java @@ -172,6 +172,12 @@ public void setNotifyOn(@javax.annotation.Nonnull Set notifyOn) { } + @Override + public DeviceActivityNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this DeviceActivityNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java new file mode 100644 index 00000000..937ead2e --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceActivityRecipientsConfig + */ +@JsonPropertyOrder({ + DeviceActivityRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class DeviceActivityRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public DeviceActivityRecipientsConfig() { + } + + public DeviceActivityRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public DeviceActivityRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this DeviceActivityRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceActivityRecipientsConfig deviceActivityRecipientsConfig = (DeviceActivityRecipientsConfig) o; + return Objects.equals(this.targets, deviceActivityRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceActivityRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceActivityRecipientsConfig", DeviceActivityRecipientsConfig.class); + JSON.registerDiscriminator(DeviceActivityRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java new file mode 100644 index 00000000..8d7146a3 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DeviceProfileExportData extends EntityExportData { + public DeviceProfileExportData() { + } + + @Override + public DeviceProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DeviceProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DeviceProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DeviceProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DeviceProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DeviceProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileExportData", DeviceProfileExportData.class); + JSON.registerDiscriminator(DeviceProfileExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java index ac43f101..77fcc393 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setEdges(@javax.annotation.Nullable Set edges) { } + @Override + public EdgeCommunicationFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeCommunicationFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java similarity index 70% rename from paas/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java rename to ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java index c3c292af..c598e977 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java @@ -41,11 +41,10 @@ import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * Default notification rule recipients configuration + * EdgeCommunicationFailureRecipientsConfig */ @JsonPropertyOrder({ - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TRIGGER_TYPE, - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TARGETS + EdgeCommunicationFailureRecipientsConfig.JSON_PROPERTY_TARGETS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -54,48 +53,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) -public class DefaultNotificationRuleRecipientsConfig extends NotificationRuleRecipientsConfig { - public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull - private NotificationRuleTriggerType triggerType = NotificationRuleTriggerType.ENTITY_ACTION; - +public class EdgeCommunicationFailureRecipientsConfig extends NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TARGETS = "targets"; @javax.annotation.Nonnull private List targets = new ArrayList<>(); - public DefaultNotificationRuleRecipientsConfig() { - } - - public DefaultNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get triggerType - * @return triggerType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotificationRuleTriggerType getTriggerType() { - return triggerType; - } - - - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; + public EdgeCommunicationFailureRecipientsConfig() { } - - public DefaultNotificationRuleRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + public EdgeCommunicationFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { this.targets = targets; return this; } - public DefaultNotificationRuleRecipientsConfig addTargetsItem(UUID targetsItem) { + public EdgeCommunicationFailureRecipientsConfig addTargetsItem(UUID targetsItem) { if (this.targets == null) { this.targets = new ArrayList<>(); } @@ -122,8 +93,14 @@ public void setTargets(@javax.annotation.Nonnull List targets) { } + @Override + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** - * Return true if this DefaultNotificationRuleRecipientsConfig object is equal to o. + * Return true if this EdgeCommunicationFailureRecipientsConfig object is equal to o. */ @Override public boolean equals(Object o) { @@ -133,23 +110,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DefaultNotificationRuleRecipientsConfig defaultNotificationRuleRecipientsConfig = (DefaultNotificationRuleRecipientsConfig) o; - return Objects.equals(this.triggerType, defaultNotificationRuleRecipientsConfig.triggerType) && - Objects.equals(this.targets, defaultNotificationRuleRecipientsConfig.targets) && + EdgeCommunicationFailureRecipientsConfig edgeCommunicationFailureRecipientsConfig = (EdgeCommunicationFailureRecipientsConfig) o; + return Objects.equals(this.targets, edgeCommunicationFailureRecipientsConfig.targets) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(triggerType, targets, super.hashCode()); + return Objects.hash(targets, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DefaultNotificationRuleRecipientsConfig {\n"); + sb.append("class EdgeCommunicationFailureRecipientsConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" triggerType: ").append(toIndentedString(triggerType)).append("\n"); sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,8 +194,8 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("DefaultNotificationRuleRecipientsConfig", DefaultNotificationRuleRecipientsConfig.class); - JSON.registerDiscriminator(DefaultNotificationRuleRecipientsConfig.class, "triggerType", mappings); + mappings.put("EdgeCommunicationFailureRecipientsConfig", EdgeCommunicationFailureRecipientsConfig.class); + JSON.registerDiscriminator(EdgeCommunicationFailureRecipientsConfig.class, "triggerType", mappings); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java index bca83fc2..ddb2335e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java @@ -134,6 +134,12 @@ public void setNotifyOn(@javax.annotation.Nullable Set no } + @Override + public EdgeConnectionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeConnectionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java new file mode 100644 index 00000000..e8a8443d --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EdgeConnectionRecipientsConfig + */ +@JsonPropertyOrder({ + EdgeConnectionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EdgeConnectionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EdgeConnectionRecipientsConfig() { + } + + public EdgeConnectionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EdgeConnectionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EdgeConnectionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EdgeConnectionRecipientsConfig edgeConnectionRecipientsConfig = (EdgeConnectionRecipientsConfig) o; + return Objects.equals(this.targets, edgeConnectionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EdgeConnectionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeConnectionRecipientsConfig", EdgeConnectionRecipientsConfig.class); + JSON.registerDiscriminator(EdgeConnectionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java index e7fd1178..0c43a420 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java @@ -125,6 +125,12 @@ public void setThreshold(@javax.annotation.Nullable Float threshold) { } + @Override + public EntitiesLimitNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntitiesLimitNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java new file mode 100644 index 00000000..0008b4fc --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntitiesLimitRecipientsConfig + */ +@JsonPropertyOrder({ + EntitiesLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntitiesLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntitiesLimitRecipientsConfig() { + } + + public EntitiesLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntitiesLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntitiesLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntitiesLimitRecipientsConfig entitiesLimitRecipientsConfig = (EntitiesLimitRecipientsConfig) o; + return Objects.equals(this.targets, entitiesLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntitiesLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntitiesLimitRecipientsConfig", EntitiesLimitRecipientsConfig.class); + JSON.registerDiscriminator(EntitiesLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java index 033afe05..1b5d49b5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java @@ -182,6 +182,12 @@ public void setDeleted(@javax.annotation.Nullable Boolean deleted) { } + @Override + public EntityActionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntityActionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java new file mode 100644 index 00000000..80c67578 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityActionRecipientsConfig + */ +@JsonPropertyOrder({ + EntityActionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntityActionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntityActionRecipientsConfig() { + } + + public EntityActionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntityActionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntityActionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityActionRecipientsConfig entityActionRecipientsConfig = (EntityActionRecipientsConfig) o; + return Objects.equals(this.targets, entityActionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityActionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityActionRecipientsConfig", EntityActionRecipientsConfig.class); + JSON.registerDiscriminator(EntityActionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java b/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java index 4217352d..ac37f160 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java @@ -61,9 +61,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) @JsonSubTypes({ + @JsonSubTypes.Type(value = AiModelExportData.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AssetExportData.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileExportData.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = CustomerExportData.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardExportData.class, name = "DASHBOARD"), @JsonSubTypes.Type(value = DeviceExportData.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileExportData.class, name = "DEVICE_PROFILE"), + @JsonSubTypes.Type(value = EntityViewExportData.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = NotificationRuleExportData.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetExportData.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateExportData.class, name = "NOTIFICATION_TEMPLATE"), @JsonSubTypes.Type(value = OtaPackageExportData.class, name = "OTA_PACKAGE"), @JsonSubTypes.Type(value = RuleChainExportData.class, name = "RULE_CHAIN"), + @JsonSubTypes.Type(value = TbResourceExportData.class, name = "TB_RESOURCE"), @JsonSubTypes.Type(value = WidgetsBundleExportData.class, name = "WIDGETS_BUNDLE"), @JsonSubTypes.Type(value = WidgetTypeExportData.class, name = "WIDGET_TYPE"), }) @@ -360,9 +371,20 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); + mappings.put("AI_MODEL", AiModelExportData.class); + mappings.put("ASSET", AssetExportData.class); + mappings.put("ASSET_PROFILE", AssetProfileExportData.class); + mappings.put("CUSTOMER", CustomerExportData.class); + mappings.put("DASHBOARD", DashboardExportData.class); mappings.put("DEVICE", DeviceExportData.class); + mappings.put("DEVICE_PROFILE", DeviceProfileExportData.class); + mappings.put("ENTITY_VIEW", EntityViewExportData.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleExportData.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetExportData.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateExportData.class); mappings.put("OTA_PACKAGE", OtaPackageExportData.class); mappings.put("RULE_CHAIN", RuleChainExportData.class); + mappings.put("TB_RESOURCE", TbResourceExportData.class); mappings.put("WIDGETS_BUNDLE", WidgetsBundleExportData.class); mappings.put("WIDGET_TYPE", WidgetTypeExportData.class); mappings.put("EntityExportData", EntityExportData.class); diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java b/ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java new file mode 100644 index 00000000..caf77159 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityViewExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class EntityViewExportData extends EntityExportData { + public EntityViewExportData() { + } + + @Override + public EntityViewExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public EntityViewExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public EntityViewExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public EntityViewExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public EntityViewExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this EntityViewExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityViewExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewExportData", EntityViewExportData.class); + JSON.registerDiscriminator(EntityViewExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java index efdd05d3..6867a75b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java @@ -94,6 +94,12 @@ public void setEscalationTable(@javax.annotation.Nonnull Map> } + @Override + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EscalatedNotificationRuleRecipientsConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index 40c38765..da660036 100644 --- a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -35,14 +35,22 @@ * FeaturesInfo */ @JsonPropertyOrder({ + FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, + FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED, - FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED, - FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, - FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED + FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class FeaturesInfo { + public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; + @javax.annotation.Nullable + private Boolean smsEnabled; + + public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled"; + @javax.annotation.Nullable + private Boolean oauthEnabled; + public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; @javax.annotation.Nullable private Boolean notificationEnabled; @@ -55,17 +63,57 @@ public class FeaturesInfo { @javax.annotation.Nullable private Boolean emailEnabled; - public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; + public FeaturesInfo() { + } + + public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { + this.smsEnabled = smsEnabled; + return this; + } + + /** + * Get smsEnabled + * @return smsEnabled + */ @javax.annotation.Nullable - private Boolean smsEnabled; + @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSmsEnabled() { + return smsEnabled; + } - public static final String JSON_PROPERTY_OAUTH_ENABLED = "oauthEnabled"; + + @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { + this.smsEnabled = smsEnabled; + } + + + public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { + this.oauthEnabled = oauthEnabled; + return this; + } + + /** + * Get oauthEnabled + * @return oauthEnabled + */ @javax.annotation.Nullable - private Boolean oauthEnabled; + @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOauthEnabled() { + return oauthEnabled; + } - public FeaturesInfo() { + + @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { + this.oauthEnabled = oauthEnabled; } + public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { this.notificationEnabled = notificationEnabled; return this; @@ -138,54 +186,6 @@ public void setEmailEnabled(@javax.annotation.Nullable Boolean emailEnabled) { } - public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { - this.smsEnabled = smsEnabled; - return this; - } - - /** - * Get smsEnabled - * @return smsEnabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSmsEnabled() { - return smsEnabled; - } - - - @JsonProperty(value = JSON_PROPERTY_SMS_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { - this.smsEnabled = smsEnabled; - } - - - public FeaturesInfo oauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { - this.oauthEnabled = oauthEnabled; - return this; - } - - /** - * Get oauthEnabled - * @return oauthEnabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getOauthEnabled() { - return oauthEnabled; - } - - - @JsonProperty(value = JSON_PROPERTY_OAUTH_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { - this.oauthEnabled = oauthEnabled; - } - - /** * Return true if this FeaturesInfo object is equal to o. */ @@ -198,27 +198,27 @@ public boolean equals(Object o) { return false; } FeaturesInfo featuresInfo = (FeaturesInfo) o; - return Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && + return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && + Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && - Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) && - Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && - Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled); + Objects.equals(this.emailEnabled, featuresInfo.emailEnabled); } @Override public int hashCode() { - return Objects.hash(notificationEnabled, twoFaEnabled, emailEnabled, smsEnabled, oauthEnabled); + return Objects.hash(smsEnabled, oauthEnabled, notificationEnabled, twoFaEnabled, emailEnabled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FeaturesInfo {\n"); + sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); + sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n"); sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); - sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); - sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -266,6 +266,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `smsEnabled` to the URL query string + if (getSmsEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%ssmsEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSmsEnabled())))); + } + + // add `oauthEnabled` to the URL query string + if (getOauthEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); + } + // add `notificationEnabled` to the URL query string if (getNotificationEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); @@ -281,16 +291,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%semailEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmailEnabled())))); } - // add `smsEnabled` to the URL query string - if (getSmsEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%ssmsEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSmsEnabled())))); - } - - // add `oauthEnabled` to the URL query string - if (getOauthEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); - } - return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java index 910f35c6..ebb08c63 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class NewPlatformVersionNotificationRuleTriggerConfig extends Notificatio public NewPlatformVersionNotificationRuleTriggerConfig() { } + @Override + public NewPlatformVersionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this NewPlatformVersionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java new file mode 100644 index 00000000..97cc594a --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NewPlatformVersionRecipientsConfig + */ +@JsonPropertyOrder({ + NewPlatformVersionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class NewPlatformVersionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public NewPlatformVersionRecipientsConfig() { + } + + public NewPlatformVersionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public NewPlatformVersionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this NewPlatformVersionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewPlatformVersionRecipientsConfig newPlatformVersionRecipientsConfig = (NewPlatformVersionRecipientsConfig) o; + return Objects.equals(this.targets, newPlatformVersionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewPlatformVersionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NewPlatformVersionRecipientsConfig", NewPlatformVersionRecipientsConfig.class); + JSON.registerDiscriminator(NewPlatformVersionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java index 626f631e..554869c1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java @@ -29,10 +29,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -50,14 +46,15 @@ public class NotificationRequestStats { public static final String JSON_PROPERTY_SENT = "sent"; @javax.annotation.Nullable - private Map sent = new HashMap<>(); + private Map sent = new HashMap<>(); public static final String JSON_PROPERTY_ERRORS = "errors"; @javax.annotation.Nullable private Map> errors = new HashMap<>(); public static final String JSON_PROPERTY_TOTAL_ERRORS = "totalErrors"; - private JsonNullable totalErrors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer totalErrors; public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable @@ -66,12 +63,12 @@ public class NotificationRequestStats { public NotificationRequestStats() { } - public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { + public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { this.sent = sent; return this; } - public NotificationRequestStats putSentItem(String key, Object sentItem) { + public NotificationRequestStats putSentItem(String key, Integer sentItem) { if (this.sent == null) { this.sent = new HashMap<>(); } @@ -85,15 +82,15 @@ public NotificationRequestStats putSentItem(String key, Object sentItem) { */ @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getSent() { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSent() { return sent; } @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setSent(@javax.annotation.Nullable Map sent) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSent(@javax.annotation.Nullable Map sent) { this.sent = sent; } @@ -130,35 +127,27 @@ public void setErrors(@javax.annotation.Nullable Map } - public NotificationRequestStats totalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + public NotificationRequestStats totalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; return this; } /** - * Get totalErrors + * Total number of errors across all delivery methods * @return totalErrors */ @javax.annotation.Nullable - @JsonIgnore - public Object getTotalErrors() { - return totalErrors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getTotalErrors_JsonNullable() { + public Integer getTotalErrors() { return totalErrors; } - - @JsonProperty(JSON_PROPERTY_TOTAL_ERRORS) - public void setTotalErrors_JsonNullable(JsonNullable totalErrors) { - this.totalErrors = totalErrors; - } - public void setTotalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + + @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; } @@ -200,24 +189,13 @@ public boolean equals(Object o) { NotificationRequestStats notificationRequestStats = (NotificationRequestStats) o; return Objects.equals(this.sent, notificationRequestStats.sent) && Objects.equals(this.errors, notificationRequestStats.errors) && - equalsNullable(this.totalErrors, notificationRequestStats.totalErrors) && + Objects.equals(this.totalErrors, notificationRequestStats.totalErrors) && Objects.equals(this.error, notificationRequestStats.error); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(sent, errors, hashCodeNullable(totalErrors), error); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(sent, errors, totalErrors, error); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java new file mode 100644 index 00000000..15ccb3a8 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationRuleExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationRuleExportData extends EntityExportData { + public NotificationRuleExportData() { + } + + @Override + public NotificationRuleExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationRuleExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationRuleExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationRuleExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationRuleExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationRuleExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRuleExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleExportData", NotificationRuleExportData.class); + JSON.registerDiscriminator(NotificationRuleExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index 0caf12f1..39e2665d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -50,19 +50,19 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = EscalatedNotificationRuleRecipientsConfig.class, name = "ALARM"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_COMMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "API_USAGE_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "DEVICE_ACTIVITY"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_CONNECTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITIES_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITY_ACTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RATE_LIMITS"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), + @JsonSubTypes.Type(value = AlarmAssignmentRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), + @JsonSubTypes.Type(value = AlarmCommentRecipientsConfig.class, name = "ALARM_COMMENT"), + @JsonSubTypes.Type(value = ApiUsageLimitRecipientsConfig.class, name = "API_USAGE_LIMIT"), + @JsonSubTypes.Type(value = DeviceActivityRecipientsConfig.class, name = "DEVICE_ACTIVITY"), + @JsonSubTypes.Type(value = EdgeCommunicationFailureRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), + @JsonSubTypes.Type(value = EdgeConnectionRecipientsConfig.class, name = "EDGE_CONNECTION"), + @JsonSubTypes.Type(value = EntitiesLimitRecipientsConfig.class, name = "ENTITIES_LIMIT"), + @JsonSubTypes.Type(value = EntityActionRecipientsConfig.class, name = "ENTITY_ACTION"), + @JsonSubTypes.Type(value = NewPlatformVersionRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), + @JsonSubTypes.Type(value = RateLimitsRecipientsConfig.class, name = "RATE_LIMITS"), + @JsonSubTypes.Type(value = ResourceShortageRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), + @JsonSubTypes.Type(value = RuleEngineComponentLifecycleEventRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), + @JsonSubTypes.Type(value = TaskProcessingFailureRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), }) public class NotificationRuleRecipientsConfig { @@ -180,19 +180,19 @@ public String toUrlQueryString(String prefix) { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); mappings.put("ALARM", EscalatedNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_ASSIGNMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_COMMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("API_USAGE_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("DEVICE_ACTIVITY", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_COMMUNICATION_FAILURE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_CONNECTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITIES_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITY_ACTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("NEW_PLATFORM_VERSION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RATE_LIMITS", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RESOURCES_SHORTAGE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("TASK_PROCESSING_FAILURE", DefaultNotificationRuleRecipientsConfig.class); + mappings.put("ALARM_ASSIGNMENT", AlarmAssignmentRecipientsConfig.class); + mappings.put("ALARM_COMMENT", AlarmCommentRecipientsConfig.class); + mappings.put("API_USAGE_LIMIT", ApiUsageLimitRecipientsConfig.class); + mappings.put("DEVICE_ACTIVITY", DeviceActivityRecipientsConfig.class); + mappings.put("EDGE_COMMUNICATION_FAILURE", EdgeCommunicationFailureRecipientsConfig.class); + mappings.put("EDGE_CONNECTION", EdgeConnectionRecipientsConfig.class); + mappings.put("ENTITIES_LIMIT", EntitiesLimitRecipientsConfig.class); + mappings.put("ENTITY_ACTION", EntityActionRecipientsConfig.class); + mappings.put("NEW_PLATFORM_VERSION", NewPlatformVersionRecipientsConfig.class); + mappings.put("RATE_LIMITS", RateLimitsRecipientsConfig.class); + mappings.put("RESOURCES_SHORTAGE", ResourceShortageRecipientsConfig.class); + mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", RuleEngineComponentLifecycleEventRecipientsConfig.class); + mappings.put("TASK_PROCESSING_FAILURE", TaskProcessingFailureRecipientsConfig.class); mappings.put("NotificationRuleRecipientsConfig", NotificationRuleRecipientsConfig.class); JSON.registerDiscriminator(NotificationRuleRecipientsConfig.class, "triggerType", mappings); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java new file mode 100644 index 00000000..083f4934 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java @@ -0,0 +1,344 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * NotificationTargetExportData + */ +@JsonPropertyOrder({ + NotificationTargetExportData.JSON_PROPERTY_ENTITY_TYPE, + NotificationTargetExportData.JSON_PROPERTY_ENTITY, + NotificationTargetExportData.JSON_PROPERTY_RELATIONS, + NotificationTargetExportData.JSON_PROPERTY_ATTRIBUTES, + NotificationTargetExportData.JSON_PROPERTY_CALCULATED_FIELDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class NotificationTargetExportData { + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + @javax.annotation.Nonnull + private EntityType entityType; + + public static final String JSON_PROPERTY_ENTITY = "entity"; + @javax.annotation.Nullable + private ExportableEntity entity; + + public static final String JSON_PROPERTY_RELATIONS = "relations"; + @javax.annotation.Nullable + private List relations = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @javax.annotation.Nullable + private Map> attributes = new HashMap<>(); + + public static final String JSON_PROPERTY_CALCULATED_FIELDS = "calculatedFields"; + @javax.annotation.Nullable + private List calculatedFields = new ArrayList<>(); + + public NotificationTargetExportData() { + } + + public NotificationTargetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * @return entityType + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityType getEntityType() { + return entityType; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { + this.entityType = entityType; + } + + + public NotificationTargetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.entity = entity; + return this; + } + + /** + * Get entity + * @return entity + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExportableEntity getEntity() { + return entity; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntity(@javax.annotation.Nullable ExportableEntity entity) { + this.entity = entity; + } + + + public NotificationTargetExportData relations(@javax.annotation.Nullable List relations) { + this.relations = relations; + return this; + } + + public NotificationTargetExportData addRelationsItem(EntityRelation relationsItem) { + if (this.relations == null) { + this.relations = new ArrayList<>(); + } + this.relations.add(relationsItem); + return this; + } + + /** + * Get relations + * @return relations + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_RELATIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRelations() { + return relations; + } + + + @JsonProperty(value = JSON_PROPERTY_RELATIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelations(@javax.annotation.Nullable List relations) { + this.relations = relations; + } + + + public NotificationTargetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.attributes = attributes; + return this; + } + + public NotificationTargetExportData putAttributesItem(String key, List attributesItem) { + if (this.attributes == null) { + this.attributes = new HashMap<>(); + } + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Map of attributes where key is the scope of attributes and value is the list of attributes for that scope + * @return attributes + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getAttributes() { + return attributes; + } + + + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(@javax.annotation.Nullable Map> attributes) { + this.attributes = attributes; + } + + + public NotificationTargetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.calculatedFields = calculatedFields; + return this; + } + + public NotificationTargetExportData addCalculatedFieldsItem(CalculatedField calculatedFieldsItem) { + if (this.calculatedFields == null) { + this.calculatedFields = new ArrayList<>(); + } + this.calculatedFields.add(calculatedFieldsItem); + return this; + } + + /** + * Get calculatedFields + * @return calculatedFields + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CALCULATED_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCalculatedFields() { + return calculatedFields; + } + + + @JsonProperty(value = JSON_PROPERTY_CALCULATED_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCalculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.calculatedFields = calculatedFields; + } + + + /** + * Return true if this NotificationTargetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationTargetExportData notificationTargetExportData = (NotificationTargetExportData) o; + return Objects.equals(this.entityType, notificationTargetExportData.entityType) && + Objects.equals(this.entity, notificationTargetExportData.entity) && + Objects.equals(this.relations, notificationTargetExportData.relations) && + Objects.equals(this.attributes, notificationTargetExportData.attributes) && + Objects.equals(this.calculatedFields, notificationTargetExportData.calculatedFields); + } + + @Override + public int hashCode() { + return Objects.hash(entityType, entity, relations, attributes, calculatedFields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTargetExportData {\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); + sb.append(" relations: ").append(toIndentedString(relations)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" calculatedFields: ").append(toIndentedString(calculatedFields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java new file mode 100644 index 00000000..be691034 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationTemplateExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTemplateExportData extends EntityExportData { + public NotificationTemplateExportData() { + } + + @Override + public NotificationTemplateExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationTemplateExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationTemplateExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationTemplateExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationTemplateExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationTemplateExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTemplateExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateExportData", NotificationTemplateExportData.class); + JSON.registerDiscriminator(NotificationTemplateExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java index a5469145..e52858c5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setApis(@javax.annotation.Nullable Set apis) { } + @Override + public RateLimitsNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RateLimitsNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java new file mode 100644 index 00000000..ddd4e212 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RateLimitsRecipientsConfig + */ +@JsonPropertyOrder({ + RateLimitsRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RateLimitsRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RateLimitsRecipientsConfig() { + } + + public RateLimitsRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RateLimitsRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RateLimitsRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RateLimitsRecipientsConfig rateLimitsRecipientsConfig = (RateLimitsRecipientsConfig) o; + return Objects.equals(this.targets, rateLimitsRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RateLimitsRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RateLimitsRecipientsConfig", RateLimitsRecipientsConfig.class); + JSON.registerDiscriminator(RateLimitsRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java new file mode 100644 index 00000000..fec24a83 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ResourceShortageRecipientsConfig + */ +@JsonPropertyOrder({ + ResourceShortageRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ResourceShortageRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ResourceShortageRecipientsConfig() { + } + + public ResourceShortageRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ResourceShortageRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ResourceShortageRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceShortageRecipientsConfig resourceShortageRecipientsConfig = (ResourceShortageRecipientsConfig) o; + return Objects.equals(this.targets, resourceShortageRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceShortageRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ResourceShortageRecipientsConfig", ResourceShortageRecipientsConfig.class); + JSON.registerDiscriminator(ResourceShortageRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java index 0519c2bf..95d50463 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java @@ -143,6 +143,12 @@ public void setStorageThreshold(@javax.annotation.Nullable Float storageThreshol } + @Override + public ResourcesShortageNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this ResourcesShortageNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java index 3c22091f..c42a67e4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java @@ -259,6 +259,12 @@ public void setOnlyRuleNodeLifecycleFailures(@javax.annotation.Nullable Boolean } + @Override + public RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java new file mode 100644 index 00000000..ba2ded17 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RuleEngineComponentLifecycleEventRecipientsConfig + */ +@JsonPropertyOrder({ + RuleEngineComponentLifecycleEventRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RuleEngineComponentLifecycleEventRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RuleEngineComponentLifecycleEventRecipientsConfig() { + } + + public RuleEngineComponentLifecycleEventRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RuleEngineComponentLifecycleEventRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RuleEngineComponentLifecycleEventRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuleEngineComponentLifecycleEventRecipientsConfig ruleEngineComponentLifecycleEventRecipientsConfig = (RuleEngineComponentLifecycleEventRecipientsConfig) o; + return Objects.equals(this.targets, ruleEngineComponentLifecycleEventRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuleEngineComponentLifecycleEventRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleEngineComponentLifecycleEventRecipientsConfig", RuleEngineComponentLifecycleEventRecipientsConfig.class); + JSON.registerDiscriminator(RuleEngineComponentLifecycleEventRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java index 464e1cb0..ca2153f1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class TaskProcessingFailureNotificationRuleTriggerConfig extends Notifica public TaskProcessingFailureNotificationRuleTriggerConfig() { } + @Override + public TaskProcessingFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this TaskProcessingFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java new file mode 100644 index 00000000..b6f7856b --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TaskProcessingFailureRecipientsConfig + */ +@JsonPropertyOrder({ + TaskProcessingFailureRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class TaskProcessingFailureRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public TaskProcessingFailureRecipientsConfig() { + } + + public TaskProcessingFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public TaskProcessingFailureRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this TaskProcessingFailureRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaskProcessingFailureRecipientsConfig taskProcessingFailureRecipientsConfig = (TaskProcessingFailureRecipientsConfig) o; + return Objects.equals(this.targets, taskProcessingFailureRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaskProcessingFailureRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TaskProcessingFailureRecipientsConfig", TaskProcessingFailureRecipientsConfig.class); + JSON.registerDiscriminator(TaskProcessingFailureRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResource.java b/ce/src/main/java/org/thingsboard/client/model/TbResource.java index c7038ad5..55c80c42 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResource.java @@ -54,8 +54,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_LINK, - TbResource.JSON_PROPERTY_PUBLIC_LINK + TbResource.JSON_PROPERTY_PUBLIC_LINK, + TbResource.JSON_PROPERTY_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResource { @@ -119,14 +119,14 @@ public class TbResource { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_LINK = "link"; - @javax.annotation.Nullable - private String link; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; @javax.annotation.Nullable private String publicLink; + public static final String JSON_PROPERTY_LINK = "link"; + @javax.annotation.Nullable + private String link; + public TbResource() { } @@ -136,16 +136,16 @@ public TbResource( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_LINK) String link, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, + @JsonProperty(JSON_PROPERTY_LINK) String link ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.link = link; this.publicLink = publicLink; + this.link = link; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -469,28 +469,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } @@ -523,13 +523,13 @@ public boolean equals(Object o) { Objects.equals(this.preview, tbResource.preview) && Objects.equals(this.name, tbResource.name) && Objects.equals(this._public, tbResource._public) && - Objects.equals(this.link, tbResource.link) && - Objects.equals(this.publicLink, tbResource.publicLink); + Objects.equals(this.publicLink, tbResource.publicLink) && + Objects.equals(this.link, tbResource.link); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); } @Override @@ -551,8 +551,8 @@ public String toString() { sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } @@ -675,16 +675,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `link` to the URL query string - if (getLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); - } - // add `publicLink` to the URL query string if (getPublicLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); } + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java new file mode 100644 index 00000000..90e90f36 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TbResourceExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TbResourceExportData extends EntityExportData { + public TbResourceExportData() { + } + + @Override + public TbResourceExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public TbResourceExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public TbResourceExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public TbResourceExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public TbResourceExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this TbResourceExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TbResourceExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceExportData", TbResourceExportData.class); + JSON.registerDiscriminator(TbResourceExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index 2e666e3d..cd300caa 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -52,8 +52,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_LINK, - TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK + TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK, + TbResourceInfo.JSON_PROPERTY_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResourceInfo { @@ -109,14 +109,14 @@ public class TbResourceInfo { @javax.annotation.Nullable private Boolean _public; - public static final String JSON_PROPERTY_LINK = "link"; - @javax.annotation.Nullable - private String link; - public static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; @javax.annotation.Nullable private String publicLink; + public static final String JSON_PROPERTY_LINK = "link"; + @javax.annotation.Nullable + private String link; + public TbResourceInfo() { } @@ -126,16 +126,16 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_LINK) String link, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, + @JsonProperty(JSON_PROPERTY_LINK) String link ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.link = link; this.publicLink = publicLink; + this.link = link; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -411,28 +411,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * Get link - * @return link + * Get publicLink + * @return publicLink */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLink() { - return link; + public String getPublicLink() { + return publicLink; } /** - * Get publicLink - * @return publicLink + * Get link + * @return link */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_LINK, required = false) + @JsonProperty(value = JSON_PROPERTY_LINK, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPublicLink() { - return publicLink; + public String getLink() { + return link; } @@ -463,13 +463,13 @@ public boolean equals(Object o) { Objects.equals(this.descriptor, tbResourceInfo.descriptor) && Objects.equals(this.name, tbResourceInfo.name) && Objects.equals(this._public, tbResourceInfo._public) && - Objects.equals(this.link, tbResourceInfo.link) && - Objects.equals(this.publicLink, tbResourceInfo.publicLink); + Objects.equals(this.publicLink, tbResourceInfo.publicLink) && + Objects.equals(this.link, tbResourceInfo.link); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); } @Override @@ -489,8 +489,8 @@ public String toString() { sb.append(" descriptor: ").append(toIndentedString(descriptor)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append("}"); return sb.toString(); } @@ -603,16 +603,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `link` to the URL query string - if (getLink() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); - } - // add `publicLink` to the URL query string if (getPublicLink() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%spublicLink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublicLink())))); } + // add `link` to the URL query string + if (getLink() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slink%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLink())))); + } + return joiner.toString(); } } diff --git a/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java b/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java index 403c48ff..1f730709 100644 --- a/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java @@ -17,6 +17,13 @@ import org.junit.jupiter.api.Test; import org.thingsboard.client.ApiException; +import org.thingsboard.client.model.AlarmCalculatedFieldConfiguration; +import org.thingsboard.client.model.AlarmConditionValueAlarmRuleSchedule; +import org.thingsboard.client.model.AlarmRuleDefinition; +import org.thingsboard.client.model.AlarmRuleSchedule; +import org.thingsboard.client.model.AlarmRuleSimpleCondition; +import org.thingsboard.client.model.AlarmRuleSpecificTimeSchedule; +import org.thingsboard.client.model.AlarmSeverity; import org.thingsboard.client.model.Argument; import org.thingsboard.client.model.ArgumentType; import org.thingsboard.client.model.CalculatedField; @@ -27,14 +34,18 @@ import org.thingsboard.client.model.PageDataCalculatedField; import org.thingsboard.client.model.ReferencedEntityKey; import org.thingsboard.client.model.SimpleCalculatedFieldConfiguration; +import org.thingsboard.client.model.TbelAlarmConditionExpression; import org.thingsboard.client.model.TimeSeriesOutput; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; public class CalculatedFieldApiTest extends AbstractApiTest { @@ -126,14 +137,14 @@ void testCalculatedFieldLifecycle() throws ApiException { } // get calculated fields by entity id for device1 - PageDataCalculatedField device1Fields = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device1Fields = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice1.getId().getId().toString(), 100, 0, CalculatedFieldType.SIMPLE, null, null, null); assertNotNull(device1Fields); assertEquals(5, device1Fields.getData().size()); // get calculated fields by entity id for device2 - PageDataCalculatedField device2Fields = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device2Fields = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice2.getId().getId().toString(), 100, 0, CalculatedFieldType.SIMPLE, null, null, null); assertEquals(3, device2Fields.getData().size()); @@ -166,10 +177,122 @@ void testCalculatedFieldLifecycle() throws ApiException { client.getCalculatedFieldById(fieldToDeleteId.toString()) ); - PageDataCalculatedField device1FieldsAfterDelete = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device1FieldsAfterDelete = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice1.getId().getId().toString(), 100, 0, null, null, null, null); assertEquals(4, device1FieldsAfterDelete.getData().size()); } + @Test + void testAlarmCalculatedFieldLifecycle() throws ApiException { + long timestamp = System.currentTimeMillis(); + + // create a device to attach the alarm calculated field to + Device device = new Device(); + device.setName("AlarmCalcFieldDevice_" + timestamp); + device.setType("default"); + Device createdDevice = client.saveDevice(device, null, null, null, null, null); + + // build the alarm calculated field configuration + AlarmCalculatedFieldConfiguration config = new AlarmCalculatedFieldConfiguration(); + + // argument: temperature time-series + Argument tempArg = new Argument(); + ReferencedEntityKey refKey = new ReferencedEntityKey(); + refKey.setKey("temperature"); + refKey.setType(ArgumentType.TS_LATEST); + tempArg.setRefEntityKey(refKey); + config.putArgumentsItem("temp", tempArg); + + // create rule: HIGH_TEMPERATURE when temp > 50 (TBEL expression) + TbelAlarmConditionExpression createExpression = new TbelAlarmConditionExpression(); + createExpression.setExpression("return temp > 50;"); + AlarmRuleSimpleCondition createCondition = new AlarmRuleSimpleCondition(); + createCondition.setExpression(createExpression); + AlarmRuleSpecificTimeSchedule specificTimeSchedule = new AlarmRuleSpecificTimeSchedule().addDaysOfWeekItem(3); + AlarmConditionValueAlarmRuleSchedule schedule = new AlarmConditionValueAlarmRuleSchedule().staticValue(specificTimeSchedule); + createCondition.setSchedule(schedule); + AlarmRuleDefinition createRule = new AlarmRuleDefinition(); + createRule.setCondition(createCondition); + createRule.setAlarmDetails("Temperature is too high: ${temp}"); + config.setCreateRules(Map.of( + AlarmSeverity.CRITICAL.name(), createRule + )); + + // clear rule: when temp drops below 30 + TbelAlarmConditionExpression clearExpression = new TbelAlarmConditionExpression(); + clearExpression.setExpression("return temp < 30;"); + AlarmRuleSimpleCondition clearCondition = new AlarmRuleSimpleCondition(); + clearCondition.setExpression(clearExpression); + AlarmRuleDefinition clearRule = new AlarmRuleDefinition(); + clearRule.setCondition(clearCondition); + config.setClearRule(clearRule); + + config.setPropagate(true); + config.setPropagateToOwner(false); + + // create calculated field + CalculatedField cf = new CalculatedField(); + cf.setName(TEST_PREFIX + "AlarmCalcField_" + timestamp); + cf.setType(CalculatedFieldType.ALARM); + + EntityId entityId = new EntityId(); + entityId.setEntityType(EntityType.DEVICE); + entityId.setId(createdDevice.getId().getId()); + cf.setEntityId(entityId); + cf.setConfiguration(config); + + CalculatedField created = client.saveCalculatedField(cf); + assertNotNull(created); + assertNotNull(created.getId()); + assertEquals(cf.getName(), created.getName()); + assertEquals(CalculatedFieldType.ALARM, created.getType()); + AlarmCalculatedFieldConfiguration configuration = (AlarmCalculatedFieldConfiguration) created.getConfiguration(); + AlarmConditionValueAlarmRuleSchedule createdSchedule = configuration.getCreateRules().get(AlarmSeverity.CRITICAL.name()).getCondition().getSchedule(); + AlarmRuleSpecificTimeSchedule staticSchedule = (AlarmRuleSpecificTimeSchedule)createdSchedule.getStaticValue(); + assertEquals(Set.of(3), staticSchedule.getDaysOfWeek()); + + // get by id and verify configuration + CalculatedField fetched = client.getCalculatedFieldById(created.getId().getId().toString()); + assertNotNull(fetched); + assertEquals(created.getName(), fetched.getName()); + assertEquals(CalculatedFieldType.ALARM, fetched.getType()); + assertNotNull(fetched.getConfiguration()); + AlarmCalculatedFieldConfiguration fetchedConfig = + (AlarmCalculatedFieldConfiguration) fetched.getConfiguration(); + assertNotNull(fetchedConfig.getCreateRules()); + assertEquals(1, fetchedConfig.getCreateRules().size()); + assertTrue(fetchedConfig.getCreateRules().containsKey("CRITICAL")); + assertNotNull(fetchedConfig.getClearRule()); + assertEquals(Boolean.TRUE, fetchedConfig.getPropagate()); + + // update: add a second create rule for CRITICAL_TEMPERATURE + TbelAlarmConditionExpression criticalExpression = new TbelAlarmConditionExpression(); + criticalExpression.setExpression("return temp > 80;"); + AlarmRuleSimpleCondition criticalCondition = new AlarmRuleSimpleCondition(); + criticalCondition.setExpression(criticalExpression); + AlarmRuleDefinition criticalRule = new AlarmRuleDefinition(); + criticalRule.setCondition(criticalCondition); + fetchedConfig.putCreateRulesItem(AlarmSeverity.INDETERMINATE.name(), criticalRule); + fetched.setConfiguration(fetchedConfig); + + CalculatedField updated = client.saveCalculatedField(fetched); + AlarmCalculatedFieldConfiguration updatedConfig = + (AlarmCalculatedFieldConfiguration) updated.getConfiguration(); + assertEquals(2, updatedConfig.getCreateRules().size()); + assertTrue(updatedConfig.getCreateRules().containsKey("INDETERMINATE")); + + // filter by entity and ALARM type + PageDataCalculatedField deviceFields = client.getCalculatedFieldsByEntityId( + EntityType.DEVICE.toString(), createdDevice.getId().getId().toString(), + 100, 0, CalculatedFieldType.ALARM, null, null, null); + assertNotNull(deviceFields); + assertEquals(1, deviceFields.getData().size()); + + // delete and verify + UUID fieldId = created.getId().getId(); + client.deleteCalculatedField(fieldId.toString()); + assertReturns404(() -> client.getCalculatedFieldById(fieldId.toString())); + } + } diff --git a/ce/src/test/java/org/thingsboard/client/api/DashboardApiTest.java b/ce/src/test/java/org/thingsboard/client/api/DashboardApiTest.java index 47eba218..dd254383 100644 --- a/ce/src/test/java/org/thingsboard/client/api/DashboardApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/DashboardApiTest.java @@ -45,7 +45,7 @@ void testDashboardLifecycle() throws ApiException { } // find all, check count - PageDataDashboardInfo allDashboards = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo allDashboards = client.getTenantDashboards(100, 0, null, null, null, null); assertNotNull(allDashboards); assertNotNull(allDashboards.getData()); int initialSize = allDashboards.getData().size(); @@ -54,7 +54,7 @@ void testDashboardLifecycle() throws ApiException { List createdDashboards = allDashboards.getData(); // find all with search text, check count - PageDataDashboardInfo filteredDashboards = client.getTenantDashboards1(100, 0, null, TEST_PREFIX_2, null, null); + PageDataDashboardInfo filteredDashboards = client.getTenantDashboards(100, 0, null, TEST_PREFIX_2, null, null); assertEquals(10, filteredDashboards.getData().size(), "Expected exactly 10 dashboards matching prefix"); // find by id @@ -100,7 +100,7 @@ void testDashboardLifecycle() throws ApiException { client.deleteDashboard(dashboardToDeleteId.toString()); // verify deletion - PageDataDashboardInfo dashboardsAfterDelete = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo dashboardsAfterDelete = client.getTenantDashboards(100, 0, null, null, null, null); assertEquals(initialSize - 1, dashboardsAfterDelete.getData().size()); assertReturns404(() -> diff --git a/ce/src/test/java/org/thingsboard/client/api/DeviceApiTest.java b/ce/src/test/java/org/thingsboard/client/api/DeviceApiTest.java index 151bca77..db081a91 100644 --- a/ce/src/test/java/org/thingsboard/client/api/DeviceApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/DeviceApiTest.java @@ -82,7 +82,7 @@ void testDeviceLifecycle() throws Exception { request.setDevice(deviceWithCreds); request.setCredentials(creds); - Device savedDeviceWithCreds = client.saveDeviceWithCredentials1(request, null, null, null); + Device savedDeviceWithCreds = client.saveDeviceWithCredentials(request, null, null, null); assertEquals("device-with-creds", savedDeviceWithCreds.getName()); // find credentials by device id diff --git a/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java b/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java index c897ab70..fdd06b26 100644 --- a/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java @@ -82,20 +82,20 @@ void testEntityRelationLifecycle() throws ApiException { buildingToFloor.setTo(entityId(floor)); buildingToFloor.setType("Contains"); buildingToFloor.setTypeGroup(RelationTypeGroup.COMMON); - EntityRelation savedRelation = client.saveRelationV2(buildingToFloor); + EntityRelation savedRelation = client.saveRelation(buildingToFloor); assertNotNull(savedRelation); assertEquals("Contains", savedRelation.getType()); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device1)) .type("Contains") .typeGroup(RelationTypeGroup.COMMON)); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device2)) .type("Contains").typeGroup(RelationTypeGroup.COMMON)); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device3)) .type("Manages") @@ -111,28 +111,28 @@ void testEntityRelationLifecycle() throws ApiException { assertEquals("Contains", fetched.getType()); // find all relations from floor - List fromFloor = client.findByFromV2("ASSET", + List fromFloor = client.findEntityRelationsByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(3, fromFloor.size()); // find relations from floor with type filter "Contains" - List containsFromFloor = client.findByFromAndRelationType("ASSET", + List containsFromFloor = client.findEntityRelationsByFromAndRelationType("ASSET", floor.getId().getId().toString(), "Contains", RelationTypeGroup.COMMON.getValue()); assertEquals(2, containsFromFloor.size()); // find relations to device1 - List toDevice1 = client.findByToV2("DEVICE", + List toDevice1 = client.findEntityRelationsByTo("DEVICE", device1.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(1, toDevice1.size()); assertEquals("Contains", toDevice1.get(0).getType()); // find relations to device3 with type filter "Manages" - List managesToDevice3 = client.findByToAndRelationType("DEVICE", + List managesToDevice3 = client.findEntityRelationsByToAndRelationType("DEVICE", device3.getId().getId().toString(), "Manages", RelationTypeGroup.COMMON.getValue()); assertEquals(1, managesToDevice3.size()); // find info by from (includes entity names) - List infoFromFloor = client.findInfoByFromV2("ASSET", + List infoFromFloor = client.findEntityRelationInfosByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(3, infoFromFloor.size()); Device finalDevice = device1; @@ -140,7 +140,7 @@ void testEntityRelationLifecycle() throws ApiException { finalDevice.getName().equals(info.getToName()))); // find info by to - List infoToDevice2 = client.findInfoByToV2("DEVICE", + List infoToDevice2 = client.findEntityRelationInfosByTo("DEVICE", device2.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(1, infoToDevice2.size()); assertEquals(floor.getName(), infoToDevice2.get(0).getFromName()); @@ -161,11 +161,11 @@ void testEntityRelationLifecycle() throws ApiException { query.setParameters(params); query.setFilters(List.of(filter)); - List queryResult = client.findByQuery(query); + List queryResult = client.findEntityRelationsByQuery(query); assertTrue(queryResult.size() >= 3); // find info by query - List infoQueryResult = client.findInfoByQuery(query); + List infoQueryResult = client.findEntityRelationInfosByQuery(query); assertTrue(infoQueryResult.size() >= 3); // delete single relation @@ -176,14 +176,14 @@ void testEntityRelationLifecycle() throws ApiException { RelationTypeGroup.COMMON.getValue()); // verify deletion - List afterDelete = client.findByFromV2("ASSET", + List afterDelete = client.findEntityRelationsByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(2, afterDelete.size()); // delete all relations for building client.deleteRelations(building.getId().getId().toString(), "ASSET"); - List afterDeleteAll = client.findByFromV2("ASSET", + List afterDeleteAll = client.findEntityRelationsByFrom("ASSET", building.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(0, afterDeleteAll.size()); } diff --git a/ce/src/test/java/org/thingsboard/client/api/NotificationApiTest.java b/ce/src/test/java/org/thingsboard/client/api/NotificationApiTest.java index f0c67355..63c5aa77 100644 --- a/ce/src/test/java/org/thingsboard/client/api/NotificationApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/NotificationApiTest.java @@ -16,9 +16,15 @@ package org.thingsboard.client.api; import org.junit.jupiter.api.Test; +import org.thingsboard.client.model.EntityActionNotificationRuleTriggerConfig; +import org.thingsboard.client.model.EntityActionRecipientsConfig; +import org.thingsboard.client.model.EntityType; import org.thingsboard.client.model.NotificationDeliveryMethod; import org.thingsboard.client.model.NotificationRequest; import org.thingsboard.client.model.NotificationRequestInfo; +import org.thingsboard.client.model.NotificationRule; +import org.thingsboard.client.model.NotificationRuleInfo; +import org.thingsboard.client.model.NotificationRuleTriggerType; import org.thingsboard.client.model.NotificationSettings; import org.thingsboard.client.model.NotificationTarget; import org.thingsboard.client.model.NotificationTemplate; @@ -26,6 +32,7 @@ import org.thingsboard.client.model.NotificationType; import org.thingsboard.client.model.PageDataNotification; import org.thingsboard.client.model.PageDataNotificationRequestInfo; +import org.thingsboard.client.model.PageDataNotificationRuleInfo; import org.thingsboard.client.model.PageDataNotificationTarget; import org.thingsboard.client.model.PageDataNotificationTemplate; import org.thingsboard.client.model.PlatformUsersNotificationTargetConfig; @@ -187,4 +194,83 @@ void testNotificationLifecycle() throws Exception { assertReturns404(() -> client.getNotificationTargetById(savedTarget.getId().getId())); } + @Test + void testNotificationRuleLifecycle() throws Exception { + long timestamp = System.currentTimeMillis(); + + // Create a target for the rule recipients + TenantAdministratorsFilter usersFilter = new TenantAdministratorsFilter(); + PlatformUsersNotificationTargetConfig targetConfig = + new PlatformUsersNotificationTargetConfig().usersFilter(usersFilter); + NotificationTarget target = + new NotificationTarget() + .name("Rule Test Target " + timestamp) + ._configuration(targetConfig); + NotificationTarget savedTarget = client.saveNotificationTarget(target); + + // Create a template of type ENTITY_ACTION + WebDeliveryMethodNotificationTemplate webTemplate = + new WebDeliveryMethodNotificationTemplate() + .subject("Entity action: ${entityType}") + .body("Entity ${entityName} was ${actionType}") + .enabled(true); + NotificationTemplateConfig templateConfig = + new NotificationTemplateConfig() + .putDeliveryMethodsTemplatesItem("WEB", webTemplate); + NotificationTemplate template = + new NotificationTemplate() + .name("Rule Test Template " + timestamp) + .notificationType(NotificationType.ENTITY_ACTION) + ._configuration(templateConfig); + NotificationTemplate savedTemplate = client.saveNotificationTemplate(template); + + // Build trigger config: fire on DEVICE create/update + EntityActionNotificationRuleTriggerConfig triggerConfig = + new EntityActionNotificationRuleTriggerConfig() + .addEntityTypesItem(EntityType.DEVICE) + .created(true) + .updated(true) + .deleted(false); + + // Build recipients config + EntityActionRecipientsConfig recipientsConfig = new EntityActionRecipientsConfig() + .addTargetsItem(savedTarget.getId().getId()); + + // saveNotificationRule - create + NotificationRule rule = new NotificationRule() + .name("Test Rule " + timestamp) + .enabled(true) + .templateId(savedTemplate.getId()) + .triggerType(NotificationRuleTriggerType.ENTITY_ACTION) + .triggerConfig(triggerConfig) + .recipientsConfig(recipientsConfig); + + NotificationRule savedRule = client.saveNotificationRule(rule); + assertNotNull(savedRule); + assertNotNull(savedRule.getId()); + assertEquals("Test Rule " + timestamp, savedRule.getName()); + assertEquals(NotificationRuleTriggerType.ENTITY_ACTION, savedRule.getTriggerType()); + assertEquals(Boolean.TRUE, savedRule.getEnabled()); + + // getNotificationRuleById + NotificationRuleInfo fetchedRule = client.getNotificationRuleById(savedRule.getId().getId()); + assertNotNull(fetchedRule); + assertEquals(savedRule.getName(), fetchedRule.getName()); + assertEquals(NotificationRuleTriggerType.ENTITY_ACTION, fetchedRule.getTriggerType()); + + // getNotificationRules - verify it appears in the list + PageDataNotificationRuleInfo rulesPage = client.getNotificationRules(100, 0, null, null, null); + assertNotNull(rulesPage); + assertTrue(rulesPage.getData().stream() + .anyMatch(r -> r.getId().getId().equals(savedRule.getId().getId()))); + + // deleteNotificationRule + client.deleteNotificationRule(savedRule.getId().getId()); + assertReturns404(() -> client.getNotificationRuleById(savedRule.getId().getId())); + + // Cleanup + client.deleteNotificationTemplateById(savedTemplate.getId().getId()); + client.deleteNotificationTargetById(savedTarget.getId().getId()); + } + } diff --git a/ce/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java b/ce/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java index 47b48262..af188cf2 100644 --- a/ce/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java @@ -108,7 +108,7 @@ void testOAuth2ClientLifecycle() throws ApiException { createdClients.get(0).getId().getId().toString(), createdClients.get(1).getId().getId().toString() ); - List fetchedInfos = client.findTenantOAuth2ClientInfosByIdsV2(idsToFetch); + List fetchedInfos = client.findTenantOAuth2ClientInfosByIds(idsToFetch); assertEquals(2, fetchedInfos.size()); // update OAuth2 client diff --git a/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java b/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java index ad3a3a72..f71e2bc2 100644 --- a/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java @@ -206,7 +206,7 @@ void testGetOtaPackagesByDeviceProfileAndType() throws Exception { createFirmwareWithUrl("byprofile_" + ts + "_0"); createFirmwareWithUrl("byprofile_" + ts + "_1"); - PageDataOtaPackageInfo page = client.getOtaPackages1( + PageDataOtaPackageInfo page = client.getOtaPackagesByDeviceProfileAndType( profileId.getId().toString(), "FIRMWARE", 100, 0, OTA_PREFIX + "byprofile_" + ts, null, null); assertNotNull(page); diff --git a/ce/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java b/ce/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java new file mode 100644 index 00000000..ae7ab55d --- /dev/null +++ b/ce/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java @@ -0,0 +1,86 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.api; + +import org.junit.jupiter.api.Test; +import org.thingsboard.client.ApiException; +import org.thingsboard.client.model.Device; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class RpcV1ApiTest extends AbstractApiTest { + + // Persistent RPC body: the server stores the RPC and immediately returns + // {"rpcId": "..."} without waiting for the device to be online. + private static final String ONE_WAY_BODY = + "{\"method\":\"setGpio\",\"params\":{\"pin\":7,\"value\":1},\"persistent\":true}"; + private static final String TWO_WAY_BODY = + "{\"method\":\"getGpio\",\"params\":{\"pin\":7},\"persistent\":true}"; + + private Device createDevice(String name) throws ApiException { + Device device = new Device(); + device.setName(name); + device.setType("default"); + return client.saveDevice(device, null, null, null, null, null); + } + + // ------------------------------------------------------------------------- + // handleOneWayDeviceRPCRequest + // ------------------------------------------------------------------------- + + @Test + void testHandleOneWayDeviceRPCRequest() throws ApiException { + long ts = System.currentTimeMillis(); + Device device = createDevice(TEST_PREFIX + ts); + String deviceId = device.getId().getId().toString(); + + // With persistent=true the server stores the RPC and immediately + // responds 200 with {"rpcId":"..."}. The generated client declares + // String as the return type and fails to deserialize the JSON object, + // wrapping the IOException in ApiException with code 0. + try { + client.handleOneWayDeviceRPCRequestV1(deviceId, ONE_WAY_BODY); + } catch (ApiException e) { + assertEquals(0, e.getCode(), + "handleOneWayDeviceRPCRequest got an unexpected HTTP error: " + e.getCode()); + } + + client.deleteDevice(deviceId); + } + + // ------------------------------------------------------------------------- + // handleTwoWayDeviceRPCRequest + // ------------------------------------------------------------------------- + + @Test + void testHandleTwoWayDeviceRPCRequest() throws ApiException { + long ts = System.currentTimeMillis(); + Device device = createDevice(TEST_PREFIX + ts); + String deviceId = device.getId().getId().toString(); + + // Same behaviour as one-way: persistent=true returns {"rpcId":"..."} + // immediately; client type mismatch produces ApiException(code=0). + try { + client.handleTwoWayDeviceRPCRequestV1(deviceId, TWO_WAY_BODY); + } catch (ApiException e) { + assertEquals(0, e.getCode(), + "handleTwoWayDeviceRPCRequest got an unexpected HTTP error: " + e.getCode()); + } + + client.deleteDevice(deviceId); + } + +} diff --git a/ce/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java b/ce/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java new file mode 100644 index 00000000..3d4cc91c --- /dev/null +++ b/ce/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java @@ -0,0 +1,163 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.api; + +import org.junit.jupiter.api.Test; +import org.thingsboard.client.ApiException; +import org.thingsboard.client.model.Device; +import org.thingsboard.client.model.Rpc; + +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class RpcV2ApiTest extends AbstractApiTest { + + private static final String PERSISTENT_BODY = + "{\"method\":\"setGpio\",\"params\":{\"pin\":7,\"value\":1},\"persistent\":true}"; + + private Device createDevice(String name) throws ApiException { + Device device = new Device(); + device.setName(name); + device.setType("default"); + return client.saveDevice(device, null, null, null, null, null); + } + + /** + * POST a persistent one-way RPC via raw HTTP (the generated client cannot + * extract the rpcId because it expects String but the server returns a + * JSON object). Returns the rpcId string from the {"rpcId":"..."} payload. + */ + private String postPersistentRpcAndGetId(String deviceId) throws IOException, InterruptedException { + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create("http://localhost:8080/api/plugins/rpc/oneway/" + deviceId)) + .header("Content-Type", "application/json") + .header("Authorization", "Bearer " + client.getToken()) + .POST(HttpRequest.BodyPublishers.ofString(PERSISTENT_BODY)) + .build(); + HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); + return OBJECT_MAPPER.readTree(response.body()).get("rpcId").asText(); + } + + // ------------------------------------------------------------------------- + // handleOneWayDeviceRPCRequest (V2 – /api/plugins/rpc/oneway/{deviceId}) + // ------------------------------------------------------------------------- + + @Test + void testHandleOneWayDeviceRPCRequest() throws ApiException { + long ts = System.currentTimeMillis(); + Device device = createDevice(TEST_PREFIX + ts); + String deviceId = device.getId().getId().toString(); + + // With persistent=true the server immediately returns {"rpcId":"..."}, + // which the generated client (return type String) cannot deserialise → + // IOException wrapped in ApiException with code 0. + try { + client.handleOneWayDeviceRPCRequestV2(deviceId, PERSISTENT_BODY); + } catch (ApiException e) { + assertEquals(0, e.getCode(), + "handleOneWayDeviceRPCRequest1 got an unexpected HTTP error: " + e.getCode()); + } + + client.deleteDevice(deviceId); + } + + // ------------------------------------------------------------------------- + // handleTwoWayDeviceRPCRequest (V2 – /api/plugins/rpc/twoway/{deviceId}) + // ------------------------------------------------------------------------- + + @Test + void testHandleTwoWayDeviceRPCRequest() throws ApiException { + long ts = System.currentTimeMillis(); + Device device = createDevice(TEST_PREFIX + ts); + String deviceId = device.getId().getId().toString(); + + // Same behaviour as one-way with persistent=true. + try { + client.handleTwoWayDeviceRPCRequestV2(deviceId, PERSISTENT_BODY); + } catch (ApiException e) { + assertEquals(0, e.getCode(), + "handleTwoWayDeviceRPCRequest1 got an unexpected HTTP error: " + e.getCode()); + } + + client.deleteDevice(deviceId); + } + + // ------------------------------------------------------------------------- + // getPersistedRpc, deleteRpc + // ------------------------------------------------------------------------- + + @Test + void testGetPersistedRpcAndDeleteRpc() throws ApiException, IOException, InterruptedException { + long ts = System.currentTimeMillis(); + Device device = createDevice(TEST_PREFIX + ts); + String deviceId = device.getId().getId().toString(); + + // Create a persistent RPC via raw HTTP to capture the rpcId. + String rpcId = postPersistentRpcAndGetId(deviceId); + assertNotNull(rpcId); + + // getPersistedRpc – should return the stored Rpc object. + Rpc rpc = client.getPersistedRpc(rpcId); + assertNotNull(rpc); + assertNotNull(rpc.getId()); + + // deleteRpc – should succeed without exception. + client.deleteRpc(rpcId); + + // After deletion the record should no longer exist. + assertReturns404(() -> client.getPersistedRpc(rpcId)); + + client.deleteDevice(deviceId); + } + + @Test + void testGetPersistedRpcNotFound() { + assertReturns404(() -> client.getPersistedRpc(UUID.randomUUID().toString())); + } + + // ------------------------------------------------------------------------- + // getPersistedRpcByDevice + // ------------------------------------------------------------------------- + + @Test + void testGetPersistedRpcByDevice() throws ApiException, IOException, InterruptedException { + long ts = System.currentTimeMillis(); + Device device = createDevice(TEST_PREFIX + ts); + String deviceId = device.getId().getId().toString(); + + // Create a persistent RPC so there is at least one entry for this device. + postPersistentRpcAndGetId(deviceId); + + // getPersistedRpcByDevice declares String as the return type, but the + // server returns a JSON page-data object → ApiException(code=0). + try { + client.getPersistedRpcByDevice(deviceId, 100, 0, null, null, null, null); + } catch (ApiException e) { + assertEquals(0, e.getCode(), + "getPersistedRpcByDevice got an unexpected HTTP error: " + e.getCode()); + } + + client.deleteDevice(deviceId); + } + +} diff --git a/ce/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java b/ce/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java index 231c6245..4afa2627 100644 --- a/ce/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java @@ -100,7 +100,7 @@ void testResourceLifecycle() throws ApiException { createdResources.get(0).getId().getId().toString(), createdResources.get(1).getId().getId().toString() ); - List resourceList = client.getSystemOrTenantResourcesByIdsV2(idsToFetch); + List resourceList = client.getSystemOrTenantResourcesByIds(idsToFetch); assertEquals(2, resourceList.size()); // update resource diff --git a/ce/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java b/ce/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java index 5b29e905..ca9e02cb 100644 --- a/ce/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java +++ b/ce/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java @@ -59,7 +59,7 @@ void testTwoFactorAuthLifecycle() throws ApiException, IOException, InterruptedE assertEquals(300, savedSettings.getTotalAllowedTimeForVerification()); // get available 2FA providers (should include TOTP) - List providerTypes = client.getAvailableTwoFaProviders1(); + List providerTypes = client.getAvailableTwoFaProviderTypes(); assertNotNull(providerTypes); assertTrue(providerTypes.contains(TwoFaProviderType.TOTP)); diff --git a/paas/docs/AdminControllerApi.md b/paas/docs/AdminControllerApi.md index a5dc6fe2..fe8f7ed4 100644 --- a/paas/docs/AdminControllerApi.md +++ b/paas/docs/AdminControllerApi.md @@ -5,20 +5,20 @@ | [**autoCommitSettingsExists**](#autoCommitSettingsExists) | **GET** /api/admin/autoCommitSettings/exists | Check auto commit settings exists (autoCommitSettingsExists) | | [**checkRepositoryAccess**](#checkRepositoryAccess) | **POST** /api/admin/repositorySettings/checkAccess | Check repository access (checkRepositoryAccess) | | [**checkUpdates**](#checkUpdates) | **GET** /api/admin/updates | Check for new Platform Releases (checkUpdates) | -| [**codeProcessingUrl**](#codeProcessingUrl) | **GET** /api/admin/mail/oauth2/code | codeProcessingUrl | | [**deleteAutoCommitSettings**](#deleteAutoCommitSettings) | **DELETE** /api/admin/autoCommitSettings | Delete auto commit settings (deleteAutoCommitSettings) | | [**deleteRepositorySettings**](#deleteRepositorySettings) | **DELETE** /api/admin/repositorySettings | Delete repository settings (deleteRepositorySettings) | | [**getAdminSettings**](#getAdminSettings) | **GET** /api/admin/settings/{key} | Get the Administration Settings object using key (getAdminSettings) | -| [**getAuthorizationUrl**](#getAuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getAutoCommitSettings**](#getAutoCommitSettings) | **GET** /api/admin/autoCommitSettings | Get auto commit settings (getAutoCommitSettings) | | [**getFeaturesInfo**](#getFeaturesInfo) | **GET** /api/admin/featuresInfo | Get features info (getFeaturesInfo) | | [**getJwtSettings**](#getJwtSettings) | **GET** /api/admin/jwtSettings | Get the JWT Settings object (getJwtSettings) | | [**getLicenseUsageInfo**](#getLicenseUsageInfo) | **GET** /api/admin/licenseUsageInfo | Get license usage info (getLicenseUsageInfo) | +| [**getMailOAuth2AuthorizationUrl**](#getMailOAuth2AuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getMailProcessingUrl**](#getMailProcessingUrl) | **GET** /api/admin/mail/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getMailProcessingUrl) | | [**getRepositorySettings**](#getRepositorySettings) | **GET** /api/admin/repositorySettings | Get repository settings (getRepositorySettings) | | [**getRepositorySettingsInfo**](#getRepositorySettingsInfo) | **GET** /api/admin/repositorySettings/info | getRepositorySettingsInfo | | [**getSecuritySettings**](#getSecuritySettings) | **GET** /api/admin/securitySettings | Get the Security Settings object (getSecuritySettings) | | [**getSystemInfo**](#getSystemInfo) | **GET** /api/admin/systemInfo | Get system info (getSystemInfo) | +| [**handleMailOAuth2Callback**](#handleMailOAuth2Callback) | **GET** /api/admin/mail/oauth2/code | handleMailOAuth2Callback | | [**repositorySettingsExists**](#repositorySettingsExists) | **GET** /api/admin/repositorySettings/exists | Check repository settings exists (repositorySettingsExists) | | [**saveAdminSettings**](#saveAdminSettings) | **POST** /api/admin/settings | Creates or Updates the Administration Settings (saveAdminSettings) | | [**saveAutoCommitSettings**](#saveAutoCommitSettings) | **POST** /api/admin/autoCommitSettings | Creates or Updates the auto commit settings (saveAutoCommitSettings) | @@ -76,25 +76,6 @@ Check notifications about new platform releases. Available for users with 'SYS **UpdateMessage** -## codeProcessingUrl - -> codeProcessingUrl(code, state) - -codeProcessingUrl - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String** | | | -| **state** | **String** | | | - -### Return type - -null (empty response body) - - ## deleteAutoCommitSettings > deleteAutoCommitSettings() @@ -142,19 +123,6 @@ Get the Administration Settings object using specified string key. Referencing n **AdminSettings** -## getAuthorizationUrl - -> String getAuthorizationUrl() - -Redirect user to mail provider login page. - -After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - -### Return type - -**String** - - ## getAutoCommitSettings > Map getAutoCommitSettings() @@ -207,6 +175,19 @@ Get license usage info. Available for users with 'SYS_ADMIN' authority. **LicenseUsageInfo** +## getMailOAuth2AuthorizationUrl + +> String getMailOAuth2AuthorizationUrl() + +Redirect user to mail provider login page. + +After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + +### Return type + +**String** + + ## getMailProcessingUrl > String getMailProcessingUrl() @@ -270,6 +251,25 @@ Get main information about system. Available for users with 'SYS_ADMIN' author **SystemInfo** +## handleMailOAuth2Callback + +> handleMailOAuth2Callback(code, state) + +handleMailOAuth2Callback + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **code** | **String** | | | +| **state** | **String** | | | + +### Return type + +null (empty response body) + + ## repositorySettingsExists > Boolean repositorySettingsExists() diff --git a/paas/docs/AiAuditLogControllerApi.md b/paas/docs/AiAuditLogControllerApi.md index 0c7d667c..1dd2b2fb 100644 --- a/paas/docs/AiAuditLogControllerApi.md +++ b/paas/docs/AiAuditLogControllerApi.md @@ -2,15 +2,15 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getAuditLogs1**](#getAuditLogs1) | **GET** /api/ai/audit-logs | getAuditLogs | +| [**getAiAuditLogs**](#getAiAuditLogs) | **GET** /api/ai/audit-logs | getAiAuditLogs | -## getAuditLogs1 +## getAiAuditLogs -> com.fasterxml.jackson.databind.JsonNode getAuditLogs1(sourceId, status) +> com.fasterxml.jackson.databind.JsonNode getAiAuditLogs(sourceId, status) -getAuditLogs +getAiAuditLogs ### Parameters diff --git a/paas/docs/AiModelExportData.md b/paas/docs/AiModelExportData.md new file mode 100644 index 00000000..4b2f43c7 --- /dev/null +++ b/paas/docs/AiModelExportData.md @@ -0,0 +1,23 @@ + +# AiModelExportData + +`org.thingsboard.client.model.AiModelExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/AlarmAssignmentRecipientsConfig.md b/paas/docs/AlarmAssignmentRecipientsConfig.md new file mode 100644 index 00000000..c394d83e --- /dev/null +++ b/paas/docs/AlarmAssignmentRecipientsConfig.md @@ -0,0 +1,24 @@ + +# AlarmAssignmentRecipientsConfig + +`org.thingsboard.client.model.AlarmAssignmentRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/AlarmCommentRecipientsConfig.md b/paas/docs/AlarmCommentRecipientsConfig.md new file mode 100644 index 00000000..863bb32d --- /dev/null +++ b/paas/docs/AlarmCommentRecipientsConfig.md @@ -0,0 +1,24 @@ + +# AlarmCommentRecipientsConfig + +`org.thingsboard.client.model.AlarmCommentRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/AlarmControllerApi.md b/paas/docs/AlarmControllerApi.md index 36dd13c9..7291da24 100644 --- a/paas/docs/AlarmControllerApi.md +++ b/paas/docs/AlarmControllerApi.md @@ -9,7 +9,7 @@ | [**getAlarmById**](#getAlarmById) | **GET** /api/alarm/{alarmId} | Get Alarm (getAlarmById) | | [**getAlarmInfoById**](#getAlarmInfoById) | **GET** /api/alarm/info/{alarmId} | Get Alarm Info (getAlarmInfoById) | | [**getAlarmTypes**](#getAlarmTypes) | **GET** /api/alarm/types | Get Alarm Types (getAlarmTypes) | -| [**getAlarms**](#getAlarms) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarms) | +| [**getAlarmsByEntity**](#getAlarmsByEntity) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsByEntity) | | [**getAlarmsV2**](#getAlarmsV2) | **GET** /api/v2/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsV2) | | [**getAllAlarms**](#getAllAlarms) | **GET** /api/alarms | Get All Alarms (getAllAlarms) | | [**getAllAlarmsV2**](#getAllAlarmsV2) | **GET** /api/v2/alarms | Get All Alarms (getAllAlarmsV2) | @@ -163,11 +163,11 @@ Returns a set of unique alarm types based on alarms that are either owned by the **PageDataEntitySubtype** -## getAlarms +## getAlarmsByEntity -> PageDataAlarmInfo getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) +> PageDataAlarmInfo getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) -Get Alarms (getAlarms) +Get Alarms (getAlarmsByEntity) Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/ApiUsageLimitRecipientsConfig.md b/paas/docs/ApiUsageLimitRecipientsConfig.md new file mode 100644 index 00000000..6a24d1e0 --- /dev/null +++ b/paas/docs/ApiUsageLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ApiUsageLimitRecipientsConfig + +`org.thingsboard.client.model.ApiUsageLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/AssetControllerApi.md b/paas/docs/AssetControllerApi.md index 3f37cbf8..f6719606 100644 --- a/paas/docs/AssetControllerApi.md +++ b/paas/docs/AssetControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteAsset**](#deleteAsset) | **DELETE** /api/asset/{assetId} | Delete asset (deleteAsset) | -| [**findByQuery4**](#findByQuery4) | **POST** /api/assets | Find related assets (findByQuery) | +| [**findAssetsByQuery**](#findAssetsByQuery) | **POST** /api/assets | Find related assets (findAssetsByQuery) | | [**getAllAssetInfos**](#getAllAssetInfos) | **GET** /api/assetInfos/all | Get All Asset Infos for current user (getAllAssetInfos) | | [**getAssetById**](#getAssetById) | **GET** /api/asset/{assetId} | Get Asset (getAssetById) | | [**getAssetInfoById**](#getAssetInfoById) | **GET** /api/asset/info/{assetId} | Get Asset Info (getAssetInfoById) | @@ -12,7 +12,7 @@ | [**getAssetsByIds**](#getAssetsByIds) | **GET** /api/assets | Get Assets By Ids (getAssetsByIds) | | [**getCustomerAssetInfos**](#getCustomerAssetInfos) | **GET** /api/customer/{customerId}/assetInfos | Get Customer Asset Infos (getCustomerAssetInfos) | | [**getCustomerAssets**](#getCustomerAssets) | **GET** /api/customer/{customerId}/assets | Get Customer Assets (getCustomerAssets) | -| [**getTenantAssetByName**](#getTenantAssetByName) | **GET** /api/tenant/asset | Get Tenant Asset (getTenantAsset) | +| [**getTenantAssetByName**](#getTenantAssetByName) | **GET** /api/tenant/asset | Get Tenant Asset (getTenantAssetByName) | | [**getTenantAssets**](#getTenantAssets) | **GET** /api/tenant/assets | Get Tenant Assets (getTenantAssets) | | [**getUserAssets**](#getUserAssets) | **GET** /api/user/assets | Get Assets (getUserAssets) | | [**processAssetBulkImport**](#processAssetBulkImport) | **POST** /api/asset/bulk_import | Import the bulk of assets (processAssetsBulkImport) | @@ -40,11 +40,11 @@ Deletes the asset and all the relations (from and to the asset). Referencing non null (empty response body) -## findByQuery4 +## findAssetsByQuery -> List findByQuery4(assetSearchQuery) +> List findAssetsByQuery(assetSearchQuery) -Find related assets (findByQuery) +Find related assets (findAssetsByQuery) Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -241,7 +241,7 @@ Returns a page of assets objects owned by customer. You can specify parameters t > Asset getTenantAssetByName(assetName) -Get Tenant Asset (getTenantAsset) +Get Tenant Asset (getTenantAssetByName) 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/AssetExportData.md b/paas/docs/AssetExportData.md new file mode 100644 index 00000000..3985a421 --- /dev/null +++ b/paas/docs/AssetExportData.md @@ -0,0 +1,23 @@ + +# AssetExportData + +`org.thingsboard.client.model.AssetExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/AssetProfileControllerApi.md b/paas/docs/AssetProfileControllerApi.md index 09978e55..4c513da5 100644 --- a/paas/docs/AssetProfileControllerApi.md +++ b/paas/docs/AssetProfileControllerApi.md @@ -8,7 +8,7 @@ | [**getAssetProfileInfos**](#getAssetProfileInfos) | **GET** /api/assetProfileInfos | Get Asset Profile infos (getAssetProfileInfos) | | [**getAssetProfileNames**](#getAssetProfileNames) | **GET** /api/assetProfile/names | Get Asset Profile names (getAssetProfileNames) | | [**getAssetProfiles**](#getAssetProfiles) | **GET** /api/assetProfiles | Get Asset Profiles (getAssetProfiles) | -| [**getAssetProfilesByIdsV2**](#getAssetProfilesByIdsV2) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIdsV2) | +| [**getAssetProfilesByIds**](#getAssetProfilesByIds) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIds) | | [**getDefaultAssetProfileInfo**](#getDefaultAssetProfileInfo) | **GET** /api/assetProfileInfo/default | Get Default Asset Profile (getDefaultAssetProfileInfo) | | [**saveAssetProfile**](#saveAssetProfile) | **POST** /api/assetProfile | Create Or Update Asset Profile (saveAssetProfile) | | [**setDefaultAssetProfile**](#setDefaultAssetProfile) | **POST** /api/assetProfile/{assetProfileId}/default | Make Asset Profile Default (setDefaultAssetProfile) | @@ -144,11 +144,11 @@ Returns a page of asset profile objects owned by tenant. You can specify paramet **PageDataAssetProfile** -## getAssetProfilesByIdsV2 +## getAssetProfilesByIds -> List getAssetProfilesByIdsV2(assetProfileIds) +> List getAssetProfilesByIds(assetProfileIds) -Get Asset Profiles By Ids (getAssetProfilesByIdsV2) +Get Asset Profiles By Ids (getAssetProfilesByIds) Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/AssetProfileExportData.md b/paas/docs/AssetProfileExportData.md new file mode 100644 index 00000000..8507f2a9 --- /dev/null +++ b/paas/docs/AssetProfileExportData.md @@ -0,0 +1,23 @@ + +# AssetProfileExportData + +`org.thingsboard.client.model.AssetProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/BillingEndpointControllerApi.md b/paas/docs/BillingEndpointControllerApi.md index d797ed36..3dc033f2 100644 --- a/paas/docs/BillingEndpointControllerApi.md +++ b/paas/docs/BillingEndpointControllerApi.md @@ -7,7 +7,7 @@ | [**notifyTenantStateChanged**](#notifyTenantStateChanged) | **POST** /api/billingEndpoint/tenantStateChanged | notifyTenantStateChanged | | [**notifyTenantSubscriptionCreated**](#notifyTenantSubscriptionCreated) | **POST** /api/billingEndpoint/tenantSubscriptionCreated | notifyTenantSubscriptionCreated | | [**sendAccountActivatedEmail**](#sendAccountActivatedEmail) | **POST** /api/billingEndpoint/sendAccountActivated | sendAccountActivatedEmail | -| [**sendActivationEmail1**](#sendActivationEmail1) | **POST** /api/billingEndpoint/sendActivation | sendActivationEmail | +| [**sendBillingActivationEmail**](#sendBillingActivationEmail) | **POST** /api/billingEndpoint/sendActivation | sendBillingActivationEmail | | [**sendPasswordWasResetEmail**](#sendPasswordWasResetEmail) | **POST** /api/billingEndpoint/sendPasswordWasReset | sendPasswordWasResetEmail | | [**sendResetPasswordEmail**](#sendResetPasswordEmail) | **POST** /api/billingEndpoint/sendResetPassword | sendResetPasswordEmail | | [**tenantHasBillingRead**](#tenantHasBillingRead) | **GET** /api/billingEndpoint/tenant/permission/billing/read | tenantHasBillingRead | @@ -106,11 +106,11 @@ sendAccountActivatedEmail null (empty response body) -## sendActivationEmail1 +## sendBillingActivationEmail -> sendActivationEmail1(body) +> sendBillingActivationEmail(body) -sendActivationEmail +sendBillingActivationEmail ### Parameters diff --git a/paas/docs/BlobEntityControllerApi.md b/paas/docs/BlobEntityControllerApi.md index 2b4c340e..13b0f3e5 100644 --- a/paas/docs/BlobEntityControllerApi.md +++ b/paas/docs/BlobEntityControllerApi.md @@ -5,7 +5,7 @@ | [**deleteBlobEntity**](#deleteBlobEntity) | **DELETE** /api/blobEntity/{blobEntityId} | Delete Blob Entity (deleteBlobEntity) | | [**downloadBlobEntity**](#downloadBlobEntity) | **GET** /api/blobEntity/{blobEntityId}/download | Download Blob Entity By Id (downloadBlobEntity) | | [**getBlobEntities**](#getBlobEntities) | **GET** /api/blobEntities | Get Blob Entities (getBlobEntities) | -| [**getBlobEntitiesByIdsV2**](#getBlobEntitiesByIdsV2) | **GET** /api/blobEntities/list | Get Blob Entities By Ids (getBlobEntitiesByIdsV2) | +| [**getBlobEntitiesByIds**](#getBlobEntitiesByIds) | **GET** /api/blobEntities/list | Get Blob Entities By Ids (getBlobEntitiesByIds) | | [**getBlobEntityInfoById**](#getBlobEntityInfoById) | **GET** /api/blobEntity/info/{blobEntityId} | Get Blob Entity With Customer Info (getBlobEntityInfoById) | @@ -77,11 +77,11 @@ Returns a page of BlobEntityWithCustomerInfo object that are available for the c **PageDataBlobEntityWithCustomerInfo** -## getBlobEntitiesByIdsV2 +## getBlobEntitiesByIds -> List getBlobEntitiesByIdsV2(blobEntityIds) +> List getBlobEntitiesByIds(blobEntityIds) -Get Blob Entities By Ids (getBlobEntitiesByIdsV2) +Get Blob Entities By Ids (getBlobEntitiesByIds) Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/BulkImportResultAsset.md b/paas/docs/BulkImportResultAsset.md index 49d23019..67309837 100644 --- a/paas/docs/BulkImportResultAsset.md +++ b/paas/docs/BulkImportResultAsset.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/paas/docs/BulkImportResultDevice.md b/paas/docs/BulkImportResultDevice.md index e1532d49..be195ee7 100644 --- a/paas/docs/BulkImportResultDevice.md +++ b/paas/docs/BulkImportResultDevice.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/paas/docs/BulkImportResultEdge.md b/paas/docs/BulkImportResultEdge.md index bdf755a6..91d73829 100644 --- a/paas/docs/BulkImportResultEdge.md +++ b/paas/docs/BulkImportResultEdge.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/paas/docs/CalculatedFieldControllerApi.md b/paas/docs/CalculatedFieldControllerApi.md index 49ac7892..6c3c617e 100644 --- a/paas/docs/CalculatedFieldControllerApi.md +++ b/paas/docs/CalculatedFieldControllerApi.md @@ -6,13 +6,13 @@ | [**getCalculatedFieldById**](#getCalculatedFieldById) | **GET** /api/calculatedField/{calculatedFieldId} | Get Calculated Field (getCalculatedFieldById) | | [**getCalculatedFieldNames**](#getCalculatedFieldNames) | **GET** /api/calculatedFields/names | Get calculated field names (getCalculatedFieldNames) | | [**getCalculatedFields**](#getCalculatedFields) | **GET** /api/calculatedFields | Get calculated fields (getCalculatedFields) | -| [**getCalculatedFieldsByEntityIdV2**](#getCalculatedFieldsByEntityIdV2) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) | +| [**getCalculatedFieldsByEntityId**](#getCalculatedFieldsByEntityId) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) | | [**getLastCalculatedFieldReprocessingJob**](#getLastCalculatedFieldReprocessingJob) | **GET** /api/calculatedField/{calculatedFieldId}/reprocess/job | getLastCalculatedFieldReprocessingJob | | [**getLatestCalculatedFieldDebugEvent**](#getLatestCalculatedFieldDebugEvent) | **GET** /api/calculatedField/{calculatedFieldId}/debug | Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent) | | [**reprocessCalculatedField**](#reprocessCalculatedField) | **GET** /api/calculatedField/{calculatedFieldId}/reprocess | Reprocess Calculated Field (reprocessCalculatedField) | | [**reprocessCalculatedFieldAndWait**](#reprocessCalculatedFieldAndWait) | **GET** /api/calculatedField/{calculatedFieldId}/reprocessAndWait | Reprocess Calculated Field and wait for completion (reprocessCalculatedFieldAndWait) | | [**saveCalculatedField**](#saveCalculatedField) | **POST** /api/calculatedField | Create Or Update Calculated Field (saveCalculatedField) | -| [**testScript1**](#testScript1) | **POST** /api/calculatedField/testScript | Test Script expression | +| [**testCalculatedFieldScript**](#testCalculatedFieldScript) | **POST** /api/calculatedField/testScript | Test Script expression | | [**validateCalculatedFieldReprocessing**](#validateCalculatedFieldReprocessing) | **GET** /api/calculatedField/{calculatedFieldId}/reprocess/validate | Validate reprocessing capability of a calculated field (validateCalculatedFieldReprocessing) | @@ -109,11 +109,11 @@ Fetch tenant calculated fields based on the filter. **PageDataCalculatedFieldInfo** -## getCalculatedFieldsByEntityIdV2 +## getCalculatedFieldsByEntityId -> PageDataCalculatedField getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) +> PageDataCalculatedField getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) -Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) +Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) Fetch the Calculated Fields based on the provided Entity Id. @@ -238,9 +238,9 @@ Creates or Updates the Calculated Field. When creating calculated field, platfor **CalculatedField** -## testScript1 +## testCalculatedFieldScript -> com.fasterxml.jackson.databind.JsonNode testScript1(body) +> com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(body) Test Script expression diff --git a/paas/docs/CloudEndpointControllerApi.md b/paas/docs/CloudEndpointControllerApi.md index f6019179..b969d9fb 100644 --- a/paas/docs/CloudEndpointControllerApi.md +++ b/paas/docs/CloudEndpointControllerApi.md @@ -2,14 +2,25 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**checkTenantWhiteLabelingAllowed**](#checkTenantWhiteLabelingAllowed) | **GET** /api/cloudEndpoint/tenant/permission/whiteLabelingAllowed | checkTenantWhiteLabelingAllowed | | [**hasDomainReadPermission**](#hasDomainReadPermission) | **GET** /api/cloudEndpoint/permission/domain/read | hasDomainReadPermission | | [**hasDomainWritePermission**](#hasDomainWritePermission) | **GET** /api/cloudEndpoint/permission/domain/write | hasDomainWritePermission | | [**tenantHasWhiteLabelRead**](#tenantHasWhiteLabelRead) | **GET** /api/cloudEndpoint/tenant/permission/whiteLabel/read | tenantHasWhiteLabelRead | | [**tenantHasWhiteLabelWrite**](#tenantHasWhiteLabelWrite) | **GET** /api/cloudEndpoint/tenant/permission/whiteLabel/write | tenantHasWhiteLabelWrite | -| [**tenantWhiteLabelingAllowed1**](#tenantWhiteLabelingAllowed1) | **GET** /api/cloudEndpoint/tenant/permission/whiteLabelingAllowed | tenantWhiteLabelingAllowed | +## checkTenantWhiteLabelingAllowed + +> checkTenantWhiteLabelingAllowed() + +checkTenantWhiteLabelingAllowed + +### Return type + +null (empty response body) + + ## hasDomainReadPermission > Boolean hasDomainReadPermission() @@ -53,14 +64,3 @@ tenantHasWhiteLabelWrite **Boolean** - -## tenantWhiteLabelingAllowed1 - -> tenantWhiteLabelingAllowed1() - -tenantWhiteLabelingAllowed - -### Return type - -null (empty response body) - diff --git a/paas/docs/ConverterControllerApi.md b/paas/docs/ConverterControllerApi.md index db8e82c4..5a941f28 100644 --- a/paas/docs/ConverterControllerApi.md +++ b/paas/docs/ConverterControllerApi.md @@ -5,7 +5,7 @@ | [**deleteConverter**](#deleteConverter) | **DELETE** /api/converter/{converterId} | Delete converter (deleteConverter) | | [**getConverterById**](#getConverterById) | **GET** /api/converter/{converterId} | Get Converter (getConverterById) | | [**getConverters**](#getConverters) | **GET** /api/converters | Get Converters (getConverters) | -| [**getConvertersByIdsV2**](#getConvertersByIdsV2) | **GET** /api/converters/list | Get Converters By Ids (getConvertersByIdsV2) | +| [**getConvertersByIds**](#getConvertersByIds) | **GET** /api/converters/list | Get Converters By Ids (getConvertersByIds) | | [**getLatestConverterDebugInput**](#getLatestConverterDebugInput) | **GET** /api/converter/{converterId}/debugIn | Get latest debug input event (getLatestConverterDebugInput) | | [**saveConverter**](#saveConverter) | **POST** /api/converter | Create Or Update Converter (saveConverter) | | [**testDownLinkConverter**](#testDownLinkConverter) | **POST** /api/converter/testDownLink | Test converter function (testDownLinkConverter) | @@ -80,11 +80,11 @@ Returns a page of converters owned by tenant. You can specify parameters to filt **PageDataConverter** -## getConvertersByIdsV2 +## getConvertersByIds -> List getConvertersByIdsV2(converterIds) +> List getConvertersByIds(converterIds) -Get Converters By Ids (getConvertersByIdsV2) +Get Converters By Ids (getConvertersByIds) Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/ConverterExportData.md b/paas/docs/ConverterExportData.md new file mode 100644 index 00000000..85c6ad6c --- /dev/null +++ b/paas/docs/ConverterExportData.md @@ -0,0 +1,23 @@ + +# ConverterExportData + +`org.thingsboard.client.model.ConverterExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/CustomerControllerApi.md b/paas/docs/CustomerControllerApi.md index ab75077d..5cd80e62 100644 --- a/paas/docs/CustomerControllerApi.md +++ b/paas/docs/CustomerControllerApi.md @@ -10,7 +10,7 @@ | [**getCustomerTitleById**](#getCustomerTitleById) | **GET** /api/customer/{customerId}/title | Get Customer Title (getCustomerTitleById) | | [**getCustomers**](#getCustomers) | **GET** /api/customers | Get Tenant Customers (getCustomers) | | [**getCustomersByEntityGroupId**](#getCustomersByEntityGroupId) | **GET** /api/entityGroup/{entityGroupId}/customers | Get customers by Entity Group Id (getCustomersByEntityGroupId) | -| [**getCustomersByIdsV2**](#getCustomersByIdsV2) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIdsV2) | +| [**getCustomersByIds**](#getCustomersByIds) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIds) | | [**getShortCustomerInfoById**](#getShortCustomerInfoById) | **GET** /api/customer/{customerId}/shortInfo | Get short Customer info (getShortCustomerInfoById) | | [**getTenantCustomer**](#getTenantCustomer) | **GET** /api/tenant/customers | Get Tenant Customer by Customer title (getTenantCustomer) | | [**getUserCustomers**](#getUserCustomers) | **GET** /api/user/customers | Get Customers (getUserCustomers) | @@ -198,11 +198,11 @@ Returns a page of Customer objects that belongs to specified Entity Group Id. Yo **PageDataCustomer** -## getCustomersByIdsV2 +## getCustomersByIds -> List getCustomersByIdsV2(customerIds) +> List getCustomersByIds(customerIds) -Get customers by Customer Ids (getCustomersByIdsV2) +Get customers by Customer Ids (getCustomersByIds) Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/CustomerExportData.md b/paas/docs/CustomerExportData.md new file mode 100644 index 00000000..c5c441b9 --- /dev/null +++ b/paas/docs/CustomerExportData.md @@ -0,0 +1,23 @@ + +# CustomerExportData + +`org.thingsboard.client.model.CustomerExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/DashboardControllerApi.md b/paas/docs/DashboardControllerApi.md index 4ade9180..20bae1c8 100644 --- a/paas/docs/DashboardControllerApi.md +++ b/paas/docs/DashboardControllerApi.md @@ -15,8 +15,8 @@ | [**getHomeDashboardInfo**](#getHomeDashboardInfo) | **GET** /api/dashboard/home/info | Get Home Dashboard Info (getHomeDashboardInfo) | | [**getMaxDatapointsLimit**](#getMaxDatapointsLimit) | **GET** /api/dashboard/maxDatapointsLimit | Get max data points limit (getMaxDatapointsLimit) | | [**getServerTime**](#getServerTime) | **GET** /api/dashboard/serverTime | Get server time (getServerTime) | -| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboards) | -| [**getTenantDashboards1**](#getTenantDashboards1) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboardsByTenantId**](#getTenantDashboardsByTenantId) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) | | [**getTenantHomeDashboardInfo**](#getTenantHomeDashboardInfo) | **GET** /api/tenant/dashboard/home/info | Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo) | | [**getUserDashboards**](#getUserDashboards) | **GET** /api/user/dashboards | Get Dashboards (getUserDashboards) | | [**importGroupDashboards**](#importGroupDashboards) | **POST** /api/entityGroup/{entityGroupId}/dashboards/import | Import Dashboards (importGroupDashboards) | @@ -280,20 +280,20 @@ Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust vie ## getTenantDashboards -> PageDataDashboardInfo getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards by System Administrator (getTenantDashboards) +Get Tenant Dashboards (getTenantDashboards) -Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. +Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | +| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -303,22 +303,22 @@ Returns a page of dashboard info objects owned by tenant. The Dashboard Info obj **PageDataDashboardInfo** -## getTenantDashboards1 +## getTenantDashboardsByTenantId -> PageDataDashboardInfo getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards (getTenantDashboards) +Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) -Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/paas/docs/DashboardExportData.md b/paas/docs/DashboardExportData.md new file mode 100644 index 00000000..2356ec28 --- /dev/null +++ b/paas/docs/DashboardExportData.md @@ -0,0 +1,23 @@ + +# DashboardExportData + +`org.thingsboard.client.model.DashboardExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/DeviceActivityRecipientsConfig.md b/paas/docs/DeviceActivityRecipientsConfig.md new file mode 100644 index 00000000..1b3164d4 --- /dev/null +++ b/paas/docs/DeviceActivityRecipientsConfig.md @@ -0,0 +1,24 @@ + +# DeviceActivityRecipientsConfig + +`org.thingsboard.client.model.DeviceActivityRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/DeviceApiControllerApi.md b/paas/docs/DeviceApiControllerApi.md index 43fe8257..278e2342 100644 --- a/paas/docs/DeviceApiControllerApi.md +++ b/paas/docs/DeviceApiControllerApi.md @@ -2,7 +2,6 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**claimDevice**](#claimDevice) | **POST** /api/v1/{deviceToken}/claim | Save claiming information (claimDevice) | | [**getDeviceAttributes**](#getDeviceAttributes) | **GET** /api/v1/{deviceToken}/attributes | Get attributes (getDeviceAttributes) | | [**getFirmware**](#getFirmware) | **GET** /api/v1/{deviceToken}/firmware | Get Device Firmware (getFirmware) | | [**getSoftware**](#getSoftware) | **GET** /api/v1/{deviceToken}/software | Get Device Software (getSoftware) | @@ -11,32 +10,12 @@ | [**postTelemetry**](#postTelemetry) | **POST** /api/v1/{deviceToken}/telemetry | Post time series data (postTelemetry) | | [**provisionDevice**](#provisionDevice) | **POST** /api/v1/provision | Provision new device (provisionDevice) | | [**replyToCommand**](#replyToCommand) | **POST** /api/v1/{deviceToken}/rpc/{requestId} | Reply to RPC commands (replyToCommand) | +| [**saveClaimingInfo**](#saveClaimingInfo) | **POST** /api/v1/{deviceToken}/claim | Save claiming information (saveClaimingInfo) | | [**subscribeToAttributes**](#subscribeToAttributes) | **GET** /api/v1/{deviceToken}/attributes/updates | Subscribe to attribute updates (subscribeToAttributes) (Deprecated) | | [**subscribeToCommands**](#subscribeToCommands) | **GET** /api/v1/{deviceToken}/rpc | Subscribe to RPC commands (subscribeToCommands) (Deprecated) | -## claimDevice - -> String claimDevice(deviceToken, body) - -Save claiming information (claimDevice) - -Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deviceToken** | **String** | Your device access token. | | -| **body** | **String** | | [optional] | - -### Return type - -**String** - - ## getDeviceAttributes > String getDeviceAttributes(deviceToken, clientKeys, sharedKeys) @@ -212,6 +191,27 @@ Replies to server originated RPC command identified by 'requestId' parameter. Th **String** +## saveClaimingInfo + +> String saveClaimingInfo(deviceToken, body) + +Save claiming information (saveClaimingInfo) + +Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | [optional] | + +### Return type + +**String** + + ## subscribeToAttributes > String subscribeToAttributes(deviceToken, timeout) diff --git a/paas/docs/DeviceControllerApi.md b/paas/docs/DeviceControllerApi.md index fc80f2a6..94697b28 100644 --- a/paas/docs/DeviceControllerApi.md +++ b/paas/docs/DeviceControllerApi.md @@ -3,11 +3,11 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**assignDeviceToTenant**](#assignDeviceToTenant) | **POST** /api/tenant/{tenantId}/device/{deviceId} | Assign device to tenant (assignDeviceToTenant) | -| [**claimDevice1**](#claimDevice1) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | +| [**claimDevice**](#claimDevice) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | | [**countByDeviceGroupAndEmptyOtaPackage**](#countByDeviceGroupAndEmptyOtaPackage) | **GET** /api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId} | Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) | | [**countByDeviceProfileAndEmptyOtaPackage**](#countByDeviceProfileAndEmptyOtaPackage) | **GET** /api/devices/count/{otaPackageType}/{deviceProfileId} | Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) | | [**deleteDevice**](#deleteDevice) | **DELETE** /api/device/{deviceId} | Delete device (deleteDevice) | -| [**findByQuery3**](#findByQuery3) | **POST** /api/devices | Find related devices (findByQuery) | +| [**findDevicesByQuery**](#findDevicesByQuery) | **POST** /api/devices | Find related devices (findDevicesByQuery) | | [**getAllDeviceInfos**](#getAllDeviceInfos) | **GET** /api/deviceInfos/all | Get All Device Infos for current user (getAllDeviceInfos) | | [**getCustomerDeviceInfos**](#getCustomerDeviceInfos) | **GET** /api/customer/{customerId}/deviceInfos | Get Customer Device Infos (getCustomerDeviceInfos) | | [**getCustomerDevices**](#getCustomerDevices) | **GET** /api/customer/{customerId}/devices | Get Customer Devices (getCustomerDevices) | @@ -23,7 +23,7 @@ | [**processDevicesBulkImport**](#processDevicesBulkImport) | **POST** /api/device/bulk_import | Import the bulk of devices (processDevicesBulkImport) | | [**reClaimDevice**](#reClaimDevice) | **DELETE** /api/customer/device/{deviceName}/claim | Reclaim device (reClaimDevice) | | [**saveDevice**](#saveDevice) | **POST** /api/device | Create Or Update Device (saveDevice) | -| [**saveDeviceWithCredentials1**](#saveDeviceWithCredentials1) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | +| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | | [**updateDeviceCredentials**](#updateDeviceCredentials) | **POST** /api/device/credentials | Update device credentials (updateDeviceCredentials) | @@ -49,9 +49,9 @@ Creates assignment of the device to tenant. Thereafter tenant will be able to re **Device** -## claimDevice1 +## claimDevice -> String claimDevice1(deviceName, subCustomerId, claimRequest) +> String claimDevice(deviceName, subCustomerId, claimRequest) Claim device (claimDevice) @@ -134,11 +134,11 @@ Deletes the device, it's credentials and all the relations (from and to the devi null (empty response body) -## findByQuery3 +## findDevicesByQuery -> List findByQuery3(deviceSearchQuery) +> List findDevicesByQuery(deviceSearchQuery) -Find related devices (findByQuery) +Find related devices (findDevicesByQuery) Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -489,9 +489,9 @@ Create or update the Device. When creating device, platform generates Device Id **Device** -## saveDeviceWithCredentials1 +## saveDeviceWithCredentials -> Device saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) +> Device saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) Create Device (saveDevice) with credentials diff --git a/paas/docs/DeviceProfileControllerApi.md b/paas/docs/DeviceProfileControllerApi.md index 521aecd0..e2beae69 100644 --- a/paas/docs/DeviceProfileControllerApi.md +++ b/paas/docs/DeviceProfileControllerApi.md @@ -8,10 +8,10 @@ | [**getDeviceProfileById**](#getDeviceProfileById) | **GET** /api/deviceProfile/{deviceProfileId} | Get Device Profile (getDeviceProfileById) | | [**getDeviceProfileInfoById**](#getDeviceProfileInfoById) | **GET** /api/deviceProfileInfo/{deviceProfileId} | Get Device Profile Info (getDeviceProfileInfoById) | | [**getDeviceProfileInfos**](#getDeviceProfileInfos) | **GET** /api/deviceProfileInfos | Get Device Profiles for transport type (getDeviceProfileInfos) | -| [**getDeviceProfileInfosByIdsV2**](#getDeviceProfileInfosByIdsV2) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) | +| [**getDeviceProfileInfosByIds**](#getDeviceProfileInfosByIds) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) | | [**getDeviceProfileNames**](#getDeviceProfileNames) | **GET** /api/deviceProfile/names | Get Device Profile names (getDeviceProfileNames) | +| [**getDeviceProfileTimeseriesKeys**](#getDeviceProfileTimeseriesKeys) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getDeviceProfileTimeseriesKeys) | | [**getDeviceProfiles**](#getDeviceProfiles) | **GET** /api/deviceProfiles | Get Device Profiles (getDeviceProfiles) | -| [**getTimeseriesKeys1**](#getTimeseriesKeys1) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getTimeseriesKeys) | | [**saveDeviceProfile**](#saveDeviceProfile) | **POST** /api/deviceProfile | Create Or Update Device Profile (saveDeviceProfile) | | [**setDefaultDeviceProfile**](#setDefaultDeviceProfile) | **POST** /api/deviceProfile/{deviceProfileId}/default | Make Device Profile Default (setDefaultDeviceProfile) | @@ -136,11 +136,11 @@ Returns a page of devices profile info objects owned by tenant. You can specify **PageDataDeviceProfileInfo** -## getDeviceProfileInfosByIdsV2 +## getDeviceProfileInfosByIds -> List getDeviceProfileInfosByIdsV2(deviceProfileIds) +> List getDeviceProfileInfosByIds(deviceProfileIds) -Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) +Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -176,48 +176,48 @@ Returns a set of unique device profile names owned by the tenant. Available for **List** -## getDeviceProfiles +## getDeviceProfileTimeseriesKeys -> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) +> List getDeviceProfileTimeseriesKeys(deviceProfileId) -Get Device Profiles (getDeviceProfiles) +Get time series keys (getDeviceProfileTimeseriesKeys) -Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | +| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | ### Return type -**PageDataDeviceProfile** +**List** -## getTimeseriesKeys1 +## getDeviceProfiles -> List getTimeseriesKeys1(deviceProfileId) +> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) -Get time series keys (getTimeseriesKeys) +Get Device Profiles (getDeviceProfiles) -Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. +Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | ### Return type -**List** +**PageDataDeviceProfile** ## saveDeviceProfile diff --git a/paas/docs/DeviceProfileExportData.md b/paas/docs/DeviceProfileExportData.md new file mode 100644 index 00000000..505aa2ee --- /dev/null +++ b/paas/docs/DeviceProfileExportData.md @@ -0,0 +1,23 @@ + +# DeviceProfileExportData + +`org.thingsboard.client.model.DeviceProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/DomainControllerApi.md b/paas/docs/DomainControllerApi.md index 8803acf9..3a05f12c 100644 --- a/paas/docs/DomainControllerApi.md +++ b/paas/docs/DomainControllerApi.md @@ -7,7 +7,7 @@ | [**getDomainInfoById**](#getDomainInfoById) | **GET** /api/domain/info/{id} | Get Domain info by Id (getDomainInfoById) | | [**getDomainInfos**](#getDomainInfos) | **GET** /api/domain/infos | Get Domain infos (getDomainInfos) | | [**saveDomain**](#saveDomain) | **POST** /api/domain | Save or Update Domain (saveDomain) | -| [**updateOauth2Clients1**](#updateOauth2Clients1) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateOauth2Clients**](#updateOauth2Clients) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | @@ -116,9 +116,9 @@ Create or update the Domain. When creating domain, platform generates Domain Id **Domain** -## updateOauth2Clients1 +## updateOauth2Clients -> updateOauth2Clients1(id, UUID) +> updateOauth2Clients(id, UUID) Update oauth2 clients (updateOauth2Clients) diff --git a/paas/docs/EdgeCommunicationFailureRecipientsConfig.md b/paas/docs/EdgeCommunicationFailureRecipientsConfig.md new file mode 100644 index 00000000..6ae93da1 --- /dev/null +++ b/paas/docs/EdgeCommunicationFailureRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EdgeCommunicationFailureRecipientsConfig + +`org.thingsboard.client.model.EdgeCommunicationFailureRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/EdgeConnectionRecipientsConfig.md b/paas/docs/EdgeConnectionRecipientsConfig.md new file mode 100644 index 00000000..0c69a5e5 --- /dev/null +++ b/paas/docs/EdgeConnectionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EdgeConnectionRecipientsConfig + +`org.thingsboard.client.model.EdgeConnectionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/EdgeControllerApi.md b/paas/docs/EdgeControllerApi.md index 50a2c180..9e773083 100644 --- a/paas/docs/EdgeControllerApi.md +++ b/paas/docs/EdgeControllerApi.md @@ -5,7 +5,7 @@ | [**activateInstance**](#activateInstance) | **POST** /api/license/activateInstance | Activate edge instance (activateInstance) | | [**checkInstance**](#checkInstance) | **POST** /api/license/checkInstance | Check edge license (checkInstance) | | [**deleteEdge**](#deleteEdge) | **DELETE** /api/edge/{edgeId} | Delete edge (deleteEdge) | -| [**findByQuery2**](#findByQuery2) | **POST** /api/edges | Find related edges (findByQuery) | +| [**findEdgesByQuery**](#findEdgesByQuery) | **POST** /api/edges | Find related edges (findEdgesByQuery) | | [**findMissingToRelatedRuleChains**](#findMissingToRelatedRuleChains) | **GET** /api/edge/missingToRelatedRuleChains/{edgeId} | Find missing rule chains (findMissingToRelatedRuleChains) | | [**getAllEdgeInfos**](#getAllEdgeInfos) | **GET** /api/edgeInfos/all | Get All Edge Infos for current user (getAllEdgeInfos) | | [**getCustomerEdgeInfos**](#getCustomerEdgeInfos) | **GET** /api/customer/{customerId}/edgeInfos | Get Customer Edge Infos (getCustomerEdgeInfos) | @@ -91,11 +91,11 @@ Deletes the edge. Referencing non-existing edge Id will cause an error. Availab null (empty response body) -## findByQuery2 +## findEdgesByQuery -> List findByQuery2(edgeSearchQuery) +> List findEdgesByQuery(edgeSearchQuery) -Find related edges (findByQuery) +Find related edges (findEdgesByQuery) Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/EntitiesLimitRecipientsConfig.md b/paas/docs/EntitiesLimitRecipientsConfig.md new file mode 100644 index 00000000..521fb923 --- /dev/null +++ b/paas/docs/EntitiesLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntitiesLimitRecipientsConfig + +`org.thingsboard.client.model.EntitiesLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/EntityActionRecipientsConfig.md b/paas/docs/EntityActionRecipientsConfig.md new file mode 100644 index 00000000..d1f26540 --- /dev/null +++ b/paas/docs/EntityActionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntityActionRecipientsConfig + +`org.thingsboard.client.model.EntityActionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/EntityGroupControllerApi.md b/paas/docs/EntityGroupControllerApi.md index 0dba921e..2bc16546 100644 --- a/paas/docs/EntityGroupControllerApi.md +++ b/paas/docs/EntityGroupControllerApi.md @@ -6,7 +6,7 @@ | [**assignEntityGroupToEdge**](#assignEntityGroupToEdge) | **POST** /api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType} | Assign entity group to edge (assignEntityGroupToEdge) | | [**deleteEntityGroup**](#deleteEntityGroup) | **DELETE** /api/entityGroup/{entityGroupId} | Delete Entity Group (deleteEntityGroup) | | [**getAllEdgeEntityGroups**](#getAllEdgeEntityGroups) | **GET** /api/allEntityGroups/edge/{edgeId}/{groupType} | Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups) | -| [**getAllEntityGroupsByOwnerAndType**](#getAllEntityGroupsByOwnerAndType) | **GET** /api/entityGroups/{ownerType}/{ownerId}/{groupType}/all | Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) | +| [**getAllEntityGroupsByOwnerAndType**](#getAllEntityGroupsByOwnerAndType) | **GET** /api/entityGroups/{ownerType}/{ownerId}/{groupType}/all | Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) | | [**getAllEntityGroupsByType**](#getAllEntityGroupsByType) | **GET** /api/entityGroups/{groupType}/all | Get Entity Groups by entity type (getAllEntityGroupsByType) | | [**getAllSharedEntityGroups**](#getAllSharedEntityGroups) | **GET** /api/entityGroups/{groupType}/shared/all | Get Shared Entity Groups by entity type (getAllSharedEntityGroups) | | [**getEdgeEntityGroups**](#getEdgeEntityGroups) | **GET** /api/entityGroups/edge/{edgeId}/{groupType} | Get Edge Entity Groups by entity type (getEdgeEntityGroups) | @@ -19,7 +19,7 @@ | [**getEntityGroupEntityInfosByOwnerAndTypeAndPageLink**](#getEntityGroupEntityInfosByOwnerAndTypeAndPageLink) | **GET** /api/entityGroupInfos/{ownerType}/{ownerId}/{groupType} | Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink) | | [**getEntityGroupEntityInfosByTypeAndPageLink**](#getEntityGroupEntityInfosByTypeAndPageLink) | **GET** /api/entityGroupInfos/{groupType} | Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink) | | [**getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink**](#getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink) | **GET** /api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType} | Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink) | -| [**getEntityGroupsByIdsV2**](#getEntityGroupsByIdsV2) | **GET** /api/entityGroups/list | Get Entity Groups by Ids (getEntityGroupsByIdsV2) | +| [**getEntityGroupsByIds**](#getEntityGroupsByIds) | **GET** /api/entityGroups/list | Get Entity Groups by Ids (getEntityGroupsByIds) | | [**getEntityGroupsByOwnerAndTypeAndPageLink**](#getEntityGroupsByOwnerAndTypeAndPageLink) | **GET** /api/entityGroups/{ownerType}/{ownerId}/{groupType} | Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink) | | [**getEntityGroupsByTypeAndPageLink**](#getEntityGroupsByTypeAndPageLink) | **GET** /api/entityGroups/{groupType} | Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink) | | [**getEntityGroupsForEntity**](#getEntityGroupsForEntity) | **GET** /api/entityGroups/{entityType}/{entityId} | Get Entity Groups by Entity Id (getEntityGroupsForEntity) | @@ -128,7 +128,7 @@ Fetch the list of Entity Group Info objects based on the provided Entity Type an > List getAllEntityGroupsByOwnerAndType(ownerType, ownerId, groupType) -Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) +Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. @@ -423,11 +423,11 @@ Returns a page of Entity Group Entity Info objects based on the provided Owner I **PageDataEntityInfo** -## getEntityGroupsByIdsV2 +## getEntityGroupsByIds -> List getEntityGroupsByIdsV2(entityGroupIds) +> List getEntityGroupsByIds(entityGroupIds) -Get Entity Groups by Ids (getEntityGroupsByIdsV2) +Get Entity Groups by Ids (getEntityGroupsByIds) Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. diff --git a/paas/docs/EntityRelationControllerApi.md b/paas/docs/EntityRelationControllerApi.md index 42321be0..7c55d128 100644 --- a/paas/docs/EntityRelationControllerApi.md +++ b/paas/docs/EntityRelationControllerApi.md @@ -2,57 +2,30 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**deleteRelation**](#deleteRelation) | **DELETE** /api/relation | Delete Relation (deleteRelation) | -| [**deleteRelationV2**](#deleteRelationV2) | **DELETE** /api/v2/relation | Delete Relation (deleteRelationV2) | -| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteCommonRelations) | -| [**findByFromAndRelationType**](#findByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findByFromAndRelationType) | -| [**findByFromV2**](#findByFromV2) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findByFromV2) | -| [**findByQuery**](#findByQuery) | **POST** /api/relations | Find related entities (findByQuery) | -| [**findByToAndRelationType**](#findByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findByToAndRelationType) | -| [**findByToV2**](#findByToV2) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findByToV2) | -| [**findInfoByFromV2**](#findInfoByFromV2) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findInfoByFromV2) | -| [**findInfoByQuery**](#findInfoByQuery) | **POST** /api/relations/info | Find related entity infos (findInfoByQuery) | -| [**findInfoByToV2**](#findInfoByToV2) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findInfoByToV2) | +| [**deleteRelation**](#deleteRelation) | **DELETE** /api/v2/relation | Delete Relation (deleteRelation) | +| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteRelations) | +| [**findEntityRelationInfosByFrom**](#findEntityRelationInfosByFrom) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findEntityRelationInfosByFrom) | +| [**findEntityRelationInfosByQuery**](#findEntityRelationInfosByQuery) | **POST** /api/relations/info | Find related entity infos (findEntityRelationInfosByQuery) | +| [**findEntityRelationInfosByTo**](#findEntityRelationInfosByTo) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findEntityRelationInfosByTo) | +| [**findEntityRelationsByFrom**](#findEntityRelationsByFrom) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findEntityRelationsByFrom) | +| [**findEntityRelationsByFromAndRelationType**](#findEntityRelationsByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findEntityRelationsByFromAndRelationType) | +| [**findEntityRelationsByQuery**](#findEntityRelationsByQuery) | **POST** /api/relations | Find related entities (findEntityRelationsByQuery) | +| [**findEntityRelationsByTo**](#findEntityRelationsByTo) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findEntityRelationsByTo) | +| [**findEntityRelationsByToAndRelationType**](#findEntityRelationsByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findEntityRelationsByToAndRelationType) | | [**getRelation**](#getRelation) | **GET** /api/relation | Get Relation (getRelation) | -| [**saveRelation**](#saveRelation) | **POST** /api/relation | Create Relation (saveRelation) | -| [**saveRelationV2**](#saveRelationV2) | **POST** /api/v2/relation | Create Relation (saveRelationV2) | +| [**saveRelation**](#saveRelation) | **POST** /api/v2/relation | Create Relation (saveRelation) | ## deleteRelation -> deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) +> EntityRelation deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) Delete Relation (deleteRelation) Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | - -### Return type - -null (empty response body) - - -## deleteRelationV2 - -> EntityRelation deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup) - -Delete Relation (deleteRelationV2) - -Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | @@ -73,7 +46,7 @@ Deletes a relation between two entities in the platform. If the user has the a > deleteRelations(entityId, entityType) -Delete common relations (deleteCommonRelations) +Delete common relations (deleteRelations) Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. @@ -90,13 +63,13 @@ Deletes all the relations ('from' and 'to' direction) for the specified entity a null (empty response body) -## findByFromAndRelationType +## findEntityRelationInfosByFrom -> List findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) +> List findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByFromAndRelationType) +Get List of Relation Infos (findEntityRelationInfosByFrom) -Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters @@ -105,72 +78,70 @@ Returns list of relation objects for the specified entity by the 'from' directio |------------- | ------------- | ------------- | -------------| | **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByFromV2 +## findEntityRelationInfosByQuery -> List findByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationInfosByQuery(entityRelationsQuery) -Get List of Relations (findByFromV2) +Find related entity infos (findEntityRelationInfosByQuery) -Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findByQuery +## findEntityRelationInfosByTo -> List findByQuery(entityRelationsQuery) +> List findEntityRelationInfosByTo(toType, toId, relationTypeGroup) -Find related entities (findByQuery) +Get List of Relation Infos (findEntityRelationInfosByTo) -Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. +Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByToAndRelationType +## findEntityRelationsByFrom -> List findByToAndRelationType(toType, toId, relationType, relationTypeGroup) +> List findEntityRelationsByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByToAndRelationType) +Get List of Relations (findEntityRelationsByFrom) -Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -178,21 +149,22 @@ Returns list of relation objects for the specified entity by the 'to' direction **List** -## findByToV2 +## findEntityRelationsByFromAndRelationType -> List findByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) -Get List of Relations (findByToV2) +Get List of Relations (findEntityRelationsByFromAndRelationType) -Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -200,55 +172,55 @@ Returns list of relation objects for the specified entity by the 'to' direction. **List** -## findInfoByFromV2 +## findEntityRelationsByQuery -> List findInfoByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationsByQuery(entityRelationsQuery) -Get List of Relation Infos (findInfoByFromV2) +Find related entities (findEntityRelationsByQuery) -Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findInfoByQuery +## findEntityRelationsByTo -> List findInfoByQuery(entityRelationsQuery) +> List findEntityRelationsByTo(toType, toId, relationTypeGroup) -Find related entity infos (findInfoByQuery) +Get List of Relations (findEntityRelationsByTo) -Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findInfoByToV2 +## findEntityRelationsByToAndRelationType -> List findInfoByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup) -Get List of Relation Infos (findInfoByToV2) +Get List of Relations (findEntityRelationsByToAndRelationType) -Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters @@ -257,11 +229,12 @@ Returns list of relation info objects for the specified entity by the 'to' direc |------------- | ------------- | ------------- | -------------| | **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** ## getRelation @@ -291,33 +264,13 @@ Returns relation object between two specified entities if present. Otherwise thr ## saveRelation -> saveRelation(entityRelation) +> EntityRelation saveRelation(entityRelation) Create Relation (saveRelation) Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityRelation** | **EntityRelation** | | | - -### Return type - -null (empty response body) - - -## saveRelationV2 - -> EntityRelation saveRelationV2(entityRelation) - -Create Relation (saveRelationV2) - -Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | diff --git a/paas/docs/EntityViewControllerApi.md b/paas/docs/EntityViewControllerApi.md index 99e4c2ab..8ec35b29 100644 --- a/paas/docs/EntityViewControllerApi.md +++ b/paas/docs/EntityViewControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteEntityView**](#deleteEntityView) | **DELETE** /api/entityView/{entityViewId} | Delete entity view (deleteEntityView) | -| [**findByQuery1**](#findByQuery1) | **POST** /api/entityViews | Find related entity views (findByQuery) | +| [**findEntityViewsByQuery**](#findEntityViewsByQuery) | **POST** /api/entityViews | Find related entity views (findEntityViewsByQuery) | | [**getAllEntityViewInfos**](#getAllEntityViewInfos) | **GET** /api/entityViewInfos/all | Get All Entity View Infos for current user (getAllEntityViewInfos) | | [**getCustomerEntityViewInfos**](#getCustomerEntityViewInfos) | **GET** /api/customer/{customerId}/entityViewInfos | Get Customer Entity View Infos (getCustomerEntityViewInfos) | | [**getCustomerEntityViews**](#getCustomerEntityViews) | **GET** /api/customer/{customerId}/entityViews | Get Customer Entity Views (getCustomerEntityViews) | @@ -11,7 +11,7 @@ | [**getEntityViewInfoById**](#getEntityViewInfoById) | **GET** /api/entityView/info/{entityViewId} | Get entity view info (getEntityViewInfoById) | | [**getEntityViewTypes**](#getEntityViewTypes) | **GET** /api/entityView/types | Get Entity View Types (getEntityViewTypes) | | [**getEntityViewsByEntityGroupId**](#getEntityViewsByEntityGroupId) | **GET** /api/entityGroup/{entityGroupId}/entityViews | Get entity views by Entity Group Id (getEntityViewsByEntityGroupId) | -| [**getEntityViewsByIdsV2**](#getEntityViewsByIdsV2) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIds) | +| [**getEntityViewsByIds**](#getEntityViewsByIds) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIds) | | [**getTenantEntityViewByName**](#getTenantEntityViewByName) | **GET** /api/tenant/entityView | Get Entity View by name (getTenantEntityViewByName) | | [**getTenantEntityViews**](#getTenantEntityViews) | **GET** /api/tenant/entityViews | Get Tenant Entity Views (getTenantEntityViews) | | [**getUserEntityViews**](#getUserEntityViews) | **GET** /api/user/entityViews | Get Entity Views (getUserEntityViews) | @@ -39,11 +39,11 @@ Delete the EntityView object based on the provided entity view id. Available f null (empty response body) -## findByQuery1 +## findEntityViewsByQuery -> List findByQuery1(entityViewSearchQuery) +> List findEntityViewsByQuery(entityViewSearchQuery) -Find related entity views (findByQuery) +Find related entity views (findEntityViewsByQuery) Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -216,9 +216,9 @@ Returns a page of Entity View objects that belongs to specified Entity View Id. **PageDataEntityView** -## getEntityViewsByIdsV2 +## getEntityViewsByIds -> List getEntityViewsByIdsV2(entityViewIds) +> List getEntityViewsByIds(entityViewIds) Get Entity Views By Ids (getEntityViewsByIds) diff --git a/paas/docs/EntityViewExportData.md b/paas/docs/EntityViewExportData.md new file mode 100644 index 00000000..bc849104 --- /dev/null +++ b/paas/docs/EntityViewExportData.md @@ -0,0 +1,23 @@ + +# EntityViewExportData + +`org.thingsboard.client.model.EntityViewExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/EventControllerApi.md b/paas/docs/EventControllerApi.md index 7e496e49..396c47ef 100644 --- a/paas/docs/EventControllerApi.md +++ b/paas/docs/EventControllerApi.md @@ -3,9 +3,8 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**clearEvents**](#clearEvents) | **POST** /api/events/{entityType}/{entityId}/clear | Clear Events (clearEvents) | -| [**getEvents**](#getEvents) | **GET** /api/events/{entityType}/{entityId} | Get Events (Deprecated) | -| [**getEvents1**](#getEvents1) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEvents) | -| [**getEvents2**](#getEvents2) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEvents) | +| [**getEventsByFilter**](#getEventsByFilter) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEventsByFilter) | +| [**getEventsByType**](#getEventsByType) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEventsByType) | @@ -33,40 +32,11 @@ Clears events by filter for specified entity. null (empty response body) -## getEvents +## getEventsByFilter -> PageDataEventInfo getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events (Deprecated) - -Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The value is not used in searching. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: ts, id] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | -| **startTime** | **Long** | Timestamp. Events with creation time before it won't be queried. | [optional] | -| **endTime** | **Long** | Timestamp. Events with creation time after it won't be queried. | [optional] | - -### Return type - -**PageDataEventInfo** - - -## getEvents1 - -> PageDataEventInfo getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) - -Get Events by event filter (getEvents) +Get Events by event filter (getEventsByFilter) Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. @@ -92,11 +62,11 @@ Returns a page of events for the chosen entity by specifying the event filter. Y **PageDataEventInfo** -## getEvents2 +## getEventsByType -> PageDataEventInfo getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events by type (getEvents) +Get Events by type (getEventsByType) Returns a page of events for specified entity by specifying event type. 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 response schema for more details. diff --git a/paas/docs/Integration.md b/paas/docs/Integration.md index a391855c..c09e562f 100644 --- a/paas/docs/Integration.md +++ b/paas/docs/Integration.md @@ -25,8 +25,8 @@ A JSON value representing the integration. | **secret** | **String** | String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type | | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the integration | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/IntegrationControllerApi.md b/paas/docs/IntegrationControllerApi.md index dd0c5982..cc37c1a7 100644 --- a/paas/docs/IntegrationControllerApi.md +++ b/paas/docs/IntegrationControllerApi.md @@ -13,7 +13,7 @@ | [**getIntegrationByRoutingKey**](#getIntegrationByRoutingKey) | **GET** /api/integration/routingKey/{routingKey} | Get Integration by Routing Key (getIntegrationByRoutingKey) | | [**getIntegrationInfos**](#getIntegrationInfos) | **GET** /api/integrationInfos | Get Integration Infos (getIntegrationInfos) | | [**getIntegrations**](#getIntegrations) | **GET** /api/integrations | Get Integrations (getIntegrations) | -| [**getIntegrationsByIdsV2**](#getIntegrationsByIdsV2) | **GET** /api/integrations/list | Get Integrations By Ids (getIntegrationsByIdsV2) | +| [**getIntegrationsByIds**](#getIntegrationsByIds) | **GET** /api/integrations/list | Get Integrations By Ids (getIntegrationsByIds) | | [**getIntegrationsConvertersInfo**](#getIntegrationsConvertersInfo) | **GET** /api/integrations/converters/info | Get Integrations Converters info (getIntegrationsConvertersInfo) | | [**saveIntegration**](#saveIntegration) | **POST** /api/integration | Create Or Update Integration (saveIntegration) | | [**unassignIntegrationFromEdge**](#unassignIntegrationFromEdge) | **DELETE** /api/edge/{edgeId}/integration/{integrationId} | Unassign integration from edge (unassignIntegrationFromEdge) | @@ -262,11 +262,11 @@ Returns a page of integrations owned by tenant. You can specify parameters to fi **PageDataIntegration** -## getIntegrationsByIdsV2 +## getIntegrationsByIds -> List getIntegrationsByIdsV2(integrationIds) +> List getIntegrationsByIds(integrationIds) -Get Integrations By Ids (getIntegrationsByIdsV2) +Get Integrations By Ids (getIntegrationsByIds) Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/IntegrationExportData.md b/paas/docs/IntegrationExportData.md new file mode 100644 index 00000000..6a36f485 --- /dev/null +++ b/paas/docs/IntegrationExportData.md @@ -0,0 +1,23 @@ + +# IntegrationExportData + +`org.thingsboard.client.model.IntegrationExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/IntegrationInfo.md b/paas/docs/IntegrationInfo.md index 4ebbb74d..a6e9964f 100644 --- a/paas/docs/IntegrationInfo.md +++ b/paas/docs/IntegrationInfo.md @@ -19,8 +19,8 @@ | **version** | **Long** | | [optional] | | **status** | **Object** | | [optional] | | **stats** | **Object** | | [optional] | -| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | | **edgeTemplate** | **Boolean** | Boolean flag that specifies that is regular or edge template integration | [optional] | +| **remote** | **Boolean** | Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core | [optional] | diff --git a/paas/docs/IntegrationLifecycleEventRecipientsConfig.md b/paas/docs/IntegrationLifecycleEventRecipientsConfig.md new file mode 100644 index 00000000..a888a281 --- /dev/null +++ b/paas/docs/IntegrationLifecycleEventRecipientsConfig.md @@ -0,0 +1,24 @@ + +# IntegrationLifecycleEventRecipientsConfig + +`org.thingsboard.client.model.IntegrationLifecycleEventRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/Lwm2mControllerApi.md b/paas/docs/Lwm2mControllerApi.md index 781e4e15..a39bdfda 100644 --- a/paas/docs/Lwm2mControllerApi.md +++ b/paas/docs/Lwm2mControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getLwm2mBootstrapSecurityInfo**](#getLwm2mBootstrapSecurityInfo) | **GET** /api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer} | Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo) | -| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save device with credentials (Deprecated) | +| [**saveLwm2mDeviceWithCredentials**](#saveLwm2mDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) | @@ -27,11 +27,13 @@ Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the **LwM2MServerSecurityConfigDefault** -## saveDeviceWithCredentials +## saveLwm2mDeviceWithCredentials -> Device saveDeviceWithCredentials(requestBody, entityGroupId) +> Device saveLwm2mDeviceWithCredentials(requestBody, entityGroupId) -Save device with credentials (Deprecated) +Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + +Deprecated. ### Parameters diff --git a/paas/docs/MailConfigTemplateControllerApi.md b/paas/docs/MailConfigTemplateControllerApi.md index 16e82199..8aa9fd90 100644 --- a/paas/docs/MailConfigTemplateControllerApi.md +++ b/paas/docs/MailConfigTemplateControllerApi.md @@ -2,13 +2,13 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getClientRegistrationTemplates1**](#getClientRegistrationTemplates1) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getClientRegistrationTemplates**](#getClientRegistrationTemplates) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | -## getClientRegistrationTemplates1 +## getClientRegistrationTemplates -> com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() +> com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates() Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/paas/docs/MobileAppBundleControllerApi.md b/paas/docs/MobileAppBundleControllerApi.md index abcd08eb..40de3c73 100644 --- a/paas/docs/MobileAppBundleControllerApi.md +++ b/paas/docs/MobileAppBundleControllerApi.md @@ -6,7 +6,7 @@ | [**getMobileAppBundleInfoById**](#getMobileAppBundleInfoById) | **GET** /api/mobile/bundle/info/{id} | Get mobile app bundle info by id (getMobileAppBundleInfoById) | | [**getTenantMobileAppBundleInfos**](#getTenantMobileAppBundleInfos) | **GET** /api/mobile/bundle/infos | Get mobile app bundle infos (getTenantMobileAppBundleInfos) | | [**saveMobileAppBundle**](#saveMobileAppBundle) | **POST** /api/mobile/bundle | Save Or update Mobile app bundle (saveMobileAppBundle) | -| [**updateOauth2Clients**](#updateOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateMobileAppBundleOauth2Clients**](#updateMobileAppBundleOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateMobileAppBundleOauth2Clients) | @@ -95,11 +95,11 @@ Create or update the Mobile app bundle that represents tha pair of ANDROID and I **MobileAppBundle** -## updateOauth2Clients +## updateMobileAppBundleOauth2Clients -> updateOauth2Clients(id, UUID) +> updateMobileAppBundleOauth2Clients(id, UUID) -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateMobileAppBundleOauth2Clients) Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/paas/docs/MobileAppControllerApi.md b/paas/docs/MobileAppControllerApi.md index 08f713ba..4aad90c2 100644 --- a/paas/docs/MobileAppControllerApi.md +++ b/paas/docs/MobileAppControllerApi.md @@ -4,8 +4,8 @@ |------------- | ------------- | -------------| | [**deleteMobileApp**](#deleteMobileApp) | **DELETE** /api/mobile/app/{id} | Delete Mobile App by ID (deleteMobileApp) | | [**getLoginMobileInfo**](#getLoginMobileInfo) | **GET** /api/noauth/mobile | Get mobile app login info (getLoginMobileInfo) | -| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppInfoById) | -| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileAppInfos) | +| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppById) | +| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileApps) | | [**getUserMobileInfo**](#getUserMobileInfo) | **GET** /api/mobile | Get user mobile app basic info (getUserMobileInfo) | | [**saveMobileApp**](#saveMobileApp) | **POST** /api/mobile/app | Save Or update Mobile app (saveMobileApp) | @@ -54,7 +54,7 @@ Get mobile app login info (getLoginMobileInfo) > MobileApp getMobileAppById(id) -Get mobile info by id (getMobileAppInfoById) +Get mobile info by id (getMobileAppById) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -74,7 +74,7 @@ Get mobile info by id (getMobileAppInfoById) > PageDataMobileApp getTenantMobileApps(pageSize, page, platformType, textSearch, sortProperty, sortOrder) -Get mobile app infos (getTenantMobileAppInfos) +Get mobile app infos (getTenantMobileApps) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/paas/docs/NewPlatformVersionRecipientsConfig.md b/paas/docs/NewPlatformVersionRecipientsConfig.md new file mode 100644 index 00000000..07ba72bb --- /dev/null +++ b/paas/docs/NewPlatformVersionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# NewPlatformVersionRecipientsConfig + +`org.thingsboard.client.model.NewPlatformVersionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/NotificationInfo.md b/paas/docs/NotificationInfo.md index 8089aa6b..be1eaa7b 100644 --- a/paas/docs/NotificationInfo.md +++ b/paas/docs/NotificationInfo.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **stateEntityId** | **EntityId** | | [optional] | | **dashboardId** | **DashboardId** | | [optional] | +| **stateEntityId** | **EntityId** | | [optional] | | **type** | **String** | | | diff --git a/paas/docs/NotificationRequestStats.md b/paas/docs/NotificationRequestStats.md index 672eb8cd..0a7bb49f 100644 --- a/paas/docs/NotificationRequestStats.md +++ b/paas/docs/NotificationRequestStats.md @@ -9,9 +9,9 @@ Notification request processing statistics | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **sent** | **Map\** | | [optional] | +| **sent** | **Map\** | | [optional] | | **errors** | **Map\\>** | | [optional] | -| **totalErrors** | **Object** | | [optional] | +| **totalErrors** | **Integer** | | [optional] | | **error** | **String** | | [optional] | | **totalSent** | **Integer** | | [optional] | diff --git a/paas/docs/NotificationRuleExportData.md b/paas/docs/NotificationRuleExportData.md new file mode 100644 index 00000000..87087bd9 --- /dev/null +++ b/paas/docs/NotificationRuleExportData.md @@ -0,0 +1,23 @@ + +# NotificationRuleExportData + +`org.thingsboard.client.model.NotificationRuleExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/NotificationTargetControllerApi.md b/paas/docs/NotificationTargetControllerApi.md index 983c4f87..6073e084 100644 --- a/paas/docs/NotificationTargetControllerApi.md +++ b/paas/docs/NotificationTargetControllerApi.md @@ -5,8 +5,8 @@ | [**deleteNotificationTargetById**](#deleteNotificationTargetById) | **DELETE** /api/notification/target/{id} | Delete notification target by id (deleteNotificationTargetById) | | [**getNotificationTargetById**](#getNotificationTargetById) | **GET** /api/notification/target/{id} | Get notification target by id (getNotificationTargetById) | | [**getNotificationTargets**](#getNotificationTargets) | **GET** /api/notification/targets | Get notification targets (getNotificationTargets) | -| [**getNotificationTargetsByIdsV2**](#getNotificationTargetsByIdsV2) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIdsV2) | -| [**getNotificationTargetsBySupportedNotificationTypeV2**](#getNotificationTargetsBySupportedNotificationTypeV2) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) | +| [**getNotificationTargetsByIds**](#getNotificationTargetsByIds) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIds) | +| [**getNotificationTargetsBySupportedNotificationType**](#getNotificationTargetsBySupportedNotificationType) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) | | [**getRecipientsForNotificationTargetConfig**](#getRecipientsForNotificationTargetConfig) | **POST** /api/notification/target/recipients | Get recipients for notification target config (getRecipientsForNotificationTargetConfig) | | [**saveNotificationTarget**](#saveNotificationTarget) | **POST** /api/notification/target | Save notification target (saveNotificationTarget) | @@ -76,11 +76,11 @@ Returns the page of notification targets owned by sysadmin or tenant. You can s **PageDataNotificationTarget** -## getNotificationTargetsByIdsV2 +## getNotificationTargetsByIds -> List getNotificationTargetsByIdsV2(ids) +> List getNotificationTargetsByIds(ids) -Get notification targets by ids (getNotificationTargetsByIdsV2) +Get notification targets by ids (getNotificationTargetsByIds) Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -96,11 +96,11 @@ Returns the list of notification targets found by provided ids. Available for u **List** -## getNotificationTargetsBySupportedNotificationTypeV2 +## getNotificationTargetsBySupportedNotificationType -> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) -Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) +Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/paas/docs/NotificationTargetExportData.md b/paas/docs/NotificationTargetExportData.md new file mode 100644 index 00000000..81e2f9d5 --- /dev/null +++ b/paas/docs/NotificationTargetExportData.md @@ -0,0 +1,23 @@ + +# NotificationTargetExportData + +`org.thingsboard.client.model.NotificationTargetExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/NotificationTemplateExportData.md b/paas/docs/NotificationTemplateExportData.md new file mode 100644 index 00000000..8bd15980 --- /dev/null +++ b/paas/docs/NotificationTemplateExportData.md @@ -0,0 +1,23 @@ + +# NotificationTemplateExportData + +`org.thingsboard.client.model.NotificationTemplateExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/OAuth2ConfigTemplateControllerApi.md b/paas/docs/OAuth2ConfigTemplateControllerApi.md index 13ecaa21..ed3c77ad 100644 --- a/paas/docs/OAuth2ConfigTemplateControllerApi.md +++ b/paas/docs/OAuth2ConfigTemplateControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteClientRegistrationTemplate**](#deleteClientRegistrationTemplate) | **DELETE** /api/oauth2/config/template/{clientRegistrationTemplateId} | Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | -| [**getClientRegistrationTemplates**](#getClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getOAuth2ClientRegistrationTemplates**](#getOAuth2ClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | | [**saveClientRegistrationTemplate**](#saveClientRegistrationTemplate) | **POST** /api/oauth2/config/template | Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | @@ -28,11 +28,11 @@ Client registration template is OAuth2 provider configuration template with defa null (empty response body) -## getClientRegistrationTemplates +## getOAuth2ClientRegistrationTemplates -> List getClientRegistrationTemplates() +> List getOAuth2ClientRegistrationTemplates() -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients diff --git a/paas/docs/OAuth2ControllerApi.md b/paas/docs/OAuth2ControllerApi.md index 61e53ae7..815318b0 100644 --- a/paas/docs/OAuth2ControllerApi.md +++ b/paas/docs/OAuth2ControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**deleteOauth2Client**](#deleteOauth2Client) | **DELETE** /api/oauth2/client/{id} | Delete oauth2 client (deleteOauth2Client) | | [**findOAuth2ClientInfos**](#findOAuth2ClientInfos) | **GET** /api/oauth2/client/infos | Get OAuth2 Client infos (findOAuth2ClientInfos) | -| [**findTenantOAuth2ClientInfosByIdsV2**](#findTenantOAuth2ClientInfosByIdsV2) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) | +| [**findTenantOAuth2ClientInfosByIds**](#findTenantOAuth2ClientInfosByIds) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) | | [**getLoginProcessingUrl**](#getLoginProcessingUrl) | **GET** /api/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getLoginProcessingUrl) | | [**getOAuth2ClientById**](#getOAuth2ClientById) | **GET** /api/oauth2/client/{id} | Get OAuth2 Client by id (getOAuth2ClientById) | | [**getOAuth2Clients**](#getOAuth2Clients) | **POST** /api/noauth/oauth2Clients | Get OAuth2 clients (getOAuth2Clients) | @@ -56,11 +56,11 @@ Get OAuth2 Client infos (findOAuth2ClientInfos) **PageDataOAuth2ClientInfo** -## findTenantOAuth2ClientInfosByIdsV2 +## findTenantOAuth2ClientInfosByIds -> List findTenantOAuth2ClientInfosByIdsV2(clientIds) +> List findTenantOAuth2ClientInfosByIds(clientIds) -Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) +Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/OtaPackageControllerApi.md b/paas/docs/OtaPackageControllerApi.md index 3c90329c..0db0720c 100644 --- a/paas/docs/OtaPackageControllerApi.md +++ b/paas/docs/OtaPackageControllerApi.md @@ -8,7 +8,7 @@ | [**getOtaPackageById**](#getOtaPackageById) | **GET** /api/otaPackage/{otaPackageId} | Get OTA Package (getOtaPackageById) | | [**getOtaPackageInfoById**](#getOtaPackageInfoById) | **GET** /api/otaPackage/info/{otaPackageId} | Get OTA Package Info (getOtaPackageInfoById) | | [**getOtaPackages**](#getOtaPackages) | **GET** /api/otaPackages | Get OTA Package Infos (getOtaPackages) | -| [**getOtaPackages1**](#getOtaPackages1) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos (getOtaPackages) | +| [**getOtaPackagesByDeviceProfileIdAndType**](#getOtaPackagesByDeviceProfileIdAndType) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) | | [**saveOtaPackageData**](#saveOtaPackageData) | **POST** /api/otaPackage/{otaPackageId} | Save OTA Package data (saveOtaPackageData) | | [**saveOtaPackageInfo**](#saveOtaPackageInfo) | **POST** /api/otaPackage | Create Or Update OTA Package Info (saveOtaPackageInfo) | @@ -144,11 +144,11 @@ Returns a page of OTA Package Info objects owned by tenant. You can specify para **PageDataOtaPackageInfo** -## getOtaPackages1 +## getOtaPackagesByDeviceProfileIdAndType -> PageDataOtaPackageInfo getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataOtaPackageInfo getOtaPackagesByDeviceProfileIdAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) -Get OTA Package Infos (getOtaPackages) +Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/QrCodeSettingsControllerApi.md b/paas/docs/QrCodeSettingsControllerApi.md index 37824257..60177b22 100644 --- a/paas/docs/QrCodeSettingsControllerApi.md +++ b/paas/docs/QrCodeSettingsControllerApi.md @@ -3,11 +3,11 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getApplicationRedirect**](#getApplicationRedirect) | **GET** /api/noauth/qr | getApplicationRedirect | -| [**getMergedMobileAppSettings**](#getMergedMobileAppSettings) | **GET** /api/mobile/qr/merged | Get QR code configuration for home page (getMobileAppQrCodeConfig) | +| [**getMergedMobileAppSettings**](#getMergedMobileAppSettings) | **GET** /api/mobile/qr/merged | Get QR code configuration for home page (getMergedMobileAppSettings) | | [**getMobileAppDeepLink**](#getMobileAppDeepLink) | **GET** /api/mobile/qr/deepLink | Get the deep link to the associated mobile application (getMobileAppDeepLink) | -| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getMobileAppSettings) | +| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getQrCodeSettings) | | [**getUserTokenByMobileSecret**](#getUserTokenByMobileSecret) | **GET** /api/noauth/qr/{secret} | Get User Token (getUserTokenByMobileSecret) | -| [**saveQrCodeSettings**](#saveQrCodeSettings) | **POST** /api/mobile/qr/settings | Create Or Update the Mobile application settings (saveMobileAppSettings) | +| [**saveQrCodeSettings**](#saveQrCodeSettings) | **POST** /api/mobile/qr/settings | Create Or Update the Mobile application settings (saveQrCodeSettings) | @@ -33,7 +33,7 @@ getApplicationRedirect > QrCodeSettings getMergedMobileAppSettings() -Get QR code configuration for home page (getMobileAppQrCodeConfig) +Get QR code configuration for home page (getMergedMobileAppSettings) The response payload contains ui configuration of qr code Available for any authorized user. @@ -59,7 +59,7 @@ Fetch the url that takes user to linked mobile application Available for any a > QrCodeSettings getQrCodeSettings() -Get Mobile application settings (getMobileAppSettings) +Get Mobile application settings (getQrCodeSettings) The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. @@ -92,7 +92,7 @@ Returns the token of the User based on the provided secret key. > QrCodeSettings saveQrCodeSettings(qrCodeSettings) -Create Or Update the Mobile application settings (saveMobileAppSettings) +Create Or Update the Mobile application settings (saveQrCodeSettings) The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/paas/docs/QueueStatsControllerApi.md b/paas/docs/QueueStatsControllerApi.md index 4877e79d..f9316c00 100644 --- a/paas/docs/QueueStatsControllerApi.md +++ b/paas/docs/QueueStatsControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getQueueStatsById**](#getQueueStatsById) | **GET** /api/queueStats/{queueStatsId} | Get Queue stats entity by id (getQueueStatsById) | -| [**getQueueStatsByIdsV2**](#getQueueStatsByIdsV2) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIdsV2) | +| [**getQueueStatsByIds**](#getQueueStatsByIds) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIds) | | [**getTenantQueueStats**](#getTenantQueueStats) | **GET** /api/queueStats | Get Queue Stats entities (getTenantQueueStats) | @@ -28,11 +28,11 @@ Fetch the Queue stats object based on the provided Queue stats id. Available f **QueueStats** -## getQueueStatsByIdsV2 +## getQueueStatsByIds -> List getQueueStatsByIdsV2(queueStatsIds) +> List getQueueStatsByIds(queueStatsIds) -Get QueueStats By Ids (getQueueStatsByIdsV2) +Get QueueStats By Ids (getQueueStatsByIds) Fetch the Queue stats objects based on the provided ids. diff --git a/paas/docs/RateLimitsRecipientsConfig.md b/paas/docs/RateLimitsRecipientsConfig.md new file mode 100644 index 00000000..ccfdc7a9 --- /dev/null +++ b/paas/docs/RateLimitsRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RateLimitsRecipientsConfig + +`org.thingsboard.client.model.RateLimitsRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/ReportControllerApi.md b/paas/docs/ReportControllerApi.md index b1826d90..1e5987dd 100644 --- a/paas/docs/ReportControllerApi.md +++ b/paas/docs/ReportControllerApi.md @@ -7,10 +7,10 @@ | [**downloadReport**](#downloadReport) | **GET** /api/v2/report/{reportId}/download | downloadReport | | [**getReportById**](#getReportById) | **GET** /api/v2/report/{reportId} | Get Report (getReportById) | | [**getReportInfos**](#getReportInfos) | **GET** /api/v2/reportInfos/all | getReportInfos | +| [**getReportInfosByIds**](#getReportInfosByIds) | **GET** /api/v2/reportInfos | getReportInfosByIds | | [**getReports**](#getReports) | **GET** /api/v2/reports | getReports | -| [**getReports1**](#getReports1) | **GET** /api/v2/reportInfos | getReports | | [**requestReport**](#requestReport) | **POST** /api/v2/report/request | requestReport | -| [**testReportAndDownload**](#testReportAndDownload) | **POST** /api/v2/report/test | Download test report (downloadTestReport) | +| [**testReportAndDownload**](#testReportAndDownload) | **POST** /api/v2/report/test | Download test report (testReportAndDownload) | @@ -115,31 +115,27 @@ getReportInfos **PageDataReportInfo** -## getReports +## getReportInfosByIds -> PageDataReport getReports(pageSize, page, textSearch, sortProperty, sortOrder) +> List getReportInfosByIds(strReportIds) -getReports +getReportInfosByIds ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | Case-insensitive 'substring' filter based on report's name or customer title | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] | +| **strReportIds** | **List** | A list of report ids, separated by comma ',' | | ### Return type -**PageDataReport** +**List** -## getReports1 +## getReports -> List getReports1(strReportIds) +> PageDataReport getReports(pageSize, page, textSearch, sortProperty, sortOrder) getReports @@ -148,11 +144,15 @@ getReports | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **strReportIds** | **List** | A list of report ids, separated by comma ',' | | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | Case-insensitive 'substring' filter based on report's name or customer title | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] | ### Return type -**List** +**PageDataReport** ## requestReport @@ -177,7 +177,7 @@ requestReport > File testReportAndDownload(reportRequest) -Download test report (downloadTestReport) +Download test report (testReportAndDownload) Generate and download test report. Available for users with 'TENANT_ADMIN' authority. diff --git a/paas/docs/ReportTemplateConfig.md b/paas/docs/ReportTemplateConfig.md index 9c11319c..0c4cda14 100644 --- a/paas/docs/ReportTemplateConfig.md +++ b/paas/docs/ReportTemplateConfig.md @@ -9,9 +9,9 @@ |------------ | ------------- | ------------- | -------------| | **format** | **TbReportFormat** | Report format | | | **filters** | **List\** | | [optional] | -| **timeDataPattern** | **String** | | [optional] | | **namePattern** | **String** | | [optional] | | **components** | **List\** | | [optional] | +| **timeDataPattern** | **String** | | [optional] | | **entityAliases** | **List\** | | [optional] | diff --git a/paas/docs/ReportTemplateExportData.md b/paas/docs/ReportTemplateExportData.md new file mode 100644 index 00000000..02e9324a --- /dev/null +++ b/paas/docs/ReportTemplateExportData.md @@ -0,0 +1,23 @@ + +# ReportTemplateExportData + +`org.thingsboard.client.model.ReportTemplateExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/ResourceShortageRecipientsConfig.md b/paas/docs/ResourceShortageRecipientsConfig.md new file mode 100644 index 00000000..b5749bba --- /dev/null +++ b/paas/docs/ResourceShortageRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ResourceShortageRecipientsConfig + +`org.thingsboard.client.model.ResourceShortageRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/RoleControllerApi.md b/paas/docs/RoleControllerApi.md index faeca91a..3d198385 100644 --- a/paas/docs/RoleControllerApi.md +++ b/paas/docs/RoleControllerApi.md @@ -5,7 +5,7 @@ | [**deleteRole**](#deleteRole) | **DELETE** /api/role/{roleId} | Delete role (deleteRole) | | [**getRoleById**](#getRoleById) | **GET** /api/role/{roleId} | Get Role by Id (getRoleById) | | [**getRoles**](#getRoles) | **GET** /api/roles | Get Roles (getRoles) | -| [**getRolesByIdsV2**](#getRolesByIdsV2) | **GET** /api/roles/list | Get Roles By Ids (getRolesByIdsV2) | +| [**getRolesByIds**](#getRolesByIds) | **GET** /api/roles/list | Get Roles By Ids (getRolesByIds) | | [**saveRole**](#saveRole) | **POST** /api/role | Create Or Update Role (saveRole) | @@ -75,11 +75,11 @@ Returns a page of roles that are available for the current user. Role Contains a **PageDataRole** -## getRolesByIdsV2 +## getRolesByIds -> List getRolesByIdsV2(roleIds) +> List getRolesByIds(roleIds) -Get Roles By Ids (getRolesByIdsV2) +Get Roles By Ids (getRolesByIds) Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/RoleExportData.md b/paas/docs/RoleExportData.md new file mode 100644 index 00000000..3b1ab121 --- /dev/null +++ b/paas/docs/RoleExportData.md @@ -0,0 +1,23 @@ + +# RoleExportData + +`org.thingsboard.client.model.RoleExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/RpcV1ControllerApi.md b/paas/docs/RpcV1ControllerApi.md index 9763fabd..f9983683 100644 --- a/paas/docs/RpcV1ControllerApi.md +++ b/paas/docs/RpcV1ControllerApi.md @@ -2,16 +2,16 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleOneWayDeviceRPCRequest1**](#handleOneWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequest) | -| [**handleTwoWayDeviceRPCRequest1**](#handleTwoWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequest) | +| [**handleOneWayDeviceRPCRequestV1**](#handleOneWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV1) | +| [**handleTwoWayDeviceRPCRequestV1**](#handleTwoWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) | -## handleOneWayDeviceRPCRequest1 +## handleOneWayDeviceRPCRequestV1 -> String handleOneWayDeviceRPCRequest1(deviceId, body) +> String handleOneWayDeviceRPCRequestV1(deviceId, body) -Send one-way RPC request (handleOneWayDeviceRPCRequest) +Send one-way RPC request (handleOneWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -28,11 +28,11 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ **String** -## handleTwoWayDeviceRPCRequest1 +## handleTwoWayDeviceRPCRequestV1 -> String handleTwoWayDeviceRPCRequest1(deviceId, body) +> String handleTwoWayDeviceRPCRequestV1(deviceId, body) -Send two-way RPC request (handleTwoWayDeviceRPCRequest) +Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/RpcV2ControllerApi.md b/paas/docs/RpcV2ControllerApi.md index 577833cf..55de9d16 100644 --- a/paas/docs/RpcV2ControllerApi.md +++ b/paas/docs/RpcV2ControllerApi.md @@ -5,8 +5,8 @@ | [**deleteRpc**](#deleteRpc) | **DELETE** /api/rpc/persistent/{rpcId} | Delete persistent RPC | | [**getPersistedRpc**](#getPersistedRpc) | **GET** /api/rpc/persistent/{rpcId} | Get persistent RPC request | | [**getPersistedRpcByDevice**](#getPersistedRpcByDevice) | **GET** /api/rpc/persistent/device/{deviceId} | Get persistent RPC requests | -| [**handleOneWayDeviceRPCRequest**](#handleOneWayDeviceRPCRequest) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request | -| [**handleTwoWayDeviceRPCRequest**](#handleTwoWayDeviceRPCRequest) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request | +| [**handleOneWayDeviceRPCRequestV2**](#handleOneWayDeviceRPCRequestV2) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV2) | +| [**handleTwoWayDeviceRPCRequestV2**](#handleTwoWayDeviceRPCRequestV2) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) | @@ -76,11 +76,11 @@ Allows to query RPC calls for specific device using pagination. Available for u **String** -## handleOneWayDeviceRPCRequest +## handleOneWayDeviceRPCRequestV2 -> String handleOneWayDeviceRPCRequest(deviceId, body) +> String handleOneWayDeviceRPCRequestV2(deviceId, body) -Send one-way RPC request +Send one-way RPC request (handleOneWayDeviceRPCRequestV2) Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -97,11 +97,11 @@ Sends the one-way remote-procedure call (RPC) request to device. Sends the one-w **String** -## handleTwoWayDeviceRPCRequest +## handleTwoWayDeviceRPCRequestV2 -> String handleTwoWayDeviceRPCRequest(deviceId, body) +> String handleTwoWayDeviceRPCRequestV2(deviceId, body) -Send two-way RPC request +Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/RuleChainControllerApi.md b/paas/docs/RuleChainControllerApi.md index ae23304a..4300dac4 100644 --- a/paas/docs/RuleChainControllerApi.md +++ b/paas/docs/RuleChainControllerApi.md @@ -13,16 +13,16 @@ | [**getRuleChainOutputLabels**](#getRuleChainOutputLabels) | **GET** /api/ruleChain/{ruleChainId}/output/labels | Get Rule Chain output labels (getRuleChainOutputLabels) | | [**getRuleChainOutputLabelsUsage**](#getRuleChainOutputLabelsUsage) | **GET** /api/ruleChain/{ruleChainId}/output/labels/usage | Get output labels usage (getRuleChainOutputLabelsUsage) | | [**getRuleChains**](#getRuleChains) | **GET** /api/ruleChains | Get Rule Chains (getRuleChains) | -| [**getRuleChainsByIdsV2**](#getRuleChainsByIdsV2) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIdsV2) | +| [**getRuleChainsByIds**](#getRuleChainsByIds) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIds) | | [**importRuleChains**](#importRuleChains) | **POST** /api/ruleChains/import | Import Rule Chains | | [**isTbelEnabled**](#isTbelEnabled) | **GET** /api/ruleChain/tbelEnabled | Is TBEL script executor enabled | | [**saveRuleChain**](#saveRuleChain) | **POST** /api/ruleChain | Create Or Update Rule Chain (saveRuleChain) | -| [**saveRuleChain1**](#saveRuleChain1) | **POST** /api/ruleChain/device/default | Create Default Rule Chain | | [**saveRuleChainMetaData**](#saveRuleChainMetaData) | **POST** /api/ruleChain/metadata | Update Rule Chain Metadata | | [**setAutoAssignToEdgeRuleChain**](#setAutoAssignToEdgeRuleChain) | **POST** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) | +| [**setDeviceDefaultRuleChain**](#setDeviceDefaultRuleChain) | **POST** /api/ruleChain/device/default | Create Default Rule Chain (setDeviceDefaultRuleChain) | | [**setEdgeTemplateRootRuleChain**](#setEdgeTemplateRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/edgeTemplateRoot | Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain) | | [**setRootRuleChain**](#setRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/root | Set Root Rule Chain (setRootRuleChain) | -| [**testScript**](#testScript) | **POST** /api/ruleChain/testScript | Test Script function | +| [**testRuleChainScript**](#testRuleChainScript) | **POST** /api/ruleChain/testScript | Test Script function | | [**unassignRuleChainFromEdge**](#unassignRuleChainFromEdge) | **DELETE** /api/edge/{edgeId}/ruleChain/{ruleChainId} | Unassign rule chain from edge (unassignRuleChainFromEdge) | | [**unsetAutoAssignToEdgeRuleChain**](#unsetAutoAssignToEdgeRuleChain) | **DELETE** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain) | @@ -252,11 +252,11 @@ Returns a page of Rule Chains owned by tenant. The rule chain object is lightwei **PageDataRuleChain** -## getRuleChainsByIdsV2 +## getRuleChainsByIds -> List getRuleChainsByIdsV2(ruleChainIds) +> List getRuleChainsByIds(ruleChainIds) -Get Rule Chains By Ids (getRuleChainsByIdsV2) +Get Rule Chains By Ids (getRuleChainsByIds) Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -326,61 +326,61 @@ Create or update the Rule Chain. When creating Rule Chain, platform generates Ru **RuleChain** -## saveRuleChain1 +## saveRuleChainMetaData -> RuleChain saveRuleChain1(defaultRuleChainCreateRequest) +> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) -Create Default Rule Chain +Update Rule Chain Metadata -Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. +Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | +| **ruleChainMetaData** | **RuleChainMetaData** | | | +| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | ### Return type -**RuleChain** +**RuleChainMetaData** -## saveRuleChainMetaData +## setAutoAssignToEdgeRuleChain -> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) +> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) -Update Rule Chain Metadata +Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) -Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. +Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainMetaData** | **RuleChainMetaData** | | | -| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | +| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type -**RuleChainMetaData** +**RuleChain** -## setAutoAssignToEdgeRuleChain +## setDeviceDefaultRuleChain -> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) +> RuleChain setDeviceDefaultRuleChain(defaultRuleChainCreateRequest) -Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) +Create Default Rule Chain (setDeviceDefaultRuleChain) -Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. +Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | ### Return type @@ -427,9 +427,9 @@ Makes the rule chain to be root rule chain. Updates previous root rule chain as **RuleChain** -## testScript +## testRuleChainScript -> com.fasterxml.jackson.databind.JsonNode testScript(body, scriptLang) +> com.fasterxml.jackson.databind.JsonNode testRuleChainScript(body, scriptLang) Test Script function diff --git a/paas/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md b/paas/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md new file mode 100644 index 00000000..47641ea3 --- /dev/null +++ b/paas/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RuleEngineComponentLifecycleEventRecipientsConfig + +`org.thingsboard.client.model.RuleEngineComponentLifecycleEventRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/RuleEngineControllerApi.md b/paas/docs/RuleEngineControllerApi.md index b5997660..68f52a68 100644 --- a/paas/docs/RuleEngineControllerApi.md +++ b/paas/docs/RuleEngineControllerApi.md @@ -2,18 +2,18 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleRuleEngineRequest**](#handleRuleEngineRequest) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest1**](#handleRuleEngineRequest1) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest2**](#handleRuleEngineRequest2) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest3**](#handleRuleEngineRequest3) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequest) | +| [**handleRuleEngineRequestForEntity**](#handleRuleEngineRequestForEntity) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequestForEntity) | +| [**handleRuleEngineRequestForEntityWithQueueAndTimeout**](#handleRuleEngineRequestForEntityWithQueueAndTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) | +| [**handleRuleEngineRequestForEntityWithTimeout**](#handleRuleEngineRequestForEntityWithTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) | +| [**handleRuleEngineRequestForUser**](#handleRuleEngineRequestForUser) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequestForUser) | -## handleRuleEngineRequest +## handleRuleEngineRequestForEntity -> String handleRuleEngineRequest(entityType, entityId, body) +> String handleRuleEngineRequestForEntity(entityType, entityId, body) -Push entity message to the rule engine (handleRuleEngineRequest) +Push entity message to the rule engine (handleRuleEngineRequestForEntity) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -31,13 +31,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest1 +## handleRuleEngineRequestForEntityWithQueueAndTimeout -> String handleRuleEngineRequest1(entityType, entityId, timeout, body) +> String handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body) -Push entity message with timeout to the rule engine (handleRuleEngineRequest) +Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -46,6 +46,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -54,13 +55,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest2 +## handleRuleEngineRequestForEntityWithTimeout -> String handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body) +> String handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body) -Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) +Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -69,7 +70,6 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -78,11 +78,11 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest3 +## handleRuleEngineRequestForUser -> String handleRuleEngineRequest3(body) +> String handleRuleEngineRequestForUser(body) -Push user message to the rule engine (handleRuleEngineRequest) +Push user message to the rule engine (handleRuleEngineRequestForUser) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). diff --git a/paas/docs/SchedulerEventControllerApi.md b/paas/docs/SchedulerEventControllerApi.md index 1e8ce70d..43f52799 100644 --- a/paas/docs/SchedulerEventControllerApi.md +++ b/paas/docs/SchedulerEventControllerApi.md @@ -6,13 +6,13 @@ | [**deleteSchedulerEvent**](#deleteSchedulerEvent) | **DELETE** /api/schedulerEvent/{schedulerEventId} | Delete Scheduler Event (deleteSchedulerEvent) | | [**enableSchedulerEvent**](#enableSchedulerEvent) | **PUT** /api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue} | Enable or disable Scheduler Event (enableSchedulerEvent) | | [**getAllEdgeSchedulerEvents**](#getAllEdgeSchedulerEvents) | **GET** /api/edge/{edgeId}/allSchedulerEvents | Get All Edge Scheduler Events (getAllEdgeSchedulerEvents) | -| [**getAllSchedulerEventsV2**](#getAllSchedulerEventsV2) | **GET** /api/schedulerEvents/all | Get all scheduler events (getAllSchedulerEventsV2) | +| [**getAllSchedulerEvents**](#getAllSchedulerEvents) | **GET** /api/schedulerEvents/all | Get all scheduler events (getAllSchedulerEvents) | | [**getEdgeSchedulerEvents**](#getEdgeSchedulerEvents) | **GET** /api/edge/{edgeId}/schedulerEvents | Get Edge Scheduler Events (getEdgeSchedulerEvents) | | [**getScheduledReportEvents**](#getScheduledReportEvents) | **GET** /api/scheduledReports | Get Scheduled Report Events (getScheduledReportEvents) | | [**getSchedulerEventById**](#getSchedulerEventById) | **GET** /api/schedulerEvent/{schedulerEventId} | Get Scheduler Event (getSchedulerEventById) | | [**getSchedulerEventInfoById**](#getSchedulerEventInfoById) | **GET** /api/schedulerEvent/info/{schedulerEventId} | Get Scheduler Event With Customer Info (getSchedulerEventInfoById) | | [**getSchedulerEvents**](#getSchedulerEvents) | **GET** /api/schedulerEvents | Get scheduler events (getSchedulerEvents) | -| [**getSchedulerEventsByIdsV2**](#getSchedulerEventsByIdsV2) | **GET** /api/schedulerEvents/list | Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) | +| [**getSchedulerEventsByIds**](#getSchedulerEventsByIds) | **GET** /api/schedulerEvents/list | Get Scheduler Events By Ids (getSchedulerEventsByIds) | | [**getSchedulerEventsByRange**](#getSchedulerEventsByRange) | **GET** /api/schedulerEvents/startTime/{startTime}/endTime/{endTime} | Get scheduler events (getSchedulerEventsByRange) | | [**saveSchedulerEvent**](#saveSchedulerEvent) | **POST** /api/schedulerEvent | Save Scheduler Event (saveSchedulerEvent) | | [**unassignSchedulerEventFromEdge**](#unassignSchedulerEventFromEdge) | **DELETE** /api/edge/{edgeId}/schedulerEvent/{schedulerEventId} | Unassign scheduler event from edge (unassignSchedulerEventFromEdge) | @@ -101,11 +101,11 @@ Fetch the list of Scheduler Event Info objects based on the provided Edge entity **List** -## getAllSchedulerEventsV2 +## getAllSchedulerEvents -> List getAllSchedulerEventsV2(type) +> List getAllSchedulerEvents(type) -Get all scheduler events (getAllSchedulerEventsV2) +Get all scheduler events (getAllSchedulerEvents) Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -239,11 +239,11 @@ Requested scheduler events must be owned by tenant or assigned to customer which **PageDataSchedulerEventWithCustomerInfo** -## getSchedulerEventsByIdsV2 +## getSchedulerEventsByIds -> List getSchedulerEventsByIdsV2(schedulerEventIds) +> List getSchedulerEventsByIds(schedulerEventIds) -Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) +Get Scheduler Events By Ids (getSchedulerEventsByIds) Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/paas/docs/TaskProcessingFailureRecipientsConfig.md b/paas/docs/TaskProcessingFailureRecipientsConfig.md new file mode 100644 index 00000000..adf0cf8e --- /dev/null +++ b/paas/docs/TaskProcessingFailureRecipientsConfig.md @@ -0,0 +1,24 @@ + +# TaskProcessingFailureRecipientsConfig + +`org.thingsboard.client.model.TaskProcessingFailureRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/TbResourceControllerApi.md b/paas/docs/TbResourceControllerApi.md index 075c8088..6c43de22 100644 --- a/paas/docs/TbResourceControllerApi.md +++ b/paas/docs/TbResourceControllerApi.md @@ -8,15 +8,15 @@ | [**downloadLwm2mResourceIfChanged**](#downloadLwm2mResourceIfChanged) | **GET** /api/resource/lwm2m/{resourceId}/download | Download LWM2M Resource (downloadLwm2mResourceIfChanged) | | [**downloadPkcs12ResourceIfChanged**](#downloadPkcs12ResourceIfChanged) | **GET** /api/resource/pkcs12/{resourceId}/download | Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged) | | [**downloadResource**](#downloadResource) | **GET** /api/resource/{resourceId}/download | Download Resource (downloadResource) | -| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResource) | +| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResourceIfChanged) | | [**getLwm2mListObjects**](#getLwm2mListObjects) | **GET** /api/resource/lwm2m | Get LwM2M Objects (getLwm2mListObjects) | | [**getLwm2mListObjectsPage**](#getLwm2mListObjectsPage) | **GET** /api/resource/lwm2m/page | Get LwM2M Objects (getLwm2mListObjectsPage) | | [**getResourceById**](#getResourceById) | **GET** /api/resource/{resourceId} | Get Resource (getResourceById) | | [**getResourceInfo**](#getResourceInfo) | **GET** /api/resource/{resourceType}/{scope}/{key}/info | Get resource info (getResourceInfo) | | [**getResourceInfoById**](#getResourceInfoById) | **GET** /api/resource/info/{resourceId} | Get Resource Info (getResourceInfoById) | | [**getResources**](#getResources) | **GET** /api/resource | Get Resource Infos (getResources) | -| [**getSystemOrTenantResourcesByIdsV2**](#getSystemOrTenantResourcesByIdsV2) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) | -| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getAllResources) | +| [**getSystemOrTenantResourcesByIds**](#getSystemOrTenantResourcesByIds) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIds) | +| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getTenantResources) | | [**saveResource**](#saveResource) | **POST** /api/resource | Create Or Update Resource (saveResource) | | [**updateResourceData**](#updateResourceData) | **PUT** /api/resource/{id}/data | updateResourceData | | [**updateResourceInfo**](#updateResourceInfo) | **PUT** /api/resource/{id}/info | updateResourceInfo | @@ -153,7 +153,7 @@ Download Resource based on the provided Resource Id. Available for users with ' > File downloadResourceIfChanged(resourceType, scope, key, ifNoneMatch) -Download resource (downloadResource) +Download resource (downloadResourceIfChanged) Download resource with a given type and key for the given scope Available for any authorized user. @@ -306,11 +306,11 @@ Returns a page of Resource Info objects owned by tenant or sysadmin. You can spe **PageDataTbResourceInfo** -## getSystemOrTenantResourcesByIdsV2 +## getSystemOrTenantResourcesByIds -> List getSystemOrTenantResourcesByIdsV2(resourceIds) +> List getSystemOrTenantResourcesByIds(resourceIds) -Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) +Get Resource Infos by ids (getSystemOrTenantResourcesByIds) ### Parameters @@ -328,7 +328,7 @@ Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) > PageDataTbResourceInfo getTenantResources(pageSize, page, textSearch, sortProperty, sortOrder) -Get All Resource Infos (getAllResources) +Get All Resource Infos (getTenantResources) Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. diff --git a/paas/docs/TbResourceExportData.md b/paas/docs/TbResourceExportData.md new file mode 100644 index 00000000..22a0bee1 --- /dev/null +++ b/paas/docs/TbResourceExportData.md @@ -0,0 +1,23 @@ + +# TbResourceExportData + +`org.thingsboard.client.model.TbResourceExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/TenantControllerApi.md b/paas/docs/TenantControllerApi.md index b247a445..0039f3b0 100644 --- a/paas/docs/TenantControllerApi.md +++ b/paas/docs/TenantControllerApi.md @@ -7,7 +7,7 @@ | [**getTenantInfoById**](#getTenantInfoById) | **GET** /api/tenant/info/{tenantId} | Get Tenant Info (getTenantInfoById) | | [**getTenantInfos**](#getTenantInfos) | **GET** /api/tenantInfos | Get Tenants Info (getTenants) | | [**getTenants**](#getTenants) | **GET** /api/tenants | Get Tenants (getTenants) | -| [**getTenantsByIdsV2**](#getTenantsByIdsV2) | **GET** /api/tenants/list | Get Tenants By Ids (getTenantsByIdsV2) | +| [**getTenantsByIds**](#getTenantsByIds) | **GET** /api/tenants/list | Get Tenants By Ids (getTenantsByIds) | | [**saveTenant**](#saveTenant) | **POST** /api/tenant | Create Or update Tenant (saveTenant) | @@ -120,11 +120,11 @@ Returns a page of tenants registered in the platform. You can specify parameters **PageDataTenant** -## getTenantsByIdsV2 +## getTenantsByIds -> List getTenantsByIdsV2(tenantIds) +> List getTenantsByIds(tenantIds) -Get Tenants By Ids (getTenantsByIdsV2) +Get Tenants By Ids (getTenantsByIds) Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. diff --git a/paas/docs/TsKvEntry.md b/paas/docs/TsKvEntry.md index 957f68ec..89ae6c19 100644 --- a/paas/docs/TsKvEntry.md +++ b/paas/docs/TsKvEntry.md @@ -14,9 +14,9 @@ | **longValue** | **Long** | | [optional] | | **booleanValue** | **Boolean** | | [optional] | | **valueAsString** | **String** | | [optional] | -| **strValue** | **String** | | [optional] | | **dataType** | **DataType** | | [optional] | | **jsonValue** | **String** | | [optional] | +| **strValue** | **String** | | [optional] | | **version** | **Long** | | [optional] | diff --git a/paas/docs/TwoFactorAuthConfigControllerApi.md b/paas/docs/TwoFactorAuthConfigControllerApi.md index 75ae0146..1400742e 100644 --- a/paas/docs/TwoFactorAuthConfigControllerApi.md +++ b/paas/docs/TwoFactorAuthConfigControllerApi.md @@ -5,7 +5,7 @@ | [**deleteTwoFaAccountConfig**](#deleteTwoFaAccountConfig) | **DELETE** /api/2fa/account/config | Delete 2FA account config (deleteTwoFaAccountConfig) | | [**generateTwoFaAccountConfig**](#generateTwoFaAccountConfig) | **POST** /api/2fa/account/config/generate | Generate 2FA account config (generateTwoFaAccountConfig) | | [**getAccountTwoFaSettings**](#getAccountTwoFaSettings) | **GET** /api/2fa/account/settings | Get account 2FA settings (getAccountTwoFaSettings) | -| [**getAvailableTwoFaProviders1**](#getAvailableTwoFaProviders1) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderTypes**](#getAvailableTwoFaProviderTypes) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderTypes) | | [**getPlatformTwoFaSettings**](#getPlatformTwoFaSettings) | **GET** /api/2fa/settings | Get platform 2FA settings (getPlatformTwoFaSettings) | | [**savePlatformTwoFaSettings**](#savePlatformTwoFaSettings) | **POST** /api/2fa/settings | Save platform 2FA settings (savePlatformTwoFaSettings) | | [**submitTwoFaAccountConfig**](#submitTwoFaAccountConfig) | **POST** /api/2fa/account/config/submit | Submit 2FA account config (submitTwoFaAccountConfig) | @@ -67,11 +67,11 @@ Get user's account 2FA configuration. Configuration contains configs for differe **AccountTwoFaSettings** -## getAvailableTwoFaProviders1 +## getAvailableTwoFaProviderTypes -> List getAvailableTwoFaProviders1() +> List getAvailableTwoFaProviderTypes() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderTypes) Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. diff --git a/paas/docs/TwoFactorAuthControllerApi.md b/paas/docs/TwoFactorAuthControllerApi.md index 2030e77e..c1597f9b 100644 --- a/paas/docs/TwoFactorAuthControllerApi.md +++ b/paas/docs/TwoFactorAuthControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**authenticateByTwoFaConfigurationToken**](#authenticateByTwoFaConfigurationToken) | **POST** /api/auth/2fa/login | Get regular token pair after successfully configuring 2FA | | [**checkTwoFaVerificationCode**](#checkTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/check | Check 2FA verification code (checkTwoFaVerificationCode) | -| [**getAvailableTwoFaProviders**](#getAvailableTwoFaProviders) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderInfos**](#getAvailableTwoFaProviderInfos) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderInfos) | | [**requestTwoFaVerificationCode**](#requestTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/send | Request 2FA verification code (requestTwoFaVerificationCode) | @@ -43,11 +43,11 @@ Checks 2FA verification code, and if it is correct the method returns a regular **JwtPair** -## getAvailableTwoFaProviders +## getAvailableTwoFaProviderInfos -> List getAvailableTwoFaProviders() +> List getAvailableTwoFaProviderInfos() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderInfos) Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` diff --git a/paas/docs/UserControllerApi.md b/paas/docs/UserControllerApi.md index d164fb00..ce773f20 100644 --- a/paas/docs/UserControllerApi.md +++ b/paas/docs/UserControllerApi.md @@ -2,9 +2,9 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**deleteGeneralUserSettings**](#deleteGeneralUserSettings) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteGeneralUserSettings) | | [**deleteUser**](#deleteUser) | **DELETE** /api/user/{userId} | Delete User (deleteUser) | -| [**deleteUserSettings**](#deleteUserSettings) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings (deleteUserSettings) | -| [**deleteUserSettings1**](#deleteUserSettings1) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteUserSettings) | +| [**deleteUserSettingsByType**](#deleteUserSettingsByType) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings by type (deleteUserSettingsByType) | | [**findUsersByQuery**](#findUsersByQuery) | **GET** /api/users/info | Find users by query (findUsersByQuery) | | [**getActivationLink**](#getActivationLink) | **GET** /api/user/{userId}/activationLink | Get activation link (getActivationLink) | | [**getActivationLinkInfo**](#getActivationLinkInfo) | **GET** /api/user/{userId}/activationLinkInfo | Get activation link info (getActivationLinkInfo) | @@ -12,7 +12,7 @@ | [**getAllUserInfos**](#getAllUserInfos) | **GET** /api/userInfos/all | Get All User Infos for current user (getAllUserInfos) | | [**getCustomerUserInfos**](#getCustomerUserInfos) | **GET** /api/customer/{customerId}/userInfos | Get Customer user Infos (getCustomerUserInfos) | | [**getCustomerUsers**](#getCustomerUsers) | **GET** /api/customer/{customerId}/users | Get Customer Users (getCustomerUsers) | -| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getUserSettings) | +| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getGeneralUserSettings) | | [**getLastVisitedDashboards**](#getLastVisitedDashboards) | **GET** /api/user/lastVisitedDashboards | Get information about last visited and starred dashboards (getLastVisitedDashboards) | | [**getMobileSession**](#getMobileSession) | **GET** /api/user/mobile/session | getMobileSession | | [**getTenantAdmins**](#getTenantAdmins) | **GET** /api/tenant/{tenantId}/users | Get Tenant Users (getTenantAdmins) | @@ -22,11 +22,11 @@ | [**getUserToken**](#getUserToken) | **GET** /api/user/{userId}/token | Get User Token (getUserToken) | | [**getUserUsers**](#getUserUsers) | **GET** /api/user/users | Get Users (getUsers) | | [**getUsersByEntityGroupId**](#getUsersByEntityGroupId) | **GET** /api/entityGroup/{entityGroupId}/users | Get users by Entity Group Id (getUsersByEntityGroupId) | -| [**getUsersByIdsV2**](#getUsersByIdsV2) | **GET** /api/users/list | Get Users By Ids (getUsersByIdsV2) | +| [**getUsersByIds**](#getUsersByIds) | **GET** /api/users/list | Get Users By Ids (getUsersByIds) | | [**getUsersForAssign**](#getUsersForAssign) | **GET** /api/users/assign/{alarmId} | Get usersForAssign (getUsersForAssign) | | [**isUserTokenAccessEnabled**](#isUserTokenAccessEnabled) | **GET** /api/user/tokenAccessEnabled | Check Token Access Enabled (isUserTokenAccessEnabled) | -| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (saveUserSettings) | -| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (saveUserSettings) | +| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (putGeneralUserSettings) | +| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (putUserSettings) | | [**removeMobileSession**](#removeMobileSession) | **DELETE** /api/user/mobile/session | removeMobileSession | | [**reportUserDashboardAction**](#reportUserDashboardAction) | **GET** /api/user/dashboards/{dashboardId}/{action} | Report action of User over the dashboard (reportUserDashboardAction) | | [**saveMobileSession**](#saveMobileSession) | **POST** /api/user/mobile/session | saveMobileSession | @@ -37,52 +37,51 @@ -## deleteUser +## deleteGeneralUserSettings -> deleteUser(userId) +> deleteGeneralUserSettings(paths) -Delete User (deleteUser) +Delete user settings (deleteGeneralUserSettings) -Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). +Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **paths** | **String** | paths | | ### Return type null (empty response body) -## deleteUserSettings +## deleteUser -> deleteUserSettings(paths, type) +> deleteUser(userId) -Delete user settings (deleteUserSettings) +Delete User (deleteUser) -Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter +Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **paths** | **String** | paths | | -| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | +| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type null (empty response body) -## deleteUserSettings1 +## deleteUserSettingsByType -> deleteUserSettings1(paths) +> deleteUserSettingsByType(paths, type) -Delete user settings (deleteUserSettings) +Delete user settings by type (deleteUserSettingsByType) Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter @@ -92,6 +91,7 @@ Delete user settings by specifying list of json element xpaths. Example: to de | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **paths** | **String** | paths | | +| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | ### Return type @@ -266,7 +266,7 @@ Returns a page of users owned by customer. You can specify parameters to filter > com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() -Get user settings (getUserSettings) +Get user settings (getGeneralUserSettings) Fetch the User settings based on authorized user. @@ -460,11 +460,11 @@ Returns a page of user objects that belongs to specified Entity Group Id. You ca **PageDataUser** -## getUsersByIdsV2 +## getUsersByIds -> List getUsersByIdsV2(userIds) +> List getUsersByIds(userIds) -Get Users By Ids (getUsersByIdsV2) +Get Users By Ids (getUsersByIds) Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -522,7 +522,7 @@ Checks that the system is configured to allow administrators to impersonate them > putGeneralUserSettings(body) -Update user settings (saveUserSettings) +Update user settings (putGeneralUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} @@ -542,7 +542,7 @@ null (empty response body) > putUserSettings(type, body) -Update user settings (saveUserSettings) +Update user settings (putUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} diff --git a/paas/docs/WidgetTypeControllerApi.md b/paas/docs/WidgetTypeControllerApi.md index e707a1cf..9616cc8d 100644 --- a/paas/docs/WidgetTypeControllerApi.md +++ b/paas/docs/WidgetTypeControllerApi.md @@ -4,9 +4,9 @@ |------------- | ------------- | -------------| | [**deleteWidgetType**](#deleteWidgetType) | **DELETE** /api/widgetType/{widgetTypeId} | Delete widget type (deleteWidgetType) | | [**getBundleWidgetTypeFqns**](#getBundleWidgetTypeFqns) | **GET** /api/widgetTypeFqns | Get all Widget type fqns for specified Bundle (getBundleWidgetTypeFqns) | +| [**getBundleWidgetTypes**](#getBundleWidgetTypes) | **GET** /api/widgetsBundle/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getBundleWidgetTypesDetails**](#getBundleWidgetTypesDetails) | **GET** /api/widgetTypesDetails | Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) | | [**getBundleWidgetTypesInfos**](#getBundleWidgetTypesInfos) | **GET** /api/widgetTypesInfos | Get Widget Type Info objects (getBundleWidgetTypesInfos) | -| [**getBundleWidgetTypesV2**](#getBundleWidgetTypesV2) | **GET** /api/widgetsBundles/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getWidgetType**](#getWidgetType) | **GET** /api/widgetType | Get Widget Type (getWidgetType) | | [**getWidgetTypeById**](#getWidgetTypeById) | **GET** /api/widgetType/{widgetTypeId} | Get Widget Type Details (getWidgetTypeById) | | [**getWidgetTypeInfoById**](#getWidgetTypeInfoById) | **GET** /api/widgetTypeInfo/{widgetTypeId} | Get Widget Type Info (getWidgetTypeInfoById) | @@ -55,6 +55,26 @@ Returns an array of Widget Type fqns that belong to specified Widget Bundle. Av **List** +## getBundleWidgetTypes + +> List getBundleWidgetTypes(widgetsBundleId) + +Get all Widget types for specified Bundle (getBundleWidgetTypes) + +Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **widgetsBundleId** | **String** | Widget Bundle Id | | + +### Return type + +**List** + + ## getBundleWidgetTypesDetails > List getBundleWidgetTypesDetails(widgetsBundleId, includeResources) @@ -104,26 +124,6 @@ Get the Widget Type Info objects based on the provided parameters. Widget Type I **PageDataWidgetTypeInfo** -## getBundleWidgetTypesV2 - -> List getBundleWidgetTypesV2(widgetsBundleId) - -Get all Widget types for specified Bundle (getBundleWidgetTypes) - -Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **widgetsBundleId** | **String** | Widget Bundle Id | | - -### Return type - -**List** - - ## getWidgetType > WidgetType getWidgetType(fqn) diff --git a/paas/docs/WidgetsBundleControllerApi.md b/paas/docs/WidgetsBundleControllerApi.md index e6dd8200..b7635c86 100644 --- a/paas/docs/WidgetsBundleControllerApi.md +++ b/paas/docs/WidgetsBundleControllerApi.md @@ -3,10 +3,10 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteWidgetsBundle**](#deleteWidgetsBundle) | **DELETE** /api/widgetsBundle/{widgetsBundleId} | Delete widgets bundle (deleteWidgetsBundle) | +| [**getAllWidgetsBundles**](#getAllWidgetsBundles) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getAllWidgetsBundles) | | [**getWidgetsBundleById**](#getWidgetsBundleById) | **GET** /api/widgetsBundle/{widgetsBundleId} | Get Widget Bundle (getWidgetsBundleById) | | [**getWidgetsBundles**](#getWidgetsBundles) | **GET** /api/widgetsBundles | Get Widget Bundles (getWidgetsBundles) | | [**getWidgetsBundlesList**](#getWidgetsBundlesList) | **GET** /api/widgetsBundles/list | Get Widgets Bundles By Ids (getWidgetsBundlesList) | -| [**getWidgetsBundlesV2**](#getWidgetsBundlesV2) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getWidgetsBundlesV2) | | [**saveWidgetsBundle**](#saveWidgetsBundle) | **POST** /api/widgetsBundle | Create Or Update Widget Bundle (saveWidgetsBundle) | | [**updateWidgetsBundleWidgetFqns**](#updateWidgetsBundleWidgetFqns) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns | Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns) | | [**updateWidgetsBundleWidgetTypes**](#updateWidgetsBundleWidgetTypes) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypes | Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes) | @@ -33,6 +33,19 @@ Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause null (empty response body) +## getAllWidgetsBundles + +> List getAllWidgetsBundles() + +Get all Widget Bundles (getAllWidgetsBundles) + +Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + +### Return type + +**List** + + ## getWidgetsBundleById > WidgetsBundle getWidgetsBundleById(widgetsBundleId, inlineImages) @@ -101,19 +114,6 @@ Requested widgets bundles must be system level or owned by tenant of the user wh **List** -## getWidgetsBundlesV2 - -> List getWidgetsBundlesV2() - -Get all Widget Bundles (getWidgetsBundlesV2) - -Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - -### Return type - -**List** - - ## saveWidgetsBundle > WidgetsBundle saveWidgetsBundle(widgetsBundle) diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index 74a79ae6..9e714d18 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -513,10 +513,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -671,10 +671,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -812,10 +812,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -962,10 +962,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1112,10 +1112,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1262,10 +1262,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1420,10 +1420,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1570,10 +1570,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1585,7 +1585,7 @@ ], "summary": "Redirect user to mail provider login page. ", "description": "After user logged in and provided accessprovider sends authorization code to specified redirect uri.)", - "operationId": "getAuthorizationUrl", + "operationId": "getMailOAuth2AuthorizationUrl", "responses": { "200": { "description": "OK", @@ -1720,10 +1720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1733,8 +1733,8 @@ "tags": [ "admin-controller" ], - "summary": "codeProcessingUrl", - "operationId": "codeProcessingUrl", + "summary": "handleMailOAuth2Callback", + "operationId": "handleMailOAuth2Callback", "parameters": [ { "name": "code", @@ -1880,10 +1880,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2030,10 +2030,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2180,10 +2180,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2338,10 +2338,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2479,10 +2479,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2632,10 +2632,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2782,10 +2782,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2931,10 +2931,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3081,10 +3081,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -3239,10 +3239,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3400,10 +3400,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3553,10 +3553,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3706,10 +3706,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3877,10 +3877,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4027,10 +4027,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4177,10 +4177,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4190,8 +4190,8 @@ "tags": [ "ai-audit-log-controller" ], - "summary": "getAuditLogs", - "operationId": "getAuditLogs_1", + "summary": "getAiAuditLogs", + "operationId": "getAiAuditLogs", "parameters": [ { "name": "sourceId", @@ -4346,10 +4346,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4495,10 +4495,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4652,10 +4652,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4805,10 +4805,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4966,10 +4966,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5136,10 +5136,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5296,10 +5296,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -5475,10 +5475,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5684,10 +5684,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -5842,10 +5842,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6002,10 +6002,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6165,10 +6165,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -6326,10 +6326,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6485,10 +6485,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6692,10 +6692,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -6862,10 +6862,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7025,10 +7025,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7186,10 +7186,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7396,10 +7396,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7557,10 +7557,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7751,10 +7751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7912,10 +7912,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -8071,10 +8071,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8232,10 +8232,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8393,10 +8393,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8563,10 +8563,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8724,10 +8724,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8737,9 +8737,9 @@ "tags": [ "alarm-controller" ], - "summary": "Get Alarms (getAlarms)", + "summary": "Get Alarms (getAlarmsByEntity)", "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarms", + "operationId": "getAlarmsByEntity", "parameters": [ { "name": "entityType", @@ -9024,10 +9024,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9306,10 +9306,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9616,10 +9616,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9908,10 +9908,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10068,10 +10068,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10222,10 +10222,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10394,10 +10394,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10565,10 +10565,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10783,10 +10783,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10997,10 +10997,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11157,10 +11157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11318,10 +11318,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11472,10 +11472,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11633,10 +11633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -11785,10 +11785,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12013,10 +12013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12180,10 +12180,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -12191,9 +12191,9 @@ "tags": [ "asset-controller" ], - "summary": "Find related assets (findByQuery)", + "summary": "Find related assets (findAssetsByQuery)", "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findByQuery_4", + "operationId": "findAssetsByQuery", "requestBody": { "content": { "application/json": { @@ -12341,10 +12341,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12578,10 +12578,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12806,10 +12806,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13025,10 +13025,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13038,7 +13038,7 @@ "tags": [ "asset-controller" ], - "summary": "Get Tenant Asset (getTenantAsset)", + "summary": "Get Tenant Asset (getTenantAssetByName)", "description": "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.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", "operationId": "getTenantAssetByName", "parameters": [ @@ -13186,10 +13186,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13405,10 +13405,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13633,10 +13633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13793,10 +13793,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13958,10 +13958,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14128,10 +14128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -14280,10 +14280,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14441,10 +14441,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14591,10 +14591,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14752,10 +14752,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14961,10 +14961,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14974,9 +14974,9 @@ "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profiles By Ids (getAssetProfilesByIdsV2)", + "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetProfilesByIdsV2", + "operationId": "getAssetProfilesByIds", "parameters": [ { "name": "assetProfileIds", @@ -15128,10 +15128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15337,10 +15337,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15577,10 +15577,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15826,10 +15826,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16084,10 +16084,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16333,10 +16333,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16493,10 +16493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16636,10 +16636,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16786,10 +16786,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17835,10 +17835,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17848,8 +17848,8 @@ "tags": [ "billing-endpoint-controller" ], - "summary": "sendActivationEmail", - "operationId": "sendActivationEmail_1", + "summary": "sendBillingActivationEmail", + "operationId": "sendBillingActivationEmail", "requestBody": { "content": { "application/json": { @@ -17987,10 +17987,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18139,10 +18139,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18291,10 +18291,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18440,10 +18440,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18589,10 +18589,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18738,10 +18738,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18890,10 +18890,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19042,10 +19042,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19194,10 +19194,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19346,10 +19346,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19585,10 +19585,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19598,9 +19598,9 @@ "tags": [ "blob-entity-controller" ], - "summary": "Get Blob Entities By Ids (getBlobEntitiesByIdsV2)", + "summary": "Get Blob Entities By Ids (getBlobEntitiesByIds)", "description": "Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getBlobEntitiesByIdsV2", + "operationId": "getBlobEntitiesByIds", "parameters": [ { "name": "blobEntityIds", @@ -19752,10 +19752,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19913,10 +19913,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20067,10 +20067,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20229,10 +20229,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20390,10 +20390,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20405,7 +20405,7 @@ ], "summary": "Test Script expression", "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript_1", + "operationId": "testCalculatedFieldScript", "requestBody": { "description": "Test calculated field TBEL expression.", "content": { @@ -20551,10 +20551,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20711,10 +20711,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -20862,10 +20862,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21022,10 +21022,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21200,10 +21200,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21360,10 +21360,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21520,10 +21520,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21691,10 +21691,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21704,9 +21704,9 @@ "tags": [ "calculated-field-controller" ], - "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2)", + "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", "description": "Fetch the Calculated Fields based on the provided Entity Id.", - "operationId": "getCalculatedFieldsByEntityIdV2", + "operationId": "getCalculatedFieldsByEntityId", "parameters": [ { "name": "entityType", @@ -21925,10 +21925,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22179,10 +22179,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22382,10 +22382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22531,10 +22531,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22680,10 +22680,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22829,10 +22829,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22978,10 +22978,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22991,8 +22991,8 @@ "tags": [ "cloud-endpoint-controller" ], - "summary": "tenantWhiteLabelingAllowed", - "operationId": "tenantWhiteLabelingAllowed_1", + "summary": "checkTenantWhiteLabelingAllowed", + "operationId": "checkTenantWhiteLabelingAllowed", "responses": { "200": { "description": "OK" @@ -23120,10 +23120,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23281,10 +23281,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23461,10 +23461,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23645,10 +23645,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23806,10 +23806,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23978,10 +23978,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24150,10 +24150,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24322,10 +24322,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24483,10 +24483,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -24635,10 +24635,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24833,10 +24833,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25061,10 +25061,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25074,9 +25074,9 @@ "tags": [ "converter-controller" ], - "summary": "Get Converters By Ids (getConvertersByIdsV2)", + "summary": "Get Converters By Ids (getConvertersByIds)", "description": "Requested converters must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getConvertersByIdsV2", + "operationId": "getConvertersByIds", "parameters": [ { "name": "converterIds", @@ -25228,10 +25228,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25428,10 +25428,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25636,10 +25636,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25812,10 +25812,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25988,10 +25988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26164,10 +26164,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26340,10 +26340,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26516,10 +26516,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26692,10 +26692,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26845,10 +26845,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -27026,10 +27026,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27251,10 +27251,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27422,10 +27422,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27587,10 +27587,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27749,10 +27749,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -27919,10 +27919,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28081,10 +28081,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28247,10 +28247,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28430,10 +28430,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28591,10 +28591,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28752,10 +28752,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -28914,10 +28914,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -29066,10 +29066,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -29228,10 +29228,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29400,10 +29400,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29563,10 +29563,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29777,10 +29777,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29938,10 +29938,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30099,10 +30099,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -30251,10 +30251,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30479,10 +30479,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30640,10 +30640,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30801,10 +30801,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31020,10 +31020,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31230,10 +31230,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31243,9 +31243,9 @@ "tags": [ "customer-controller" ], - "summary": "Get customers by Customer Ids (getCustomersByIdsV2)", + "summary": "Get customers by Customer Ids (getCustomersByIds)", "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomersByIdsV2", + "operationId": "getCustomersByIds", "parameters": [ { "name": "customerIds", @@ -31397,10 +31397,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31616,10 +31616,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31777,10 +31777,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31987,10 +31987,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32137,10 +32137,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -32288,10 +32288,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32513,10 +32513,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32704,10 +32704,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32857,10 +32857,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33007,10 +33007,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33168,10 +33168,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33320,10 +33320,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33472,10 +33472,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33643,10 +33643,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -33795,10 +33795,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33962,10 +33962,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34178,10 +34178,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34394,10 +34394,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34576,10 +34576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34754,10 +34754,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34904,10 +34904,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -35055,10 +35055,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35070,7 +35070,7 @@ ], "summary": "Get Tenant Dashboards (getTenantDashboards)", "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDashboards_1", + "operationId": "getTenantDashboards", "parameters": [ { "name": "pageSize", @@ -35271,10 +35271,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35284,9 +35284,9 @@ "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboards)", + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDashboards", + "operationId": "getTenantDashboardsByTenantId", "parameters": [ { "name": "tenantId", @@ -35487,10 +35487,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35721,10 +35721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35906,10 +35906,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36090,10 +36090,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36753,9 +36753,9 @@ "tags": [ "device-api-controller" ], - "summary": "Save claiming information (claimDevice)", + "summary": "Save claiming information (saveClaimingInfo)", "description": "Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation.\n Example of the request payload: \n\n```json\n{\"secretKey\":\"value\", \"durationMs\":60000}\n```\n\nNote: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", - "operationId": "claimDevice", + "operationId": "saveClaimingInfo", "parameters": [ { "name": "deviceToken", @@ -38104,10 +38104,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38279,10 +38279,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38441,10 +38441,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38456,7 +38456,7 @@ ], "summary": "Claim device (claimDevice)", "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "claimDevice_1", + "operationId": "claimDevice", "parameters": [ { "name": "deviceName", @@ -38619,10 +38619,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -38778,10 +38778,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39024,10 +39024,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39252,10 +39252,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39474,10 +39474,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39489,7 +39489,7 @@ ], "summary": "Create Device (saveDevice) with credentials ", "description": "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)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDeviceWithCredentials_1", + "operationId": "saveDeviceWithCredentials", "parameters": [ { "name": "entityGroupId", @@ -39686,10 +39686,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39846,10 +39846,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40006,10 +40006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40167,10 +40167,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40321,10 +40321,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40482,10 +40482,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -40634,10 +40634,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40795,10 +40795,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41032,10 +41032,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41199,10 +41199,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -41210,9 +41210,9 @@ "tags": [ "device-controller" ], - "summary": "Find related devices (findByQuery)", + "summary": "Find related devices (findDevicesByQuery)", "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findByQuery_3", + "operationId": "findDevicesByQuery", "requestBody": { "content": { "application/json": { @@ -41360,10 +41360,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41535,10 +41535,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41717,10 +41717,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41936,10 +41936,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42097,10 +42097,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42316,10 +42316,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42486,10 +42486,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42705,10 +42705,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42864,10 +42864,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43031,10 +43031,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43183,10 +43183,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43343,10 +43343,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43507,10 +43507,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43520,9 +43520,9 @@ "tags": [ "device-profile-controller" ], - "summary": "Get time series keys (getTimeseriesKeys)", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTimeseriesKeys_1", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { "name": "deviceProfileId", @@ -43671,10 +43671,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43836,10 +43836,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44006,10 +44006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -44158,10 +44158,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44319,10 +44319,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44469,10 +44469,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44630,10 +44630,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44857,10 +44857,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44870,9 +44870,9 @@ "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2)", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceProfileInfosByIdsV2", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { "name": "deviceProfileIds", @@ -45024,10 +45024,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45235,10 +45235,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45409,10 +45409,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45570,10 +45570,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45731,10 +45731,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45930,10 +45930,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46084,10 +46084,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46099,7 +46099,7 @@ ], "summary": "Update oauth2 clients (updateOauth2Clients)", "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "updateOauth2Clients_1", + "operationId": "updateOauth2Clients", "parameters": [ { "name": "id", @@ -46252,10 +46252,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46489,10 +46489,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46717,10 +46717,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46899,10 +46899,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47059,10 +47059,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47220,10 +47220,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47395,10 +47395,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47570,10 +47570,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47731,10 +47731,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47892,10 +47892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48045,10 +48045,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48206,10 +48206,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -48358,10 +48358,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48519,10 +48519,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48689,10 +48689,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48917,10 +48917,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49127,10 +49127,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -49138,9 +49138,9 @@ "tags": [ "edge-controller" ], - "summary": "Find related edges (findByQuery)", + "summary": "Find related edges (findEdgesByQuery)", "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_2", + "operationId": "findEdgesByQuery", "requestBody": { "content": { "application/json": { @@ -49288,10 +49288,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49438,10 +49438,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49605,10 +49605,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49824,10 +49824,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49992,10 +49992,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50152,10 +50152,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50313,10 +50313,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50532,10 +50532,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50751,10 +50751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50990,10 +50990,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51143,10 +51143,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51323,10 +51323,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51484,10 +51484,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51657,10 +51657,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51819,10 +51819,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51983,10 +51983,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52173,10 +52173,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52388,10 +52388,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -52547,10 +52547,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52771,10 +52771,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53014,10 +53014,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53176,10 +53176,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53356,10 +53356,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53542,10 +53542,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -53726,10 +53726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53886,10 +53886,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54079,10 +54079,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54240,10 +54240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -54392,10 +54392,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54560,10 +54560,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54728,10 +54728,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54940,10 +54940,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55094,10 +55094,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55248,10 +55248,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55412,10 +55412,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55582,10 +55582,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55754,10 +55754,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55956,10 +55956,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56117,10 +56117,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56284,10 +56284,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56514,10 +56514,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56735,10 +56735,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56979,10 +56979,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57223,10 +57223,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57451,10 +57451,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57464,9 +57464,9 @@ "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIdsV2)", + "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByIdsV2", + "operationId": "getEntityGroupsByIds", "parameters": [ { "name": "entityGroupIds", @@ -57618,10 +57618,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57800,10 +57800,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58030,10 +58030,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58212,10 +58212,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58433,10 +58433,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58606,10 +58606,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58850,10 +58850,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58863,7 +58863,7 @@ "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList)", + "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", "operationId": "getAllEntityGroupsByOwnerAndType", "parameters": [ @@ -59046,10 +59046,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59290,10 +59290,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59465,10 +59465,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59668,10 +59668,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59871,10 +59871,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60032,10 +60032,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60192,10 +60192,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60341,10 +60341,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60493,10 +60493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60654,10 +60654,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60814,10 +60814,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61009,10 +61009,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61215,10 +61215,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61421,25 +61421,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/relations": { "post": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationsQuery" } } }, @@ -61447,7 +61449,17 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } }, "400": { "description": "Bad Request", @@ -61572,10 +61584,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -61583,12 +61595,12 @@ "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelation)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelation", + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", "parameters": [ { - "name": "fromId", + "name": "entityId", "in": "query", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -61597,35 +61609,171 @@ } }, { - "name": "fromType", + "name": "entityType", "in": "query", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/relations/from/{fromType}/{fromId}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", + "parameters": [ + { + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { "type": "string" } }, { - "name": "toId", - "in": "query", + "name": "fromId", + "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { @@ -61633,10 +61781,10 @@ } }, { - "name": "toType", + "name": "relationTypeGroup", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, "schema": { "type": "string" } @@ -61644,7 +61792,17 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } }, "400": { "description": "Bad Request", @@ -61769,32 +61927,60 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations": { - "post": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Find related entities (findByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", + "parameters": [ + { + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -61820,7 +62006,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -61932,43 +62118,45 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relations/info": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Delete common relations (deleteCommonRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", - "parameters": [ - { - "name": "entityId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "entityType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -61981,7 +62169,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -62093,22 +62281,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}": { + "/api/relations/info/from/{fromType}/{fromId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromV2)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromV2", + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", "parameters": [ { "name": "fromType", @@ -62146,7 +62334,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationInfo" } } } @@ -62275,25 +62463,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { + "/api/relations/info/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromAndRelationType", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { - "name": "fromType", + "name": "toType", "in": "path", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -62302,7 +62490,7 @@ } }, { - "name": "fromId", + "name": "toId", "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -62310,15 +62498,6 @@ "type": "string" } }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "relationTypeGroup", "in": "query", @@ -62329,169 +62508,6 @@ } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/api/relations/info": { - "post": { - "tags": [ - "entity-relation-controller" - ], - "summary": "Find related entity infos (findInfoByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -62517,7 +62533,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -62629,25 +62645,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { + "/api/relations/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByFromV2)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByFromV2", + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", "parameters": [ { - "name": "fromType", + "name": "toType", "in": "path", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -62656,7 +62672,7 @@ } }, { - "name": "fromId", + "name": "toId", "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -62682,7 +62698,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelationInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -62811,22 +62827,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/to/{toType}/{toId}": { + "/api/relations/to/{toType}/{toId}/{relationType}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByToV2)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByToV2", + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", "parameters": [ { "name": "toType", @@ -62846,6 +62862,15 @@ "type": "string" } }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "relationTypeGroup", "in": "query", @@ -62864,7 +62889,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelationInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -62993,61 +63018,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}": { - "get": { + "/api/v2/relation": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToV2)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToV2", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EntityRelation" } } } @@ -63063,7 +63066,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -63175,36 +63178,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/relations/to/{toType}/{toId}/{relationType}": { - "get": { + }, + "delete": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToAndRelationType", + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", "parameters": [ { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" @@ -63212,7 +63213,7 @@ }, { "name": "relationType", - "in": "path", + "in": "query", "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "required": true, "schema": { @@ -63227,6 +63228,24 @@ "schema": { "type": "string" } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -63235,10 +63254,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EntityRelation" } } } @@ -63366,39 +63382,114 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/v2/relation": { - "post": { + "/api/customer/{customerId}/entityViewInfos": { + "get": { "tags": [ - "entity-relation-controller" + "entity-view-controller" ], - "summary": "Create Relation (saveRelationV2)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelationV2", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } + "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEntityViewInfos", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -63414,7 +63505,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -63526,73 +63617,95 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/{customerId}/entityViews": { + "get": { "tags": [ - "entity-relation-controller" + "entity-view-controller" ], - "summary": "Delete Relation (deleteRelationV2)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelationV2", + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "fromType", + "name": "pageSize", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "relationType", + "name": "page", "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "relationTypeGroup", + "name": "type", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", "required": false, "schema": { "type": "string" } }, { - "name": "toId", + "name": "textSearch", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, "schema": { "type": "string" } }, { - "name": "toType", + "name": "sortProperty", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "Property of entity to sort by", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -63602,7 +63715,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -63730,27 +63843,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityViewInfos": { + "/api/entityGroup/{entityGroupId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", - "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEntityViewInfos", + "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", + "description": "Returns a page of Entity View objects that belongs to specified Entity View Id. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityViewsByEntityGroupId", "parameters": [ { - "name": "customerId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -63762,8 +63875,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { @@ -63772,26 +63885,8 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" + "type": "string", + "minimum": 0 } }, { @@ -63837,7 +63932,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -63965,105 +64060,91 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityViews": { - "get": { + "/api/entityView": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Customer Entity Views (getCustomerEntityViews)", - "description": "Returns a page of Entity View objects assigned to customer. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViews", + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "entityGroupId", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "type", + "name": "entityGroupIds", "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "description": "A list of entity group ids, separated by comma ','", "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { - "name": "textSearch", + "name": "nameConflictPolicy", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "sortProperty", + "name": "uniquifySeparator", "in": "query", - "description": "Property of entity to sort by", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] + "default": "_" } }, { - "name": "sortOrder", + "name": "uniquifyStrategy", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -64079,7 +64160,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -64191,87 +64272,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/entityViews": { + "/api/entityView/info/{entityViewId}": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", - "description": "Returns a page of Entity View objects that belongs to specified Entity View Id. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityViewsByEntityGroupId", + "summary": "Get entity view info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", "parameters": [ { - "name": "entityGroupId", + "name": "entityViewId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -64280,7 +64305,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityViewInfo" } } } @@ -64408,91 +64433,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView": { - "post": { + "/api/entityView/types": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Save or update entity view (saveEntityView)", - "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityView", - "parameters": [ - { - "name": "entityGroupId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - }, - "required": true - }, + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -64508,7 +64474,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -64620,22 +64586,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView/info/{entityViewId}": { + "/api/entityView/{entityViewId}": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get entity view info (getEntityViewInfoById)", - "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewInfoById", + "summary": "Get entity view (getEntityViewById)", + "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewById", "parameters": [ { "name": "entityViewId", @@ -64653,7 +64619,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityViewInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -64781,35 +64747,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityView/types": { - "get": { + }, + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View Types (getEntityViewTypes)", - "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewTypes", + "summary": "Delete entity view (deleteEntityView)", + "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteEntityView", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -64934,195 +64899,108 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView/{entityViewId}": { + "/api/entityViewInfos/all": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get entity view (getEntityViewById)", - "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewById", + "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEntityViewInfos", "parameters": [ { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } + "type": "integer", + "format": "int32" } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "http_login_form": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } }, { - "api_key_form": [] - } - ] - }, - "delete": { - "tags": [ - "entity-view-controller" - ], - "summary": "Delete entity view (deleteEntityView)", - "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteEntityView", - "parameters": [ - { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityViewInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -65247,236 +65125,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] - } - ] - } - }, - "/api/entityViewInfos/all": { - "get": { - "tags": [ - "entity-view-controller" - ], - "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", - "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEntityViewInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] - }, - { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65486,9 +65138,9 @@ "tags": [ "entity-view-controller" ], - "summary": "Find related entity views (findByQuery)", + "summary": "Find related entity views (findEntityViewsByQuery)", "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_1", + "operationId": "findEntityViewsByQuery", "requestBody": { "content": { "application/json": { @@ -65636,10 +65288,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65651,7 +65303,7 @@ ], "summary": "Get Entity Views By Ids (getEntityViewsByIds)", "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityViewsByIdsV2", + "operationId": "getEntityViewsByIds", "parameters": [ { "name": "entityViewIds", @@ -65803,248 +65455,31 @@ }, "security": [ { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/api/tenant/entityView": { - "get": { - "tags": [ - "entity-view-controller" - ], - "summary": "Get Entity View by name (getTenantEntityViewByName)", - "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViewByName", - "parameters": [ - { - "name": "entityViewName", - "in": "query", - "description": "Entity View name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/entityViews": { + "/api/tenant/entityView": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEntityViews", + "summary": "Get Entity View by name (getTenantEntityViewByName)", + "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViewByName", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "entityViewName", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Entity View name", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -66053,7 +65488,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -66181,22 +65616,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/user/entityViews": { + "/api/tenant/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views (getUserEntityViews)", - "description": "Returns a page of entity views that are available for the current user. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEntityViews", + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", "parameters": [ { "name": "pageSize", @@ -66204,8 +65639,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -66214,8 +65649,8 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" } }, { @@ -66398,74 +65833,56 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/events/{entityType}/{entityId}": { + "/api/user/entityViews": { "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events (Deprecated)", - "description": "Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. ", - "operationId": "getEvents", + "summary": "Get Entity Views (getUserEntityViews)", + "description": "Returns a page of entity views that are available for the current user. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEntityViews", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", + "name": "pageSize", "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "pageSize", + "name": "page", "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { - "name": "page", + "name": "type", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { "name": "textSearch", "in": "query", - "description": "The value is not used in searching.", + "description": "The case insensitive 'substring' filter based on the entity view name.", "required": false, "schema": { "type": "string" @@ -66479,8 +65896,9 @@ "schema": { "type": "string", "enum": [ - "ts", - "id" + "createdTime", + "name", + "type" ] } }, @@ -66496,26 +65914,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -66524,7 +65922,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -66652,20 +66050,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/events/{entityType}/{entityId}": { "post": { "tags": [ "event-controller" ], - "summary": "Get Events by event filter (getEvents)", + "summary": "Get Events by event filter (getEventsByFilter)", "description": "Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEvents_1", + "operationId": "getEventsByFilter", "parameters": [ { "name": "entityType", @@ -66914,10 +66314,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67107,10 +66507,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67120,9 +66520,9 @@ "tags": [ "event-controller" ], - "summary": "Get Events by type (getEvents)", + "summary": "Get Events by type (getEventsByType)", "description": "Returns a page of events for specified entity by specifying event type. 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 response schema for more details. ", - "operationId": "getEvents_2", + "operationId": "getEventsByType", "parameters": [ { "name": "entityType", @@ -67371,10 +66771,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67535,10 +66935,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67695,10 +67095,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67865,10 +67265,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68026,10 +67426,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68178,10 +67578,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68345,10 +67745,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68509,10 +67909,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68682,10 +68082,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68841,10 +68241,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69071,10 +68471,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69247,10 +68647,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69437,10 +68837,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -69626,10 +69026,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -69805,10 +69205,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69978,10 +69378,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70151,10 +69551,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70332,10 +69732,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70522,10 +69922,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70703,10 +70103,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71240,10 +70640,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71401,10 +70801,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71569,10 +70969,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -71735,10 +71135,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71958,10 +71358,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72181,10 +71581,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72341,10 +71741,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72494,10 +71894,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72655,10 +72055,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72816,10 +72216,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72968,10 +72368,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73192,10 +72592,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73416,10 +72816,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73569,10 +72969,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73582,9 +72982,9 @@ "tags": [ "integration-controller" ], - "summary": "Get Integrations By Ids (getIntegrationsByIdsV2)", + "summary": "Get Integrations By Ids (getIntegrationsByIds)", "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationsByIdsV2", + "operationId": "getIntegrationsByIds", "parameters": [ { "name": "integrationIds", @@ -73736,10 +73136,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73897,10 +73297,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74048,10 +73448,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74202,10 +73602,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74356,10 +73756,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74611,10 +74011,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74656,42 +74056,6 @@ "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "bad-credentials": { - "summary": "Bad credentials", - "value": { - "message": "Invalid username or password", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "account-locked": { - "summary": "Locked account", - "value": { - "message": "User account is locked due to security policy", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, - "token-expired": { - "summary": "JWT token expired", - "value": { - "message": "Token has expired", - "errorCode": 11, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - }, "authentication-failed": { "summary": "General authentication error", "value": { @@ -74715,80 +74079,7 @@ "subscriptionValue": null, "timestamp": 1609459200000 } - } - } - } - } - }, - "401 ": { - "description": "Unauthorized (**Expired credentials**)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" - }, - "examples": { - "credentials-expired": { - "summary": "Expired credentials", - "value": { - "status": 401, - "message": "User password expired!", - "errorCode": 15, - "timestamp": 1609459200000, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "resetToken": "VTx0729Sc4pJjvdp4E75cbQhzt6nkr" - } - } - } - } - } - } - } - } - }, - "/api/auth/token": { - "post": { - "tags": [ - "login-endpoint" - ], - "summary": "Refresh user JWT token data", - "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", - "operationId": "refreshToken", - "requestBody": { - "description": "Refresh token request", - "content": { - "application/json": { - "schema": { - "properties": { - "refreshToken": { - - } - } - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponse" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { + }, "bad-credentials": { "summary": "Bad credentials", "value": { @@ -74824,7 +74115,80 @@ "subscriptionValue": null, "timestamp": 1609459200000 } - }, + } + } + } + } + }, + "401 ": { + "description": "Unauthorized (**Expired credentials**)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + }, + "examples": { + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1609459200000, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "resetToken": "HlBn0QKypFyPS4QTMdEFZ6RuU9vxIh" + } + } + } + } + } + } + } + } + }, + "/api/auth/token": { + "post": { + "tags": [ + "login-endpoint" + ], + "summary": "Refresh user JWT token data", + "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", + "operationId": "refreshToken", + "requestBody": { + "description": "Refresh token request", + "content": { + "application/json": { + "schema": { + "properties": { + "refreshToken": { + + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { "authentication-failed": { "summary": "General authentication error", "value": { @@ -74848,6 +74212,42 @@ "subscriptionValue": null, "timestamp": 1609459200000 } + }, + "bad-credentials": { + "summary": "Bad credentials", + "value": { + "message": "Invalid username or password", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "message": "User account is locked due to security policy", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "message": "Token has expired", + "errorCode": 11, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } } } } @@ -74871,7 +74271,7 @@ "subscriptionErrorCode": null, "subscriptionEntry": null, "subscriptionValue": null, - "resetToken": "VTx0729Sc4pJjvdp4E75cbQhzt6nkr" + "resetToken": "HlBn0QKypFyPS4QTMdEFZ6RuU9vxIh" } } } @@ -74982,8 +74382,9 @@ "tags": [ "lwm-2m-controller" ], - "summary": "Save device with credentials (Deprecated)", - "operationId": "saveDeviceWithCredentials", + "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials)", + "description": "Deprecated.", + "operationId": "saveLwm2mDeviceWithCredentials", "parameters": [ { "name": "entityGroupId", @@ -75141,10 +74542,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75302,10 +74703,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75317,7 +74718,7 @@ ], "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates_1", + "operationId": "getClientRegistrationTemplates", "responses": { "200": { "description": "OK", @@ -75452,10 +74853,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75626,10 +75027,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75787,10 +75188,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75986,10 +75387,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76140,10 +75541,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76153,9 +75554,9 @@ "tags": [ "mobile-app-bundle-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", + "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateOauth2Clients", + "operationId": "updateMobileAppBundleOauth2Clients", "parameters": [ { "name": "id", @@ -76308,10 +75709,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76482,10 +75883,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76495,7 +75896,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile app infos (getTenantMobileAppInfos)", + "summary": "Get mobile app infos (getTenantMobileApps)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getTenantMobileApps", "parameters": [ @@ -76690,10 +76091,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76848,10 +76249,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76861,7 +76262,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile info by id (getMobileAppInfoById)", + "summary": "Get mobile info by id (getMobileAppById)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getMobileAppById", "parameters": [ @@ -77009,10 +76410,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77161,10 +76562,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77479,10 +76880,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77645,10 +77046,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77805,10 +77206,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77978,10 +77379,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78139,10 +77540,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -78291,10 +77692,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78490,10 +77891,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78649,10 +78050,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78808,10 +78209,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78962,10 +78363,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79112,10 +78513,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -79270,10 +78671,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79419,10 +78820,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -79576,10 +78977,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79730,10 +79131,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79884,10 +79285,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80106,10 +79507,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80264,10 +79665,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80430,10 +79831,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80590,10 +79991,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80751,10 +80152,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80903,10 +80304,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81102,10 +80503,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81262,10 +80663,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81444,10 +80845,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81605,10 +81006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -81757,10 +81158,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81956,10 +81357,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81969,9 +81370,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by ids (getNotificationTargetsByIdsV2)", + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsByIdsV2", + "operationId": "getNotificationTargetsByIds", "parameters": [ { "name": "ids", @@ -82123,10 +81524,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82136,9 +81537,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2)", + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou 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 response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsBySupportedNotificationTypeV2", + "operationId": "getNotificationTargetsBySupportedNotificationType", "parameters": [ { "name": "notificationType", @@ -82331,10 +81732,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82503,10 +81904,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82663,10 +82064,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82824,10 +82225,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -82976,10 +82377,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83187,10 +82588,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83200,9 +82601,9 @@ "tags": [ "o-auth-2-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "getClientRegistrationTemplates", + "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { "description": "OK", @@ -83340,10 +82741,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -83498,10 +82899,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83653,10 +83054,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83983,10 +83384,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84182,10 +83583,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84195,9 +83596,9 @@ "tags": [ "o-auth-2-controller" ], - "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2)", + "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findTenantOAuth2ClientInfosByIdsV2", + "operationId": "findTenantOAuth2ClientInfosByIds", "parameters": [ { "name": "clientIds", @@ -84349,10 +83750,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84510,10 +83911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -84662,10 +84063,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84812,10 +84213,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84972,10 +84373,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85133,10 +84534,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85294,10 +84695,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -85499,10 +84900,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -85651,10 +85052,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85813,10 +85214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86027,10 +85428,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86263,10 +85664,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86276,9 +85677,9 @@ "tags": [ "ota-package-controller" ], - "summary": "Get OTA Package Infos (getOtaPackages)", + "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", "description": "Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackages_1", + "operationId": "getOtaPackagesByDeviceProfileIdAndType", "parameters": [ { "name": "deviceProfileId", @@ -86499,10 +85900,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86684,10 +86085,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86869,10 +86270,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87019,10 +86420,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87032,7 +86433,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Get QR code configuration for home page (getMobileAppQrCodeConfig)", + "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", "operationId": "getMergedMobileAppSettings", "responses": { @@ -87169,10 +86570,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87182,7 +86583,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Get Mobile application settings (getMobileAppSettings)", + "summary": "Get Mobile application settings (getQrCodeSettings)", "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", "operationId": "getQrCodeSettings", "responses": { @@ -87319,10 +86720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -87330,7 +86731,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Create Or Update the Mobile application settings (saveMobileAppSettings)", + "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "saveQrCodeSettings", "requestBody": { @@ -87477,10 +86878,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88004,10 +87405,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -88179,10 +87580,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88340,10 +87741,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88501,10 +87902,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -88653,10 +88054,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88859,10 +88260,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88872,9 +88273,9 @@ "tags": [ "queue-stats-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIdsV2)", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIdsV2", + "operationId": "getQueueStatsByIds", "parameters": [ { "name": "queueStatsIds", @@ -89026,10 +88427,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89187,10 +88588,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89358,10 +88759,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89517,10 +88918,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89530,7 +88931,7 @@ "tags": [ "report-controller" ], - "summary": "Download test report (downloadTestReport)", + "summary": "Download test report (testReportAndDownload)", "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "testReportAndDownload", "requestBody": { @@ -89678,10 +89079,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89839,10 +89240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -89991,10 +89392,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90152,10 +89553,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90165,8 +89566,8 @@ "tags": [ "report-controller" ], - "summary": "getReports", - "operationId": "getReports_1", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { "name": "strReportIds", @@ -90318,10 +89719,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90545,10 +89946,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90743,10 +90144,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90903,10 +90304,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91064,10 +90465,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91225,10 +90626,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -91377,10 +90778,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91626,10 +91027,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91793,10 +91194,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91953,10 +91354,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92114,10 +91515,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -92266,10 +91667,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92488,10 +91889,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92501,9 +91902,9 @@ "tags": [ "role-controller" ], - "summary": "Get Roles By Ids (getRolesByIdsV2)", + "summary": "Get Roles By Ids (getRolesByIds)", "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRolesByIdsV2", + "operationId": "getRolesByIds", "parameters": [ { "name": "roleIds", @@ -92655,10 +92056,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92668,9 +92069,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequest)", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest_1", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -92827,10 +92228,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92840,9 +92241,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequest)", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest_1", + "operationId": "handleTwoWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -92999,10 +92400,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93012,9 +92413,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send one-way RPC request", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest", + "operationId": "handleOneWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -93163,10 +92564,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93399,10 +92800,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93560,10 +92961,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -93712,10 +93113,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93725,9 +93126,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send two-way RPC request", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest", + "operationId": "handleTwoWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -93876,10 +93277,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94044,10 +93445,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -94210,10 +93611,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94427,10 +93828,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94587,10 +93988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94740,10 +94141,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94753,9 +94154,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Create Default Rule Chain", + "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain_1", + "operationId": "setDeviceDefaultRuleChain", "requestBody": { "content": { "application/json": { @@ -94900,10 +94301,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95072,10 +94473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95222,10 +94623,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95237,7 +94638,7 @@ ], "summary": "Test Script function", "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript", + "operationId": "testRuleChainScript", "parameters": [ { "name": "scriptLang", @@ -95394,10 +94795,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95555,10 +94956,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -95707,10 +95108,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95868,10 +95269,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -96027,10 +95428,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96188,10 +95589,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96349,10 +95750,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96514,10 +95915,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96678,10 +96079,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96839,10 +96240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97060,10 +96461,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97222,10 +96623,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97397,10 +96798,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97410,9 +96811,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIdsV2)", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRuleChainsByIdsV2", + "operationId": "getRuleChainsByIds", "parameters": [ { "name": "ruleChainIds", @@ -97564,10 +96965,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97725,10 +97126,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97738,9 +97139,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push user message to the rule engine (handleRuleEngineRequest)", + "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_3", + "operationId": "handleRuleEngineRequestForUser", "requestBody": { "content": { "application/json": { @@ -97886,10 +97287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97899,9 +97300,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest", + "operationId": "handleRuleEngineRequestForEntity", "parameters": [ { "name": "entityType", @@ -98067,10 +97468,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98080,9 +97481,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_2", + "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { "name": "entityType", @@ -98267,10 +97668,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98280,9 +97681,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_1", + "operationId": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { "name": "entityType", @@ -98458,10 +97859,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98622,10 +98023,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98792,10 +98193,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -98960,10 +98361,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99172,10 +98573,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99404,10 +98805,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99564,10 +98965,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99725,10 +99126,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99886,10 +99287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -100038,10 +99439,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100208,10 +99609,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100426,10 +99827,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100439,9 +99840,9 @@ "tags": [ "scheduler-event-controller" ], - "summary": "Get all scheduler events (getAllSchedulerEventsV2)", + "summary": "Get all scheduler events (getAllSchedulerEvents)", "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllSchedulerEventsV2", + "operationId": "getAllSchedulerEvents", "parameters": [ { "name": "type", @@ -100590,10 +99991,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100603,9 +100004,9 @@ "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIdsV2)", + "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByIdsV2", + "operationId": "getSchedulerEventsByIds", "parameters": [ { "name": "schedulerEventIds", @@ -100757,10 +100158,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100960,10 +100361,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101120,10 +100521,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -101278,10 +100679,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101431,10 +100832,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101592,10 +100993,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101764,10 +101165,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101925,10 +101326,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102098,10 +101499,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102304,10 +101705,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102939,10 +102340,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -103097,10 +102498,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -103237,10 +102638,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105042,10 +104443,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105191,10 +104592,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105341,10 +104742,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105490,10 +104891,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105632,10 +105033,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105782,10 +105183,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105933,10 +105334,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106083,10 +105484,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106244,10 +105645,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106397,10 +105798,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106558,10 +105959,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106712,10 +106113,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106873,10 +106274,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107022,10 +106423,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107171,10 +106572,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107320,10 +106721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107469,10 +106870,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107628,10 +107029,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107865,10 +107266,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -108024,10 +107425,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108185,10 +107586,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108355,10 +107756,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108525,10 +107926,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108538,8 +107939,8 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2)", - "operationId": "getSystemOrTenantResourcesByIdsV2", + "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", + "operationId": "getSystemOrTenantResourcesByIds", "parameters": [ { "name": "resourceIds", @@ -108691,10 +108092,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108884,10 +108285,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109094,10 +108495,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109264,10 +108665,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109434,10 +108835,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109447,7 +108848,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get All Resource Infos (getAllResources)", + "summary": "Get All Resource Infos (getTenantResources)", "description": "Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "getTenantResources", "parameters": [ @@ -109643,10 +109044,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109829,10 +109230,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110009,10 +109410,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110180,10 +109581,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110342,10 +109743,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -110509,10 +109910,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110671,10 +110072,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110684,7 +110085,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Download resource (downloadResource)", + "summary": "Download resource (downloadResourceIfChanged)", "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", "operationId": "downloadResourceIfChanged", "parameters": [ @@ -110870,10 +110271,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111060,10 +110461,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111227,10 +110628,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -111402,10 +110803,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111578,10 +110979,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111751,10 +111152,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111938,10 +111339,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112111,10 +111512,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112333,10 +111734,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112508,10 +111909,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112693,10 +112094,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112886,10 +112287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113093,10 +112494,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113299,10 +112700,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -113484,10 +112885,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113785,10 +113186,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113961,10 +113362,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -114145,10 +113546,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114305,10 +113706,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114466,10 +113867,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114627,10 +114028,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -114779,10 +114180,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114996,10 +114397,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115212,10 +114613,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115225,9 +114626,9 @@ "tags": [ "tenant-controller" ], - "summary": "Get Tenants By Ids (getTenantsByIdsV2)", + "summary": "Get Tenants By Ids (getTenantsByIds)", "description": "Fetch Tenant objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantsByIdsV2", + "operationId": "getTenantsByIds", "parameters": [ { "name": "tenantIds", @@ -115379,10 +114780,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115539,10 +114940,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115700,10 +115101,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -115852,10 +115253,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116013,10 +115414,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116163,10 +115564,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116324,10 +115725,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116531,10 +115932,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116740,10 +116141,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116906,10 +116307,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -117225,10 +116626,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -117375,10 +116776,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -117535,10 +116936,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -117705,10 +117106,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -117867,10 +117268,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -118020,10 +117421,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -118170,10 +117571,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -118320,10 +117721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -118529,10 +117930,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -118690,10 +118091,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -118840,10 +118241,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -118998,10 +118399,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -119148,10 +118549,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -119298,10 +118699,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -119441,10 +118842,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -119591,10 +118992,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -119761,10 +119162,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -119929,10 +119330,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -120087,10 +119488,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -120248,10 +119649,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -120401,10 +119802,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -120551,10 +119952,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -120564,9 +119965,9 @@ "tags": [ "two-factor-auth-config-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderTypes)", "description": "Get the list of provider types available for user to use (the ones configured by tenant or sysadmin).\nExample of response:\n```\n[\n \"TOTP\",\n \"EMAIL\",\n \"SMS\"\n]\n```\n\nAvailable for any authorized user. ", - "operationId": "getAvailableTwoFaProviders_1", + "operationId": "getAvailableTwoFaProviderTypes", "responses": { "200": { "description": "OK", @@ -120704,10 +120105,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -120854,10 +120255,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -121012,10 +120413,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -121162,10 +120563,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -121175,9 +120576,9 @@ "tags": [ "two-factor-auth-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderInfos)", "description": "Get the list of 2FA provider infos available for user to use. Example:\n```\n[\n {\n \"type\": \"EMAIL\",\n \"default\": true,\n \"contact\": \"ab*****ko@gmail.com\"\n },\n {\n \"type\": \"TOTP\",\n \"default\": false,\n \"contact\": null\n },\n {\n \"type\": \"SMS\",\n \"default\": false,\n \"contact\": \"+38********12\"\n }\n]\n```", - "operationId": "getAvailableTwoFaProviders", + "operationId": "getAvailableTwoFaProviderInfos", "responses": { "200": { "description": "OK", @@ -121315,10 +120716,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -121483,10 +120884,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -121636,10 +121037,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -121786,10 +121187,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -121935,10 +121336,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -122144,10 +121545,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -122371,10 +121772,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -122589,10 +121990,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -122807,10 +122208,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -123025,10 +122426,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -123216,10 +122617,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -123386,10 +122787,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -123547,10 +122948,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -123697,10 +123098,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -123856,10 +123257,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -124016,10 +123417,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -124166,10 +123567,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -124320,10 +123721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -124480,10 +123881,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -124493,7 +123894,7 @@ "tags": [ "user-controller" ], - "summary": "Get user settings (getUserSettings)", + "summary": "Get user settings (getGeneralUserSettings)", "description": "Fetch the User settings based on authorized user. ", "operationId": "getGeneralUserSettings", "responses": { @@ -124630,10 +124031,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -124641,7 +124042,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putGeneralUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putGeneralUserSettings", "requestBody": { @@ -124781,10 +124182,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -124794,9 +124195,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings (deleteGeneralUserSettings)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings_1", + "operationId": "deleteGeneralUserSettings", "parameters": [ { "name": "paths", @@ -124935,10 +124336,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -125096,10 +124497,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -125107,7 +124508,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putUserSettings", "parameters": [ @@ -125258,10 +124659,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -125271,9 +124672,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings by type (deleteUserSettingsByType)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings", + "operationId": "deleteUserSettingsByType", "parameters": [ { "name": "paths", @@ -125421,10 +124822,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -125571,10 +124972,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -125780,10 +125181,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -125941,10 +125342,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -126093,10 +125494,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -126254,10 +125655,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -126415,10 +125816,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -126576,10 +125977,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -126739,10 +126140,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -126957,10 +126358,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -127175,10 +126576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -127384,10 +126785,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -127397,9 +126798,9 @@ "tags": [ "user-controller" ], - "summary": "Get Users By Ids (getUsersByIdsV2)", + "summary": "Get Users By Ids (getUsersByIds)", "description": "Requested users must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUsersByIdsV2", + "operationId": "getUsersByIds", "parameters": [ { "name": "userIds", @@ -127551,10 +126952,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -127753,10 +127154,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -127903,10 +127304,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -128187,10 +127588,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -128348,10 +127749,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -128500,10 +127901,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -128661,10 +128062,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -128813,10 +128214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -128963,10 +128364,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -129113,10 +128514,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -129284,10 +128685,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -129446,10 +128847,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -129605,10 +129006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -129765,10 +129166,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -129915,10 +129316,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -130084,10 +129485,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -130245,10 +129646,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -130414,10 +129815,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -130584,10 +129985,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -130736,10 +130137,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -130900,10 +130301,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -131061,10 +130462,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -131329,10 +130730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -131502,10 +130903,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -131762,22 +131163,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/widgetsBundles/{widgetsBundleId}/widgetTypes": { + "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { "get": { "tags": [ "widget-type-controller" ], "summary": "Get all Widget types for specified Bundle (getBundleWidgetTypes)", "description": "Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getBundleWidgetTypesV2", + "operationId": "getBundleWidgetTypes", "parameters": [ { "name": "widgetsBundleId", @@ -131926,27 +131327,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle": { + }, "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", - "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. 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.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveWidgetsBundle", + "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", + "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetTypes", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WidgetsBundle" + "type": "array", + "description": "Ordered list of widget type Ids to be included by widgets bundle", + "items": { + "type": "string" + } } } }, @@ -131954,14 +131368,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WidgetsBundle" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -132086,42 +131493,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/widgetsBundle/{widgetsBundleId}": { - "get": { + "/api/widgetsBundle": { + "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Get Widget Bundle (getWidgetsBundleById)", - "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundleById", - "parameters": [ - { - "name": "widgetsBundleId", - "in": "path", - "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", + "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. 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.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveWidgetsBundle", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -132144,7 +131541,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -132256,20 +131653,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/widgetsBundle/{widgetsBundleId}": { + "get": { "tags": [ "widgets-bundle-controller" ], - "summary": "Delete widgets bundle (deleteWidgetsBundle)", - "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteWidgetsBundle", + "summary": "Get Widget Bundle (getWidgetsBundleById)", + "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetsBundleById", "parameters": [ { "name": "widgetsBundleId", @@ -132279,11 +131678,27 @@ "schema": { "type": "string" } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } }, "400": { "description": "Bad Request", @@ -132408,22 +131823,20 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { - "post": { + }, + "delete": { "tags": [ "widgets-bundle-controller" ], - "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", - "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateWidgetsBundleWidgetFqns", + "summary": "Delete widgets bundle (deleteWidgetsBundle)", + "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteWidgetsBundle", "parameters": [ { "name": "widgetsBundleId", @@ -132435,20 +131848,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "Ordered list of widget type FQNs to be included by widgets bundle", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -132464,7 +131863,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -132576,22 +131975,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { + "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", - "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateWidgetsBundleWidgetTypes", + "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", + "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetFqns", "parameters": [ { "name": "widgetsBundleId", @@ -132608,7 +132007,7 @@ "application/json": { "schema": { "type": "array", - "description": "Ordered list of widget type Ids to be included by widgets bundle", + "description": "Ordered list of widget type FQNs to be included by widgets bundle", "items": { "type": "string" } @@ -132744,10 +132143,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -132979,10 +132378,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -132992,9 +132391,9 @@ "tags": [ "widgets-bundle-controller" ], - "summary": "Get all Widget Bundles (getWidgetsBundlesV2)", + "summary": "Get all Widget Bundles (getAllWidgetsBundles)", "description": "Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundlesV2", + "operationId": "getAllWidgetsBundles", "responses": { "200": { "description": "OK", @@ -133132,10 +132531,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -133299,10 +132698,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -133704,6 +133103,16 @@ "provider" ] }, + "AiModelExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AiModelId": { "type": "object", "properties": { @@ -133939,8 +133348,30 @@ "triggerType" ] }, + "AlarmAssignmentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -134144,6 +133575,29 @@ "triggerType" ] }, + "AlarmCommentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCommentType": { "type": "string", "enum": [ @@ -134903,7 +134357,6 @@ ] }, "AlarmRuleBooleanFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -135058,7 +134511,6 @@ ] }, "AlarmRuleDurationCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -135103,7 +134555,6 @@ ] }, "AlarmRuleNoDataFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -135126,7 +134577,6 @@ ] }, "AlarmRuleNumericFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -135149,7 +134599,6 @@ ] }, "AlarmRuleRepeatingCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -135187,7 +134636,6 @@ ] }, "AlarmRuleSimpleCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -135229,7 +134677,6 @@ ] }, "AlarmRuleStringFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -135849,6 +135296,29 @@ "triggerType" ] }, + "ApiUsageLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ApiUsageStateFilter": { "allOf": [ { @@ -135969,6 +135439,16 @@ "name" ] }, + "AssetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetId": { "type": "object", "properties": { @@ -136125,6 +135605,16 @@ } } }, + "AssetProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetProfileId": { "type": "object", "properties": { @@ -137230,12 +136720,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -137250,12 +136743,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -137270,12 +136766,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -138365,6 +137864,16 @@ "type" ] }, + "ConverterExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "ConverterId": { "type": "object", "properties": { @@ -138878,6 +138387,16 @@ "title" ] }, + "CustomerExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "CustomerId": { "type": "object", "properties": { @@ -139166,6 +138685,16 @@ "type" ] }, + "DashboardExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DashboardId": { "type": "object", "properties": { @@ -139675,7 +139204,6 @@ ] }, "DefaultDeviceConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/DeviceConfiguration" @@ -139786,35 +139314,6 @@ "visible" ] }, - "DefaultNotificationRuleRecipientsConfig": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" - }, - { - "type": "object", - "properties": { - "triggerType": { - "$ref": "#/components/schemas/NotificationRuleTriggerType" - }, - "targets": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 1 - } - } - } - ], - "description": "Default notification rule recipients configuration", - "required": [ - "targets", - "triggerType" - ] - }, "DefaultPageId": { "type": "string", "enum": [ @@ -140388,6 +139887,29 @@ "triggerType" ] }, + "DeviceActivityRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "DeviceConfiguration": { "type": "object", "description": "Device configuration", @@ -140835,6 +140357,16 @@ } } }, + "DeviceProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DeviceProfileId": { "type": "object", "properties": { @@ -141293,7 +140825,6 @@ ] }, "DummyJobConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/JobConfiguration" @@ -141611,6 +141142,29 @@ "triggerType" ] }, + "EdgeCommunicationFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectionNotificationRuleTriggerConfig": { "allOf": [ { @@ -141641,6 +141195,29 @@ "triggerType" ] }, + "EdgeConnectionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectivityEvent": { "type": "string", "enum": [ @@ -142211,6 +141788,29 @@ "triggerType" ] }, + "EntitiesLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "Entity": { "type": "object", "properties": { @@ -142258,8 +141858,30 @@ "triggerType" ] }, + "EntityActionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EntityAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -142492,12 +142114,23 @@ "WIDGET_TYPE": "#/components/schemas/WidgetTypeExportData", "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleExportData", "OTA_PACKAGE": "#/components/schemas/OtaPackageExportData", + "CUSTOMER": "#/components/schemas/CustomerExportData", + "TB_RESOURCE": "#/components/schemas/TbResourceExportData", + "DASHBOARD": "#/components/schemas/DashboardExportData", + "ASSET_PROFILE": "#/components/schemas/AssetProfileExportData", + "ASSET": "#/components/schemas/AssetExportData", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileExportData", + "ENTITY_VIEW": "#/components/schemas/EntityViewExportData", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateExportData", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetExportData", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleExportData", + "AI_MODEL": "#/components/schemas/AiModelExportData", "ENTITY_GROUP": "#/components/schemas/EntityGroupExportData", - "ASSET": "#/components/schemas/GroupEntityExportData", - "DASHBOARD": "#/components/schemas/GroupEntityExportData", - "CUSTOMER": "#/components/schemas/GroupEntityExportData", - "ENTITY_VIEW": "#/components/schemas/GroupEntityExportData", - "SCHEDULER_EVENT": "#/components/schemas/SchedulerEventExportData" + "SCHEDULER_EVENT": "#/components/schemas/SchedulerEventExportData", + "CONVERTER": "#/components/schemas/ConverterExportData", + "INTEGRATION": "#/components/schemas/IntegrationExportData", + "ROLE": "#/components/schemas/RoleExportData", + "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateExportData" } }, "properties": { @@ -143417,6 +143050,16 @@ "type" ] }, + "EntityViewExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "EntityViewId": { "type": "object", "properties": { @@ -143797,7 +143440,6 @@ ] }, "EscalatedNotificationRuleRecipientsConfig": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" @@ -144124,7 +143766,6 @@ ] }, "GeofencingCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -144525,16 +144166,6 @@ "serviceAccountKey" ] }, - "GroupEntityExportData": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - } - ], - "required": [ - "entityType" - ] - }, "GroupPermission": { "type": "object", "description": "A JSON value representing the group permission.", @@ -145112,13 +144743,13 @@ "$ref": "#/components/schemas/JsonNode", "description": "Additional parameters of the integration" }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" - }, "edgeTemplate": { "type": "boolean", "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -145140,6 +144771,16 @@ } } }, + "IntegrationExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "IntegrationId": { "type": "object", "properties": { @@ -145219,13 +144860,13 @@ "stats": { "$ref": "#/components/schemas/ArrayNode" }, - "remote": { - "type": "boolean", - "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" - }, "edgeTemplate": { "type": "boolean", "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" } }, "required": [ @@ -145273,6 +144914,29 @@ "triggerType" ] }, + "IntegrationLifecycleEventRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "IntegrationType": { "type": "string", "enum": [ @@ -147259,6 +146923,29 @@ "triggerType" ] }, + "NewPlatformVersionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "NoSecLwM2MBootstrapServerCredential": { "allOf": [ { @@ -147479,12 +147166,12 @@ "propertyName": "type" }, "properties": { - "stateEntityId": { - "$ref": "#/components/schemas/EntityId" - }, "dashboardId": { "$ref": "#/components/schemas/DashboardId" }, + "stateEntityId": { + "$ref": "#/components/schemas/EntityId" + }, "type": { "type": "string" } @@ -147699,6 +147386,7 @@ "sent": { "type": "object", "additionalProperties": { + "type": "integer", "format": "int32" } }, @@ -147712,6 +147400,7 @@ } }, "totalErrors": { + "type": "integer", "format": "int32" }, "error": { @@ -147786,6 +147475,16 @@ } } }, + "NotificationRuleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationRuleId": { "type": "object", "properties": { @@ -147870,21 +147569,21 @@ "discriminator": { "propertyName": "triggerType", "mapping": { - "ENTITY_ACTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", + "ENTITY_ACTION": "#/components/schemas/EntityActionRecipientsConfig", "ALARM": "#/components/schemas/EscalatedNotificationRuleRecipientsConfig", - "ALARM_COMMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ALARM_ASSIGNMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "DEVICE_ACTIVITY": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_CONNECTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "NEW_PLATFORM_VERSION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ENTITIES_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "API_USAGE_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RATE_LIMITS": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "TASK_PROCESSING_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RESOURCES_SHORTAGE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig" + "ALARM_COMMENT": "#/components/schemas/AlarmCommentRecipientsConfig", + "ALARM_ASSIGNMENT": "#/components/schemas/AlarmAssignmentRecipientsConfig", + "DEVICE_ACTIVITY": "#/components/schemas/DeviceActivityRecipientsConfig", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/RuleEngineComponentLifecycleEventRecipientsConfig", + "EDGE_CONNECTION": "#/components/schemas/EdgeConnectionRecipientsConfig", + "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/EdgeCommunicationFailureRecipientsConfig", + "NEW_PLATFORM_VERSION": "#/components/schemas/NewPlatformVersionRecipientsConfig", + "ENTITIES_LIMIT": "#/components/schemas/EntitiesLimitRecipientsConfig", + "API_USAGE_LIMIT": "#/components/schemas/ApiUsageLimitRecipientsConfig", + "RATE_LIMITS": "#/components/schemas/RateLimitsRecipientsConfig", + "TASK_PROCESSING_FAILURE": "#/components/schemas/TaskProcessingFailureRecipientsConfig", + "RESOURCES_SHORTAGE": "#/components/schemas/ResourceShortageRecipientsConfig", + "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/IntegrationLifecycleEventRecipientsConfig" } }, "properties": { @@ -148020,6 +147719,16 @@ "type" ] }, + "NotificationTargetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTargetId": { "type": "object", "properties": { @@ -148103,6 +147812,16 @@ "deliveryMethodsTemplates" ] }, + "NotificationTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTemplateId": { "type": "object", "properties": { @@ -151739,7 +151458,6 @@ ] }, "PropagationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -152179,6 +151897,29 @@ "triggerType" ] }, + "RateLimitsRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "RawDataEventFilter": { "allOf": [ { @@ -152246,7 +151987,6 @@ } }, "RelatedEntitiesAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -153119,9 +152859,6 @@ "$ref": "#/components/schemas/Filter" } }, - "timeDataPattern": { - "type": "string" - }, "namePattern": { "type": "string" }, @@ -153131,6 +152868,9 @@ "$ref": "#/components/schemas/ReportComponent" } }, + "timeDataPattern": { + "type": "string" + }, "entityAliases": { "type": "array", "items": { @@ -153142,6 +152882,16 @@ "format" ] }, + "ReportTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "ReportTemplateId": { "type": "object", "properties": { @@ -153529,6 +153279,29 @@ } } }, + "ResourceShortageRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ResourceSubType": { "type": "string", "enum": [ @@ -153683,6 +153456,16 @@ "type" ] }, + "RoleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "RoleId": { "type": "object", "properties": { @@ -154150,6 +153933,29 @@ "triggerType" ] }, + "RuleEngineComponentLifecycleEventRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "RuleNode": { "type": "object", "properties": { @@ -154785,7 +154591,6 @@ } }, "ScriptCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -155274,7 +155079,6 @@ ] }, "SimpleCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -156482,6 +156286,29 @@ "triggerType" ] }, + "TaskProcessingFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "TaskResult": { "type": "object", "discriminator": { @@ -156704,6 +156531,16 @@ } } }, + "TbResourceExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "TbResourceId": { "type": "object", "properties": { @@ -158679,15 +158516,15 @@ "valueAsString": { "type": "string" }, - "strValue": { - "type": "string" - }, "dataType": { "$ref": "#/components/schemas/DataType" }, "jsonValue": { "type": "string" }, + "strValue": { + "type": "string" + }, "version": { "type": "integer", "format": "int64" @@ -160481,13 +160318,13 @@ } }, "securitySchemes": { - "http_login_form": { + "HttpLoginForm": { "type": "http", "description": "Enter Username / Password", "scheme": "loginPassword", "bearerFormat": "/api/auth/login|X-Authorization" }, - "api_key_form": { + "ApiKeyForm": { "type": "apiKey", "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey \u003Cyour_api_key_value\u003E**\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n\u003Cbr\u003E**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.\u003Cbr\u003E\n", "name": "X-Authorization", diff --git a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index a15ef0e1..5060220e 100644 --- a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -4080,6 +4080,101 @@ private HttpRequest.Builder checkTenantCanUpdatePlanRequestBuilder(@javax.annota return localVarRequestBuilder; } + /** + * checkTenantWhiteLabelingAllowed + * + * @throws ApiException if fails to make API call + */ + public void checkTenantWhiteLabelingAllowed() throws ApiException { + checkTenantWhiteLabelingAllowed(null); + } + + /** + * checkTenantWhiteLabelingAllowed + * + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void checkTenantWhiteLabelingAllowed(Map headers) throws ApiException { + checkTenantWhiteLabelingAllowedWithHttpInfo(headers); + } + + /** + * checkTenantWhiteLabelingAllowed + * + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse checkTenantWhiteLabelingAllowedWithHttpInfo() throws ApiException { + return checkTenantWhiteLabelingAllowedWithHttpInfo(null); + } + + /** + * checkTenantWhiteLabelingAllowed + * + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse checkTenantWhiteLabelingAllowedWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = checkTenantWhiteLabelingAllowedRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("checkTenantWhiteLabelingAllowed", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder checkTenantWhiteLabelingAllowedRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/cloudEndpoint/tenant/permission/whiteLabelingAllowed"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Check 2FA verification code (checkTwoFaVerificationCode) * Checks 2FA verification code, and if it is correct the method returns a regular access and refresh token pair. The API method is rate limited (using rate limit config from TwoFactorAuthSettings), and also will block a user after X unsuccessful verification attempts if such behavior is configured (in TwoFactorAuthSettings). Will return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded. @@ -4331,129 +4426,6 @@ private HttpRequest.Builder checkUpdatesRequestBuilder(Map heade return localVarRequestBuilder; } - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDevice(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDeviceWithHttpInfo(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceToken, body, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - // verify the required parameter 'deviceToken' is set - if (deviceToken == null) { - throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling claimDevice"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/claim" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Claim device (claimDevice) * Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). @@ -4463,8 +4435,8 @@ private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1(deviceName, subCustomerId, claimRequest, null); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDevice(deviceName, subCustomerId, claimRequest, null); } /** @@ -4477,8 +4449,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDevice1WithHttpInfo(deviceName, subCustomerId, claimRequest, headers); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceName, subCustomerId, claimRequest, headers); return localVarResponse.getData(); } @@ -4491,8 +4463,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1WithHttpInfo(deviceName, subCustomerId, claimRequest, null); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDeviceWithHttpInfo(deviceName, subCustomerId, claimRequest, null); } /** @@ -4505,8 +4477,8 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDevice1RequestBuilder(deviceName, subCustomerId, claimRequest, headers); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceName, subCustomerId, claimRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -4517,7 +4489,7 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice1", localVarResponse); + throw getApiException("claimDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -4553,10 +4525,10 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St } } - private HttpRequest.Builder claimDevice1RequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { // verify the required parameter 'deviceName' is set if (deviceName == null) { - throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice1"); + throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -5010,51 +4982,58 @@ private HttpRequest.Builder cloudMobileLoginRequestBuilder(@javax.annotation.Non } /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) + * Compare entity data to version (compareEntityDataToVersion) + * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + * @return EntityDataDiff * @throws ApiException if fails to make API call */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - codeProcessingUrl(code, state, null); + public EntityDataDiff compareEntityDataToVersion(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId) throws ApiException { + return compareEntityDataToVersion(entityType, internalEntityUuid, versionId, null); } /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) + * Compare entity data to version (compareEntityDataToVersion) + * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) * @param headers Optional headers to include in the request + * @return EntityDataDiff * @throws ApiException if fails to make API call */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - codeProcessingUrlWithHttpInfo(code, state, headers); + public EntityDataDiff compareEntityDataToVersion(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId, Map headers) throws ApiException { + ApiResponse localVarResponse = compareEntityDataToVersionWithHttpInfo(entityType, internalEntityUuid, versionId, headers); + return localVarResponse.getData(); } /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @return ApiResponse<Void> + * Compare entity data to version (compareEntityDataToVersion) + * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + * @return ApiResponse<EntityDataDiff> * @throws ApiException if fails to make API call */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - return codeProcessingUrlWithHttpInfo(code, state, null); + public ApiResponse compareEntityDataToVersionWithHttpInfo(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId) throws ApiException { + return compareEntityDataToVersionWithHttpInfo(entityType, internalEntityUuid, versionId, null); } /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) + * Compare entity data to version (compareEntityDataToVersion) + * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityDataDiff> * @throws ApiException if fails to make API call */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = codeProcessingUrlRequestBuilder(code, state, headers); + public ApiResponse compareEntityDataToVersionWithHttpInfo(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = compareEntityDataToVersionRequestBuilder(entityType, internalEntityUuid, versionId, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -5065,16 +5044,27 @@ public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("codeProcessingUrl", localVarResponse); + throw getApiException("compareEntityDataToVersion", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); } - return new ApiResponse<>( + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + EntityDataDiff responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + responseValue ); } finally { if (localVarResponseBody != null) { @@ -5090,177 +5080,31 @@ public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull } } - private HttpRequest.Builder codeProcessingUrlRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - // verify the required parameter 'code' is set - if (code == null) { - throw new ApiException(400, "Missing the required parameter 'code' when calling codeProcessingUrl"); + private HttpRequest.Builder compareEntityDataToVersionRequestBuilder(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling compareEntityDataToVersion"); } - // verify the required parameter 'state' is set - if (state == null) { - throw new ApiException(400, "Missing the required parameter 'state' when calling codeProcessingUrl"); + // verify the required parameter 'internalEntityUuid' is set + if (internalEntityUuid == null) { + throw new ApiException(400, "Missing the required parameter 'internalEntityUuid' when calling compareEntityDataToVersion"); + } + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException(400, "Missing the required parameter 'versionId' when calling compareEntityDataToVersion"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/admin/mail/oauth2/code"; + String localVarPath = "/api/entities/vc/diff/{entityType}/{internalEntityUuid}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{internalEntityUuid}", ApiClient.urlEncode(internalEntityUuid.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "code"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); - localVarQueryParameterBaseName = "state"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Compare entity data to version (compareEntityDataToVersion) - * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) - * @return EntityDataDiff - * @throws ApiException if fails to make API call - */ - public EntityDataDiff compareEntityDataToVersion(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId) throws ApiException { - return compareEntityDataToVersion(entityType, internalEntityUuid, versionId, null); - } - - /** - * Compare entity data to version (compareEntityDataToVersion) - * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) - * @param headers Optional headers to include in the request - * @return EntityDataDiff - * @throws ApiException if fails to make API call - */ - public EntityDataDiff compareEntityDataToVersion(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId, Map headers) throws ApiException { - ApiResponse localVarResponse = compareEntityDataToVersionWithHttpInfo(entityType, internalEntityUuid, versionId, headers); - return localVarResponse.getData(); - } - - /** - * Compare entity data to version (compareEntityDataToVersion) - * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) - * @return ApiResponse<EntityDataDiff> - * @throws ApiException if fails to make API call - */ - public ApiResponse compareEntityDataToVersionWithHttpInfo(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId) throws ApiException { - return compareEntityDataToVersionWithHttpInfo(entityType, internalEntityUuid, versionId, null); - } - - /** - * Compare entity data to version (compareEntityDataToVersion) - * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param internalEntityUuid A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param versionId Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityDataDiff> - * @throws ApiException if fails to make API call - */ - public ApiResponse compareEntityDataToVersionWithHttpInfo(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = compareEntityDataToVersionRequestBuilder(entityType, internalEntityUuid, versionId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("compareEntityDataToVersion", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - EntityDataDiff responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder compareEntityDataToVersionRequestBuilder(@javax.annotation.Nonnull EntityType entityType, @javax.annotation.Nonnull UUID internalEntityUuid, @javax.annotation.Nonnull String versionId, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling compareEntityDataToVersion"); - } - // verify the required parameter 'internalEntityUuid' is set - if (internalEntityUuid == null) { - throw new ApiException(400, "Missing the required parameter 'internalEntityUuid' when calling compareEntityDataToVersion"); - } - // verify the required parameter 'versionId' is set - if (versionId == null) { - throw new ApiException(400, "Missing the required parameter 'versionId' when calling compareEntityDataToVersion"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/entities/vc/diff/{entityType}/{internalEntityUuid}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{internalEntityUuid}", ApiClient.urlEncode(internalEntityUuid.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "versionId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("versionId", versionId)); + localVarQueryParameterBaseName = "versionId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("versionId", versionId)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -9707,6 +9551,110 @@ private HttpRequest.Builder deleteEntityViewRequestBuilder(@javax.annotation.Non return localVarRequestBuilder; } + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths) throws ApiException { + deleteGeneralUserSettings(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + deleteGeneralUserSettingsWithHttpInfo(paths, headers); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { + return deleteGeneralUserSettingsWithHttpInfo(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteGeneralUserSettingsRequestBuilder(paths, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteGeneralUserSettings", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteGeneralUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + // verify the required parameter 'paths' is set + if (paths == null) { + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteGeneralUserSettings"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/user/settings/{paths}" + .replace("{paths}", ApiClient.urlEncode(paths.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Delete group permission (deleteGroupPermission) * Deletes the group permission. Referencing non-existing group permission Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). @@ -11214,10 +11162,11 @@ private HttpRequest.Builder deleteQueueRequestBuilder(@javax.annotation.Nonnull * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } /** @@ -11230,10 +11179,12 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse localVarResponse = deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + return localVarResponse.getData(); } /** @@ -11245,10 +11196,10 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { return deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } @@ -11262,10 +11213,10 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = deleteRelationRequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -11280,13 +11231,24 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St throw getApiException("deleteRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); } - return new ApiResponse<>( + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + EntityRelation responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + responseValue ); } finally { if (localVarResponseBody != null) { @@ -11326,184 +11288,6 @@ private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnu HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relation"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "fromId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromId", fromId)); - localVarQueryParameterBaseName = "fromType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromType", fromType)); - localVarQueryParameterBaseName = "relationType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationType", relationType)); - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - localVarQueryParameterBaseName = "toId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toId", toId)); - localVarQueryParameterBaseName = "toType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toType", toType)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse localVarResponse = deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteRelationV2RequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - EntityRelation responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelationV2"); - } - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelationV2"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelationV2"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelationV2"); - } - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelationV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/v2/relation"; List localVarQueryParams = new ArrayList<>(); @@ -11548,7 +11332,7 @@ private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Non } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -11559,7 +11343,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -11571,7 +11355,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -11583,7 +11367,7 @@ public ApiResponse deleteRelationsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -13199,42 +12983,42 @@ private HttpRequest.Builder deleteUserRequestBuilder(@javax.annotation.Nonnull S } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - deleteUserSettings(paths, type, null); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + deleteUserSettingsByType(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - deleteUserSettingsWithHttpInfo(paths, type, headers); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + deleteUserSettingsByTypeWithHttpInfo(paths, type, headers); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - return deleteUserSettingsWithHttpInfo(paths, type, null); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + return deleteUserSettingsByTypeWithHttpInfo(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) @@ -13242,8 +13026,8 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsRequestBuilder(paths, type, headers); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsByTypeRequestBuilder(paths, type, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13254,7 +13038,7 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings", localVarResponse); + throw getApiException("deleteUserSettingsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -13279,14 +13063,14 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + private HttpRequest.Builder deleteUserSettingsByTypeRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { // verify the required parameter 'paths' is set if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettingsByType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettingsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -13312,47 +13096,43 @@ private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.N } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @throws ApiException if fails to make API call */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths) throws ApiException { - deleteUserSettings1(paths, null); + public void deleteWebSelfRegistrationParams() throws ApiException { + deleteWebSelfRegistrationParams(null); } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - deleteUserSettings1WithHttpInfo(paths, headers); + public void deleteWebSelfRegistrationParams(Map headers) throws ApiException { + deleteWebSelfRegistrationParamsWithHttpInfo(headers); } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { - return deleteUserSettings1WithHttpInfo(paths, null); + public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo() throws ApiException { + return deleteWebSelfRegistrationParamsWithHttpInfo(null); } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettings1RequestBuilder(paths, headers); + public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteWebSelfRegistrationParamsRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13363,7 +13143,7 @@ public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings1", localVarResponse); + throw getApiException("deleteWebSelfRegistrationParams", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -13388,16 +13168,11 @@ public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder deleteUserSettings1RequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - // verify the required parameter 'paths' is set - if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings1"); - } + private HttpRequest.Builder deleteWebSelfRegistrationParamsRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/user/settings/{paths}" - .replace("{paths}", ApiClient.urlEncode(paths.toString())); + String localVarPath = "/api/selfRegistration/selfRegistrationParams"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13416,43 +13191,47 @@ private HttpRequest.Builder deleteUserSettings1RequestBuilder(@javax.annotation. } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @throws ApiException if fails to make API call */ - public void deleteWebSelfRegistrationParams() throws ApiException { - deleteWebSelfRegistrationParams(null); + public void deleteWidgetType(@javax.annotation.Nonnull String widgetTypeId) throws ApiException { + deleteWidgetType(widgetTypeId, null); } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteWebSelfRegistrationParams(Map headers) throws ApiException { - deleteWebSelfRegistrationParamsWithHttpInfo(headers); + public void deleteWidgetType(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { + deleteWidgetTypeWithHttpInfo(widgetTypeId, headers); } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo() throws ApiException { - return deleteWebSelfRegistrationParamsWithHttpInfo(null); + public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId) throws ApiException { + return deleteWidgetTypeWithHttpInfo(widgetTypeId, null); } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteWebSelfRegistrationParamsRequestBuilder(headers); + public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteWidgetTypeRequestBuilder(widgetTypeId, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13463,7 +13242,7 @@ public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo(Map deleteWebSelfRegistrationParamsWithHttpInfo(Map headers) throws ApiException { + private HttpRequest.Builder deleteWidgetTypeRequestBuilder(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { + // verify the required parameter 'widgetTypeId' is set + if (widgetTypeId == null) { + throw new ApiException(400, "Missing the required parameter 'widgetTypeId' when calling deleteWidgetType"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/selfRegistration/selfRegistrationParams"; + String localVarPath = "/api/widgetType/{widgetTypeId}" + .replace("{widgetTypeId}", ApiClient.urlEncode(widgetTypeId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13511,47 +13295,47 @@ private HttpRequest.Builder deleteWebSelfRegistrationParamsRequestBuilder(Map headers) throws ApiException { - deleteWidgetTypeWithHttpInfo(widgetTypeId, headers); + public void deleteWidgetsBundle(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + deleteWidgetsBundleWithHttpInfo(widgetsBundleId, headers); } /** - * Delete widget type (deleteWidgetType) - * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Delete widgets bundle (deleteWidgetsBundle) + * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId) throws ApiException { - return deleteWidgetTypeWithHttpInfo(widgetTypeId, null); + public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return deleteWidgetsBundleWithHttpInfo(widgetsBundleId, null); } /** - * Delete widget type (deleteWidgetType) - * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Delete widgets bundle (deleteWidgetsBundle) + * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteWidgetTypeRequestBuilder(widgetTypeId, headers); + public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteWidgetsBundleRequestBuilder(widgetsBundleId, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13562,111 +13346,7 @@ public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteWidgetType", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteWidgetTypeRequestBuilder(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { - // verify the required parameter 'widgetTypeId' is set - if (widgetTypeId == null) { - throw new ApiException(400, "Missing the required parameter 'widgetTypeId' when calling deleteWidgetType"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/widgetType/{widgetTypeId}" - .replace("{widgetTypeId}", ApiClient.urlEncode(widgetTypeId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @throws ApiException if fails to make API call - */ - public void deleteWidgetsBundle(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - deleteWidgetsBundle(widgetsBundleId, null); - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void deleteWidgetsBundle(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - deleteWidgetsBundleWithHttpInfo(widgetsBundleId, headers); - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return deleteWidgetsBundleWithHttpInfo(widgetsBundleId, null); - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteWidgetsBundleRequestBuilder(widgetsBundleId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteWidgetsBundle", localVarResponse); + throw getApiException("deleteWidgetsBundle", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -15739,7 +15419,7 @@ private HttpRequest.Builder downloadResourceRequestBuilder(@javax.annotation.Non } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -15753,7 +15433,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -15769,7 +15449,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -15783,7 +15463,7 @@ public ApiResponse downloadResourceIfChangedWithHttpInfo(@javax.annotation } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -17178,70 +16858,50 @@ private HttpRequest.Builder findAllRelatedEdgesMissingAttributesRequestBuilder(@ } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) - * @return AvailableEntityKeys + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) + * @return List<Asset> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { - return findAvailableEntityKeysByQuery(timeseries, attributes, entityDataQuery, scope, null); + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQuery(assetSearchQuery, null); } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) * @param headers Optional headers to include in the request - * @return AvailableEntityKeys + * @return List<Asset> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { - ApiResponse localVarResponse = findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, headers); + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findAssetsByQueryWithHttpInfo(assetSearchQuery, headers); return localVarResponse.getData(); } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) - * @return ApiResponse<AvailableEntityKeys> + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) + * @return ApiResponse<List<Asset>> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { - return findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, null); + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQueryWithHttpInfo(assetSearchQuery, null); } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<AvailableEntityKeys> + * @return ApiResponse<List<Asset>> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryRequestBuilder(timeseries, attributes, entityDataQuery, scope, headers); + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAssetsByQueryRequestBuilder(assetSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17252,11 +16912,11 @@ public ApiResponse findAvailableEntityKeysByQueryWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findAvailableEntityKeysByQuery", localVarResponse); + throw getApiException("findAssetsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17266,10 +16926,10 @@ public ApiResponse findAvailableEntityKeysByQueryWithHttpIn String responseBody = new String(localVarResponseBody.readAllBytes()); - AvailableEntityKeys responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17288,50 +16948,23 @@ public ApiResponse findAvailableEntityKeysByQueryWithHttpIn } } - private HttpRequest.Builder findAvailableEntityKeysByQueryRequestBuilder(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { - // verify the required parameter 'timeseries' is set - if (timeseries == null) { - throw new ApiException(400, "Missing the required parameter 'timeseries' when calling findAvailableEntityKeysByQuery"); - } - // verify the required parameter 'attributes' is set - if (attributes == null) { - throw new ApiException(400, "Missing the required parameter 'attributes' when calling findAvailableEntityKeysByQuery"); - } - // verify the required parameter 'entityDataQuery' is set - if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQuery"); + private HttpRequest.Builder findAssetsByQueryRequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'assetSearchQuery' is set + if (assetSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findAssetsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entitiesQuery/find/keys"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "timeseries"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("timeseries", timeseries)); - localVarQueryParameterBaseName = "attributes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("attributes", attributes)); - localVarQueryParameterBaseName = "scope"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); + String localVarPath = "/api/assets"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -17348,66 +16981,70 @@ private HttpRequest.Builder findAvailableEntityKeysByQueryRequestBuilder(@javax. } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) - * @return AvailableEntityKeysV2 + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * @return AvailableEntityKeys * @throws ApiException if fails to make API call + * @deprecated */ - public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { - return findAvailableEntityKeysByQueryV2(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); + @Deprecated + public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { + return findAvailableEntityKeysByQuery(timeseries, attributes, entityDataQuery, scope, null); } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) * @param headers Optional headers to include in the request - * @return AvailableEntityKeysV2 + * @return AvailableEntityKeys * @throws ApiException if fails to make API call + * @deprecated */ - public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { - ApiResponse localVarResponse = findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); + @Deprecated + public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { + ApiResponse localVarResponse = findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, headers); return localVarResponse.getData(); } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) - * @return ApiResponse<AvailableEntityKeysV2> + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * @return ApiResponse<AvailableEntityKeys> * @throws ApiException if fails to make API call + * @deprecated */ - public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { - return findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); + @Deprecated + public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { + return findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, null); } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<AvailableEntityKeysV2> + * @return ApiResponse<AvailableEntityKeys> * @throws ApiException if fails to make API call + * @deprecated */ - public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryV2RequestBuilder(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); + @Deprecated + public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryRequestBuilder(timeseries, attributes, entityDataQuery, scope, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17418,11 +17055,11 @@ public ApiResponse findAvailableEntityKeysByQueryV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findAvailableEntityKeysByQueryV2", localVarResponse); + throw getApiException("findAvailableEntityKeysByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17432,10 +17069,10 @@ public ApiResponse findAvailableEntityKeysByQueryV2WithHt String responseBody = new String(localVarResponseBody.readAllBytes()); - AvailableEntityKeysV2 responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + AvailableEntityKeys responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17454,27 +17091,33 @@ public ApiResponse findAvailableEntityKeysByQueryV2WithHt } } - private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + private HttpRequest.Builder findAvailableEntityKeysByQueryRequestBuilder(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { + // verify the required parameter 'timeseries' is set + if (timeseries == null) { + throw new ApiException(400, "Missing the required parameter 'timeseries' when calling findAvailableEntityKeysByQuery"); + } + // verify the required parameter 'attributes' is set + if (attributes == null) { + throw new ApiException(400, "Missing the required parameter 'attributes' when calling findAvailableEntityKeysByQuery"); + } // verify the required parameter 'entityDataQuery' is set if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQueryV2"); + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/v2/entitiesQuery/find/keys"; + String localVarPath = "/api/entitiesQuery/find/keys"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "includeTimeseries"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeTimeseries", includeTimeseries)); - localVarQueryParameterBaseName = "includeAttributes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeAttributes", includeAttributes)); - localVarQueryParameterBaseName = "scopes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scopes", scopes)); - localVarQueryParameterBaseName = "includeSamples"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeSamples", includeSamples)); + localVarQueryParameterBaseName = "timeseries"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeseries", timeseries)); + localVarQueryParameterBaseName = "attributes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("attributes", attributes)); + localVarQueryParameterBaseName = "scope"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -17508,62 +17151,66 @@ private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@java } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @return AvailableEntityKeysV2 * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); + public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { + return findAvailableEntityKeysByQueryV2(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return AvailableEntityKeysV2 * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); + public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + ApiResponse localVarResponse = findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @return ApiResponse<AvailableEntityKeysV2> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); + public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { + return findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<AvailableEntityKeysV2> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); + public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryV2RequestBuilder(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17574,11 +17221,11 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromAndRelationType", localVarResponse); + throw getApiException("findAvailableEntityKeysByQueryV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17588,10 +17235,10 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + AvailableEntityKeysV2 responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17610,32 +17257,27 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ } } - private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromAndRelationType"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromAndRelationType"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByFromAndRelationType"); + private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + // verify the required parameter 'entityDataQuery' is set + if (entityDataQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQueryV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); + String localVarPath = "/api/v2/entitiesQuery/find/keys"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + localVarQueryParameterBaseName = "includeTimeseries"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeTimeseries", includeTimeseries)); + localVarQueryParameterBaseName = "includeAttributes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeAttributes", includeAttributes)); + localVarQueryParameterBaseName = "scopes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scopes", scopes)); + localVarQueryParameterBaseName = "includeSamples"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeSamples", includeSamples)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -17648,9 +17290,15 @@ private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annot localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -17663,58 +17311,50 @@ private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annot } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2(fromType, fromId, relationTypeGroup, null); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQuery(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findDevicesByQueryWithHttpInfo(deviceSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQueryWithHttpInfo(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findDevicesByQueryRequestBuilder(deviceSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17725,11 +17365,11 @@ public ApiResponse> findByFromV2WithHttpInfo(@javax.annotat InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromV2", localVarResponse); + throw getApiException("findDevicesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17739,10 +17379,10 @@ public ApiResponse> findByFromV2WithHttpInfo(@javax.annotat String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17761,42 +17401,27 @@ public ApiResponse> findByFromV2WithHttpInfo(@javax.annotat } } - private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromV2"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromV2"); + private HttpRequest.Builder findDevicesByQueryRequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'deviceSearchQuery' is set + if (deviceSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findDevicesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/devices"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -17809,50 +17434,54 @@ private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return List<EntityRelation> + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * @return String * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQuery(entityRelationsQuery, null); + public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { + return findEdgeMissingAttributes(edgeId, integrationIds, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return String * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQueryWithHttpInfo(entityRelationsQuery, headers); + public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + ApiResponse localVarResponse = findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, headers); return localVarResponse.getData(); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelation>> + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { + return findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEdgeMissingAttributesRequestBuilder(edgeId, integrationIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17863,11 +17492,11 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery", localVarResponse); + throw getApiException("findEdgeMissingAttributes", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17877,10 +17506,10 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17899,27 +17528,41 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findByQuery"); + private HttpRequest.Builder findEdgeMissingAttributesRequestBuilder(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + // verify the required parameter 'edgeId' is set + if (edgeId == null) { + throw new ApiException(400, "Missing the required parameter 'edgeId' when calling findEdgeMissingAttributes"); + } + // verify the required parameter 'integrationIds' is set + if (integrationIds == null) { + throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling findEdgeMissingAttributes"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations"; + String localVarPath = "/api/edge/integration/{edgeId}/missingAttributes" + .replace("{edgeId}", ApiClient.urlEncode(edgeId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "integrationIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "integrationIds", integrationIds)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -17932,50 +17575,50 @@ private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return List<EntityView> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1(entityViewSearchQuery, null); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQuery(edgeSearchQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityView> + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery1WithHttpInfo(entityViewSearchQuery, headers); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEdgesByQueryWithHttpInfo(edgeSearchQuery, headers); return localVarResponse.getData(); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return ApiResponse<List<EntityView>> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1WithHttpInfo(entityViewSearchQuery, null); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQueryWithHttpInfo(edgeSearchQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityView>> + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery1RequestBuilder(entityViewSearchQuery, headers); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEdgesByQueryRequestBuilder(edgeSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17986,11 +17629,11 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery1", localVarResponse); + throw getApiException("findEdgesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18000,10 +17643,10 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18022,15 +17665,15 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'entityViewSearchQuery' is set - if (entityViewSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findByQuery1"); + private HttpRequest.Builder findEdgesByQueryRequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'edgeSearchQuery' is set + if (edgeSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findEdgesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entityViews"; + String localVarPath = "/api/edges"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -18038,7 +17681,7 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -18055,50 +17698,50 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return List<Edge> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2(edgeSearchQuery, null); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQuery(entityDataQuery, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return List<Edge> + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery2WithHttpInfo(edgeSearchQuery, headers); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); return localVarResponse.getData(); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return ApiResponse<List<Edge>> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2WithHttpInfo(edgeSearchQuery, null); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Edge>> + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery2RequestBuilder(edgeSearchQuery, headers); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18109,11 +17752,11 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery2", localVarResponse); + throw getApiException("findEntityDataByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18123,10 +17766,10 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18145,15 +17788,15 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'edgeSearchQuery' is set - if (edgeSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findByQuery2"); + private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + // verify the required parameter 'entityDataQuery' is set + if (entityDataQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edges"; + String localVarPath = "/api/entitiesQuery/find"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -18161,7 +17804,7 @@ private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -18178,50 +17821,58 @@ private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) - * @return List<Device> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3(deviceSearchQuery, null); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<Device> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery3WithHttpInfo(deviceSearchQuery, headers); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) - * @return ApiResponse<List<Device>> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3WithHttpInfo(deviceSearchQuery, null); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Device>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery3RequestBuilder(deviceSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18232,11 +17883,11 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery3", localVarResponse); + throw getApiException("findEntityRelationInfosByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18246,10 +17897,10 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18268,27 +17919,42 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn } } - private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'deviceSearchQuery' is set - if (deviceSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findByQuery3"); + private HttpRequest.Builder findEntityRelationInfosByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationInfosByFrom"); + } + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationInfosByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/devices"; + String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -18301,50 +17967,50 @@ private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) - * @return List<Asset> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4(assetSearchQuery, null); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQuery(entityRelationsQuery, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return List<Asset> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery4WithHttpInfo(assetSearchQuery, headers); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) - * @return ApiResponse<List<Asset>> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4WithHttpInfo(assetSearchQuery, null); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Asset>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery4RequestBuilder(assetSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18355,11 +18021,11 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery4", localVarResponse); + throw getApiException("findEntityRelationInfosByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18369,10 +18035,10 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18391,15 +18057,15 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'assetSearchQuery' is set - if (assetSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findByQuery4"); + private HttpRequest.Builder findEntityRelationInfosByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationInfosByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/assets"; + String localVarPath = "/api/relations/info"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -18407,7 +18073,7 @@ private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -18424,62 +18090,58 @@ private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByTo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18490,11 +18152,11 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToAndRelationType", localVarResponse); + throw getApiException("findEntityRelationInfosByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18504,10 +18166,10 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18526,26 +18188,21 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja } } - private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + private HttpRequest.Builder findEntityRelationInfosByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { // verify the required parameter 'toType' is set if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToAndRelationType"); + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationInfosByTo"); } // verify the required parameter 'toId' is set if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToAndRelationType"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByToAndRelationType"); + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationInfosByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" + String localVarPath = "/api/relations/info/to/{toType}/{toId}" .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); + .replace("{toId}", ApiClient.urlEncode(toId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -18579,58 +18236,58 @@ private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotat } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2(toType, toId, relationTypeGroup, null); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18641,7 +18298,7 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToV2", localVarResponse); + throw getApiException("findEntityRelationsByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -18677,21 +18334,21 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToV2"); + private HttpRequest.Builder findEntityRelationsByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFrom"); } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToV2"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -18725,54 +18382,62 @@ private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull S } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) - * @return String + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { - return findEdgeMissingAttributes(edgeId, integrationIds, null); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return String + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - ApiResponse localVarResponse = findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, headers); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) - * @return ApiResponse<String> + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { - return findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, null); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<String> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findEdgeMissingAttributesRequestBuilder(edgeId, integrationIds, headers); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18783,11 +18448,11 @@ public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findEdgeMissingAttributes", localVarResponse); + throw getApiException("findEntityRelationsByFromAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18797,10 +18462,10 @@ public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18819,26 +18484,32 @@ public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder findEdgeMissingAttributesRequestBuilder(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - // verify the required parameter 'edgeId' is set - if (edgeId == null) { - throw new ApiException(400, "Missing the required parameter 'edgeId' when calling findEdgeMissingAttributes"); + private HttpRequest.Builder findEntityRelationsByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFromAndRelationType"); } - // verify the required parameter 'integrationIds' is set - if (integrationIds == null) { - throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling findEdgeMissingAttributes"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFromAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByFromAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edge/integration/{edgeId}/missingAttributes" - .replace("{edgeId}", ApiClient.urlEncode(edgeId.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "integrationIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "integrationIds", integrationIds)); + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -18866,50 +18537,50 @@ private HttpRequest.Builder findEdgeMissingAttributesRequestBuilder(@javax.annot } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return PageDataEntityData + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQuery(entityDataQuery, null); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQuery(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return PageDataEntityData + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return ApiResponse<PageDataEntityData> + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEntityData> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18920,11 +18591,11 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findEntityDataByQuery", localVarResponse); + throw getApiException("findEntityRelationsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18934,10 +18605,10 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18956,15 +18627,15 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - // verify the required parameter 'entityDataQuery' is set - if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); + private HttpRequest.Builder findEntityRelationsByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entitiesQuery/find"; + String localVarPath = "/api/relations"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -18972,7 +18643,7 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -18989,58 +18660,58 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2(fromType, fromId, relationTypeGroup, null); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByTo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -19051,11 +18722,11 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByFromV2", localVarResponse); + throw getApiException("findEntityRelationsByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -19065,10 +18736,10 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -19087,21 +18758,21 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax } } - private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findInfoByFromV2"); + private HttpRequest.Builder findEntityRelationsByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByTo"); } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findInfoByFromV2"); + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); + String localVarPath = "/api/relations/to/{toType}/{toId}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -19135,50 +18806,62 @@ private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Non } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return List<EntityRelationInfo> + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQuery(entityRelationsQuery, null); + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByQueryWithHttpInfo(entityRelationsQuery, headers); + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelationInfo>> + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -19189,11 +18872,11 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByQuery", localVarResponse); + throw getApiException("findEntityRelationsByToAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -19203,10 +18886,10 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -19225,27 +18908,47 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findInfoByQuery"); + private HttpRequest.Builder findEntityRelationsByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByToAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info"; + String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -19258,58 +18961,50 @@ private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonn } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2(toType, toId, relationTypeGroup, null); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQuery(entityViewSearchQuery, null); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, null); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityViewsByQueryRequestBuilder(entityViewSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -19320,11 +19015,11 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByToV2", localVarResponse); + throw getApiException("findEntityViewsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -19334,10 +19029,10 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -19356,42 +19051,27 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a } } - private HttpRequest.Builder findInfoByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findInfoByToV2"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findInfoByToV2"); + private HttpRequest.Builder findEntityViewsByQueryRequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'entityViewSearchQuery' is set + if (entityViewSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findEntityViewsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/entityViews"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -19682,50 +19362,50 @@ private HttpRequest.Builder findOAuth2ClientInfosRequestBuilder(@javax.annotatio } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2(clientIds, null); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIds(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, headers); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, headers); return localVarResponse.getData(); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, null); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsV2RequestBuilder(clientIds, headers); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsRequestBuilder(clientIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -19736,7 +19416,7 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findTenantOAuth2ClientInfosByIdsV2", localVarResponse); + throw getApiException("findTenantOAuth2ClientInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -19772,10 +19452,10 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit } } - private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsRequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { // verify the required parameter 'clientIds' is set if (clientIds == null) { - throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -20581,6 +20261,140 @@ private HttpRequest.Builder getAdminSettingsRequestBuilder(@javax.annotation.Non return localVarRequestBuilder; } + /** + * getAiAuditLogs + * + * @param sourceId (optional) + * @param status (optional, default to ALL) + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode getAiAuditLogs(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status) throws ApiException { + return getAiAuditLogs(sourceId, status, null); + } + + /** + * getAiAuditLogs + * + * @param sourceId (optional) + * @param status (optional, default to ALL) + * @param headers Optional headers to include in the request + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode getAiAuditLogs(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status, Map headers) throws ApiException { + ApiResponse localVarResponse = getAiAuditLogsWithHttpInfo(sourceId, status, headers); + return localVarResponse.getData(); + } + + /** + * getAiAuditLogs + * + * @param sourceId (optional) + * @param status (optional, default to ALL) + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAiAuditLogsWithHttpInfo(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status) throws ApiException { + return getAiAuditLogsWithHttpInfo(sourceId, status, null); + } + + /** + * getAiAuditLogs + * + * @param sourceId (optional) + * @param status (optional, default to ALL) + * @param headers Optional headers to include in the request + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAiAuditLogsWithHttpInfo(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAiAuditLogsRequestBuilder(sourceId, status, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAiAuditLogs", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAiAuditLogsRequestBuilder(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status, Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/ai/audit-logs"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "sourceId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sourceId", sourceId)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get AI model by ID (getAiModelById) * Fetches an AI model record by its `id`. Available for users with 'TENANT_ADMIN' authority. @@ -21413,7 +21227,7 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -21431,12 +21245,12 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -21455,13 +21269,13 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - ApiResponse localVarResponse = getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + ApiResponse localVarResponse = getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); return localVarResponse.getData(); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -21479,12 +21293,12 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -21503,8 +21317,8 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAlarmsRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmsByEntityRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -21515,7 +21329,7 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAlarms", localVarResponse); + throw getApiException("getAlarmsByEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -21551,22 +21365,22 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder getAlarmsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + private HttpRequest.Builder getAlarmsByEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmsByEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmsByEntity"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmsByEntity"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmsByEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -23492,7 +23306,7 @@ private HttpRequest.Builder getAllEdgeSchedulerEventsRequestBuilder(@javax.annot } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -23505,7 +23319,7 @@ public List getAllEntityGroupsByOwnerAndType(@javax.annotation. } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -23520,7 +23334,7 @@ public List getAllEntityGroupsByOwnerAndType(@javax.annotation. } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -23533,7 +23347,7 @@ public ApiResponse> getAllEntityGroupsByOwnerAndTypeWithHt } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -24115,50 +23929,50 @@ private HttpRequest.Builder getAllReportTemplateInfosRequestBuilder(@javax.annot } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @return List<SchedulerEventWithCustomerInfo> * @throws ApiException if fails to make API call */ - public List getAllSchedulerEventsV2(@javax.annotation.Nullable String type) throws ApiException { - return getAllSchedulerEventsV2(type, null); + public List getAllSchedulerEvents(@javax.annotation.Nullable String type) throws ApiException { + return getAllSchedulerEvents(type, null); } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @param headers Optional headers to include in the request * @return List<SchedulerEventWithCustomerInfo> * @throws ApiException if fails to make API call */ - public List getAllSchedulerEventsV2(@javax.annotation.Nullable String type, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAllSchedulerEventsV2WithHttpInfo(type, headers); + public List getAllSchedulerEvents(@javax.annotation.Nullable String type, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllSchedulerEventsWithHttpInfo(type, headers); return localVarResponse.getData(); } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @return ApiResponse<List<SchedulerEventWithCustomerInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAllSchedulerEventsV2WithHttpInfo(@javax.annotation.Nullable String type) throws ApiException { - return getAllSchedulerEventsV2WithHttpInfo(type, null); + public ApiResponse> getAllSchedulerEventsWithHttpInfo(@javax.annotation.Nullable String type) throws ApiException { + return getAllSchedulerEventsWithHttpInfo(type, null); } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<SchedulerEventWithCustomerInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAllSchedulerEventsV2WithHttpInfo(@javax.annotation.Nullable String type, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAllSchedulerEventsV2RequestBuilder(type, headers); + public ApiResponse> getAllSchedulerEventsWithHttpInfo(@javax.annotation.Nullable String type, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllSchedulerEventsRequestBuilder(type, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -24169,7 +23983,7 @@ public ApiResponse> getAllSchedulerEventsV2 InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAllSchedulerEventsV2", localVarResponse); + throw getApiException("getAllSchedulerEvents", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -24205,7 +24019,7 @@ public ApiResponse> getAllSchedulerEventsV2 } } - private HttpRequest.Builder getAllSchedulerEventsV2RequestBuilder(@javax.annotation.Nullable String type, Map headers) throws ApiException { + private HttpRequest.Builder getAllSchedulerEventsRequestBuilder(@javax.annotation.Nullable String type, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -24243,50 +24057,330 @@ private HttpRequest.Builder getAllSchedulerEventsV2RequestBuilder(@javax.annotat } /** - * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) - * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. - * @param groupType Entity Group type (required) - * @return List<EntityGroupInfo> + * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) + * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. + * @param groupType Entity Group type (required) + * @return List<EntityGroupInfo> + * @throws ApiException if fails to make API call + */ + public List getAllSharedEntityGroups(@javax.annotation.Nonnull String groupType) throws ApiException { + return getAllSharedEntityGroups(groupType, null); + } + + /** + * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) + * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. + * @param groupType Entity Group type (required) + * @param headers Optional headers to include in the request + * @return List<EntityGroupInfo> + * @throws ApiException if fails to make API call + */ + public List getAllSharedEntityGroups(@javax.annotation.Nonnull String groupType, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllSharedEntityGroupsWithHttpInfo(groupType, headers); + return localVarResponse.getData(); + } + + /** + * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) + * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. + * @param groupType Entity Group type (required) + * @return ApiResponse<List<EntityGroupInfo>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@javax.annotation.Nonnull String groupType) throws ApiException { + return getAllSharedEntityGroupsWithHttpInfo(groupType, null); + } + + /** + * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) + * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. + * @param groupType Entity Group type (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<EntityGroupInfo>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@javax.annotation.Nonnull String groupType, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllSharedEntityGroupsRequestBuilder(groupType, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAllSharedEntityGroups", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAllSharedEntityGroupsRequestBuilder(@javax.annotation.Nonnull String groupType, Map headers) throws ApiException { + // verify the required parameter 'groupType' is set + if (groupType == null) { + throw new ApiException(400, "Missing the required parameter 'groupType' when calling getAllSharedEntityGroups"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/entityGroups/{groupType}/shared/all" + .replace("{groupType}", ApiClient.urlEncode(groupType.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get All User Infos for current user (getAllUserInfos) + * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param includeCustomers Include customer or sub-customer entities (optional) + * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return PageDataUserInfo + * @throws ApiException if fails to make API call + */ + public PageDataUserInfo getAllUserInfos(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getAllUserInfos(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, null); + } + + /** + * Get All User Infos for current user (getAllUserInfos) + * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param includeCustomers Include customer or sub-customer entities (optional) + * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param headers Optional headers to include in the request + * @return PageDataUserInfo + * @throws ApiException if fails to make API call + */ + public PageDataUserInfo getAllUserInfos(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getAllUserInfosWithHttpInfo(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, headers); + return localVarResponse.getData(); + } + + /** + * Get All User Infos for current user (getAllUserInfos) + * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param includeCustomers Include customer or sub-customer entities (optional) + * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return ApiResponse<PageDataUserInfo> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAllUserInfosWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getAllUserInfosWithHttpInfo(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, null); + } + + /** + * Get All User Infos for current user (getAllUserInfos) + * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param includeCustomers Include customer or sub-customer entities (optional) + * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<PageDataUserInfo> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAllUserInfosWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllUserInfosRequestBuilder(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAllUserInfos", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + PageDataUserInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAllUserInfosRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAllUserInfos"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getAllUserInfos"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/userInfos/all"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "includeCustomers"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeCustomers", includeCustomers)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return List<WidgetsBundle> * @throws ApiException if fails to make API call */ - public List getAllSharedEntityGroups(@javax.annotation.Nonnull String groupType) throws ApiException { - return getAllSharedEntityGroups(groupType, null); + public List getAllWidgetsBundles() throws ApiException { + return getAllWidgetsBundles(null); } /** - * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) - * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. - * @param groupType Entity Group type (required) + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. * @param headers Optional headers to include in the request - * @return List<EntityGroupInfo> + * @return List<WidgetsBundle> * @throws ApiException if fails to make API call */ - public List getAllSharedEntityGroups(@javax.annotation.Nonnull String groupType, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAllSharedEntityGroupsWithHttpInfo(groupType, headers); + public List getAllWidgetsBundles(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllWidgetsBundlesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) - * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. - * @param groupType Entity Group type (required) - * @return ApiResponse<List<EntityGroupInfo>> + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return ApiResponse<List<WidgetsBundle>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@javax.annotation.Nonnull String groupType) throws ApiException { - return getAllSharedEntityGroupsWithHttpInfo(groupType, null); + public ApiResponse> getAllWidgetsBundlesWithHttpInfo() throws ApiException { + return getAllWidgetsBundlesWithHttpInfo(null); } /** - * Get Shared Entity Groups by entity type (getAllSharedEntityGroups) - * Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. - * @param groupType Entity Group type (required) + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityGroupInfo>> + * @return ApiResponse<List<WidgetsBundle>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@javax.annotation.Nonnull String groupType, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAllSharedEntityGroupsRequestBuilder(groupType, headers); + public ApiResponse> getAllWidgetsBundlesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllWidgetsBundlesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -24297,11 +24391,11 @@ public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAllSharedEntityGroups", localVarResponse); + throw getApiException("getAllWidgetsBundles", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -24311,10 +24405,10 @@ public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@ String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -24333,16 +24427,11 @@ public ApiResponse> getAllSharedEntityGroupsWithHttpInfo(@ } } - private HttpRequest.Builder getAllSharedEntityGroupsRequestBuilder(@javax.annotation.Nonnull String groupType, Map headers) throws ApiException { - // verify the required parameter 'groupType' is set - if (groupType == null) { - throw new ApiException(400, "Missing the required parameter 'groupType' when calling getAllSharedEntityGroups"); - } + private HttpRequest.Builder getAllWidgetsBundlesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entityGroups/{groupType}/shared/all" - .replace("{groupType}", ApiClient.urlEncode(groupType.toString())); + String localVarPath = "/api/widgetsBundles/all"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -24360,172 +24449,6 @@ private HttpRequest.Builder getAllSharedEntityGroupsRequestBuilder(@javax.annota return localVarRequestBuilder; } - /** - * Get All User Infos for current user (getAllUserInfos) - * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) - * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return PageDataUserInfo - * @throws ApiException if fails to make API call - */ - public PageDataUserInfo getAllUserInfos(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getAllUserInfos(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, null); - } - - /** - * Get All User Infos for current user (getAllUserInfos) - * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) - * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return PageDataUserInfo - * @throws ApiException if fails to make API call - */ - public PageDataUserInfo getAllUserInfos(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getAllUserInfosWithHttpInfo(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, headers); - return localVarResponse.getData(); - } - - /** - * Get All User Infos for current user (getAllUserInfos) - * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) - * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return ApiResponse<PageDataUserInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAllUserInfosWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getAllUserInfosWithHttpInfo(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, null); - } - - /** - * Get All User Infos for current user (getAllUserInfos) - * Returns a page of user info objects owned by the tenant or the customer of a current user. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) - * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataUserInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAllUserInfosWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAllUserInfosRequestBuilder(pageSize, page, includeCustomers, textSearch, sortProperty, sortOrder, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAllUserInfos", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataUserInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getAllUserInfosRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean includeCustomers, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAllUserInfos"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAllUserInfos"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/userInfos/all"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "includeCustomers"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeCustomers", includeCustomers)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Permissions (getAllowedPermissions) * Returns a complex object that describes: * all possible (both granted and not granted) permissions for the authority of the user (Tenant or Customer); * all granted permissions for the user; The result impacts UI behavior and hides certain UI elements if user has no permissions to invoke the related operations. Nevertheless, all API calls check the permissions each time they are executed on the server side.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 response schema for more details. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -25695,50 +25618,50 @@ private HttpRequest.Builder getAssetProfilesRequestBuilder(@javax.annotation.Non } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2(assetProfileIds, null); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIds(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, headers); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAssetProfilesByIdsWithHttpInfo(assetProfileIds, headers); return localVarResponse.getData(); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, null); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIdsWithHttpInfo(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsV2RequestBuilder(assetProfileIds, headers); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsRequestBuilder(assetProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -25749,7 +25672,7 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAssetProfilesByIdsV2", localVarResponse); + throw getApiException("getAssetProfilesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -25785,10 +25708,10 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ } } - private HttpRequest.Builder getAssetProfilesByIdsV2RequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getAssetProfilesByIdsRequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { // verify the required parameter 'assetProfileIds' is set if (assetProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -27126,140 +27049,6 @@ private HttpRequest.Builder getAuditLogsRequestBuilder(@javax.annotation.Nonnull return localVarRequestBuilder; } - /** - * getAuditLogs - * - * @param sourceId (optional) - * @param status (optional, default to ALL) - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode getAuditLogs1(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status) throws ApiException { - return getAuditLogs1(sourceId, status, null); - } - - /** - * getAuditLogs - * - * @param sourceId (optional) - * @param status (optional, default to ALL) - * @param headers Optional headers to include in the request - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode getAuditLogs1(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status, Map headers) throws ApiException { - ApiResponse localVarResponse = getAuditLogs1WithHttpInfo(sourceId, status, headers); - return localVarResponse.getData(); - } - - /** - * getAuditLogs - * - * @param sourceId (optional) - * @param status (optional, default to ALL) - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuditLogs1WithHttpInfo(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status) throws ApiException { - return getAuditLogs1WithHttpInfo(sourceId, status, null); - } - - /** - * getAuditLogs - * - * @param sourceId (optional) - * @param status (optional, default to ALL) - * @param headers Optional headers to include in the request - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuditLogs1WithHttpInfo(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuditLogs1RequestBuilder(sourceId, status, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuditLogs1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getAuditLogs1RequestBuilder(@javax.annotation.Nullable UUID sourceId, @javax.annotation.Nullable AuditLogStatusFilter status, Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/ai/audit-logs"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "sourceId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sourceId", sourceId)); - localVarQueryParameterBaseName = "status"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get audit logs by customer id (getAuditLogsByCustomerId) * Returns a page of audit logs related to the targeted customer entities (devices, assets, etc.), and users actions (login, logout, etc.) that belong to this customer. 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 response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs. @@ -27830,115 +27619,6 @@ private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation return localVarRequestBuilder; } - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return String - * @throws ApiException if fails to make API call - */ - public String getAuthorizationUrl() throws ApiException { - return getAuthorizationUrl(null); - } - - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String getAuthorizationUrl(Map headers) throws ApiException { - ApiResponse localVarResponse = getAuthorizationUrlWithHttpInfo(headers); - return localVarResponse.getData(); - } - - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuthorizationUrlWithHttpInfo() throws ApiException { - return getAuthorizationUrlWithHttpInfo(null); - } - - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuthorizationUrlWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuthorizationUrlRequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuthorizationUrl", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getAuthorizationUrlRequestBuilder(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/admin/mail/oauth2/authorize"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/text, application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains) * Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. @@ -28485,46 +28165,46 @@ private HttpRequest.Builder getAvailableLocalesRequestBuilder(Map getAvailableTwoFaProviders() throws ApiException { - return getAvailableTwoFaProviders(null); + public List getAvailableTwoFaProviderInfos() throws ApiException { + return getAvailableTwoFaProviderInfos(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return List<TwoFaProviderInfo> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProvidersWithHttpInfo(headers); + public List getAvailableTwoFaProviderInfos(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderInfosWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo() throws ApiException { - return getAvailableTwoFaProvidersWithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderInfosWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProvidersRequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderInfosRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -28535,7 +28215,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders", localVarResponse); + throw getApiException("getAvailableTwoFaProviderInfos", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -28571,7 +28251,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn } } - private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderInfosRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -28594,46 +28274,46 @@ private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map getAvailableTwoFaProviders1() throws ApiException { - return getAvailableTwoFaProviders1(null); + public List getAvailableTwoFaProviderTypes() throws ApiException { + return getAvailableTwoFaProviderTypes(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return List<TwoFaProviderType> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders1(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProviders1WithHttpInfo(headers); + public List getAvailableTwoFaProviderTypes(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderTypesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo() throws ApiException { - return getAvailableTwoFaProviders1WithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderTypesWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviders1RequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderTypesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -28644,7 +28324,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders1", localVarResponse); + throw getApiException("getAvailableTwoFaProviderTypes", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -28680,7 +28360,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI } } - private HttpRequest.Builder getAvailableTwoFaProviders1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderTypesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -28881,50 +28561,50 @@ private HttpRequest.Builder getBlobEntitiesRequestBuilder(@javax.annotation.Nonn } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @return List<BlobEntityInfo> * @throws ApiException if fails to make API call */ - public List getBlobEntitiesByIdsV2(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { - return getBlobEntitiesByIdsV2(blobEntityIds, null); + public List getBlobEntitiesByIds(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { + return getBlobEntitiesByIds(blobEntityIds, null); } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<BlobEntityInfo> * @throws ApiException if fails to make API call */ - public List getBlobEntitiesByIdsV2(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getBlobEntitiesByIdsV2WithHttpInfo(blobEntityIds, headers); + public List getBlobEntitiesByIds(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getBlobEntitiesByIdsWithHttpInfo(blobEntityIds, headers); return localVarResponse.getData(); } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @return ApiResponse<List<BlobEntityInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { - return getBlobEntitiesByIdsV2WithHttpInfo(blobEntityIds, null); + public ApiResponse> getBlobEntitiesByIdsWithHttpInfo(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { + return getBlobEntitiesByIdsWithHttpInfo(blobEntityIds, null); } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<BlobEntityInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getBlobEntitiesByIdsV2RequestBuilder(blobEntityIds, headers); + public ApiResponse> getBlobEntitiesByIdsWithHttpInfo(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getBlobEntitiesByIdsRequestBuilder(blobEntityIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -28935,7 +28615,7 @@ public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@jav InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getBlobEntitiesByIdsV2", localVarResponse); + throw getApiException("getBlobEntitiesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -28971,10 +28651,10 @@ public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@jav } } - private HttpRequest.Builder getBlobEntitiesByIdsV2RequestBuilder(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { + private HttpRequest.Builder getBlobEntitiesByIdsRequestBuilder(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { // verify the required parameter 'blobEntityIds' is set if (blobEntityIds == null) { - throw new ApiException(400, "Missing the required parameter 'blobEntityIds' when calling getBlobEntitiesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'blobEntityIds' when calling getBlobEntitiesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -29262,6 +28942,124 @@ private HttpRequest.Builder getBundleWidgetTypeFqnsRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypes(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getBundleWidgetTypesWithHttpInfo(widgetsBundleId, headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypesWithHttpInfo(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesRequestBuilder(widgetsBundleId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getBundleWidgetTypes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getBundleWidgetTypesRequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + // verify the required parameter 'widgetsBundleId' is set + if (widgetsBundleId == null) { + throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundle/{widgetsBundleId}/widgetTypes" + .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) * Returns an array of Widget Type Details objects that belong to specified Widget Bundle.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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -29588,124 +29386,6 @@ private HttpRequest.Builder getBundleWidgetTypesInfosRequestBuilder(@javax.annot return localVarRequestBuilder; } - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, headers); - return localVarResponse.getData(); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesV2RequestBuilder(widgetsBundleId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getBundleWidgetTypesV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getBundleWidgetTypesV2RequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - // verify the required parameter 'widgetsBundleId' is set - if (widgetsBundleId == null) { - throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypesV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" - .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Calculated Field (getCalculatedFieldById) * Fetch the Calculated Field object based on the provided Calculated Field Id. @@ -30173,7 +29853,7 @@ private HttpRequest.Builder getCalculatedFieldsRequestBuilder(@javax.annotation. } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30186,12 +29866,12 @@ private HttpRequest.Builder getCalculatedFieldsRequestBuilder(@javax.annotation. * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30205,13 +29885,13 @@ public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30224,12 +29904,12 @@ public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30243,8 +29923,8 @@ public ApiResponse getCalculatedFieldsByEntityIdV2WithH * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdV2RequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30255,7 +29935,7 @@ public ApiResponse getCalculatedFieldsByEntityIdV2WithH InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCalculatedFieldsByEntityIdV2", localVarResponse); + throw getApiException("getCalculatedFieldsByEntityId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30291,22 +29971,22 @@ public ApiResponse getCalculatedFieldsByEntityIdV2WithH } } - private HttpRequest.Builder getCalculatedFieldsByEntityIdV2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getCalculatedFieldsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityId"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityId"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -30474,123 +30154,14 @@ private HttpRequest.Builder getChatMessagesRequestBuilder(@javax.annotation.Nonn return localVarRequestBuilder; } - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return List<OAuth2ClientRegistrationTemplate> - * @throws ApiException if fails to make API call - */ - public List getClientRegistrationTemplates() throws ApiException { - return getClientRegistrationTemplates(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @param headers Optional headers to include in the request - * @return List<OAuth2ClientRegistrationTemplate> - * @throws ApiException if fails to make API call - */ - public List getClientRegistrationTemplates(Map headers) throws ApiException { - ApiResponse> localVarResponse = getClientRegistrationTemplatesWithHttpInfo(headers); - return localVarResponse.getData(); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo() throws ApiException { - return getClientRegistrationTemplatesWithHttpInfo(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @param headers Optional headers to include in the request - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplatesRequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/oauth2/config/template"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * Mail configuration template is set of default smtp settings for mail server that specific provider supports * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() throws ApiException { - return getClientRegistrationTemplates1(null); + public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates() throws ApiException { + return getClientRegistrationTemplates(null); } /** @@ -30600,8 +30171,8 @@ public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1(Map headers) throws ApiException { - ApiResponse localVarResponse = getClientRegistrationTemplates1WithHttpInfo(headers); + public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse localVarResponse = getClientRegistrationTemplatesWithHttpInfo(headers); return localVarResponse.getData(); } @@ -30611,8 +30182,8 @@ public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1(M * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo() throws ApiException { - return getClientRegistrationTemplates1WithHttpInfo(null); + public ApiResponse getClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getClientRegistrationTemplatesWithHttpInfo(null); } /** @@ -30622,8 +30193,8 @@ public ApiResponse getClientRegistratio * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplates1RequestBuilder(headers); + public ApiResponse getClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplatesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30634,7 +30205,7 @@ public ApiResponse getClientRegistratio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates1", localVarResponse); + throw getApiException("getClientRegistrationTemplates", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30670,7 +30241,7 @@ public ApiResponse getClientRegistratio } } - private HttpRequest.Builder getClientRegistrationTemplates1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -31494,50 +31065,50 @@ private HttpRequest.Builder getConvertersRequestBuilder(@javax.annotation.Nonnul } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @return List<Converter> * @throws ApiException if fails to make API call */ - public List getConvertersByIdsV2(@javax.annotation.Nonnull List converterIds) throws ApiException { - return getConvertersByIdsV2(converterIds, null); + public List getConvertersByIds(@javax.annotation.Nonnull List converterIds) throws ApiException { + return getConvertersByIds(converterIds, null); } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Converter> * @throws ApiException if fails to make API call */ - public List getConvertersByIdsV2(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getConvertersByIdsV2WithHttpInfo(converterIds, headers); + public List getConvertersByIds(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getConvertersByIdsWithHttpInfo(converterIds, headers); return localVarResponse.getData(); } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @return ApiResponse<List<Converter>> * @throws ApiException if fails to make API call */ - public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List converterIds) throws ApiException { - return getConvertersByIdsV2WithHttpInfo(converterIds, null); + public ApiResponse> getConvertersByIdsWithHttpInfo(@javax.annotation.Nonnull List converterIds) throws ApiException { + return getConvertersByIdsWithHttpInfo(converterIds, null); } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Converter>> * @throws ApiException if fails to make API call */ - public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getConvertersByIdsV2RequestBuilder(converterIds, headers); + public ApiResponse> getConvertersByIdsWithHttpInfo(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getConvertersByIdsRequestBuilder(converterIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -31548,7 +31119,7 @@ public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getConvertersByIdsV2", localVarResponse); + throw getApiException("getConvertersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -31584,10 +31155,10 @@ public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.anno } } - private HttpRequest.Builder getConvertersByIdsV2RequestBuilder(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { + private HttpRequest.Builder getConvertersByIdsRequestBuilder(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { // verify the required parameter 'converterIds' is set if (converterIds == null) { - throw new ApiException(400, "Missing the required parameter 'converterIds' when calling getConvertersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'converterIds' when calling getConvertersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -35544,50 +35115,50 @@ private HttpRequest.Builder getCustomersByEntityGroupIdRequestBuilder(@javax.ann } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2(customerIds, null); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIds(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getCustomersByIdsV2WithHttpInfo(customerIds, headers); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getCustomersByIdsWithHttpInfo(customerIds, headers); return localVarResponse.getData(); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2WithHttpInfo(customerIds, null); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIdsWithHttpInfo(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsV2RequestBuilder(customerIds, headers); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsRequestBuilder(customerIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -35598,7 +35169,7 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCustomersByIdsV2", localVarResponse); + throw getApiException("getCustomersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -35634,10 +35205,10 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota } } - private HttpRequest.Builder getCustomersByIdsV2RequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + private HttpRequest.Builder getCustomersByIdsRequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { // verify the required parameter 'customerIds' is set if (customerIds == null) { - throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -37478,50 +37049,50 @@ private HttpRequest.Builder getDeviceProfileInfosRequestBuilder(@javax.annotatio } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @return List<DeviceProfileInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2(deviceProfileIds, null); + public List getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIds(deviceProfileIds, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<DeviceProfileInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, headers); + public List getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, headers); return localVarResponse.getData(); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @return ApiResponse<List<DeviceProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, null); + public ApiResponse> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<DeviceProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsV2RequestBuilder(deviceProfileIds, headers); + public ApiResponse> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsRequestBuilder(deviceProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -37532,7 +37103,7 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDeviceProfileInfosByIdsV2", localVarResponse); + throw getApiException("getDeviceProfileInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -37568,10 +37139,10 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp } } - private HttpRequest.Builder getDeviceProfileInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getDeviceProfileInfosByIdsRequestBuilder(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { // verify the required parameter 'deviceProfileIds' is set if (deviceProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileIds' when calling getDeviceProfileInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileIds' when calling getDeviceProfileInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -37737,6 +37308,134 @@ private HttpRequest.Builder getDeviceProfileNamesRequestBuilder(@javax.annotatio return localVarRequestBuilder; } + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeys(deviceProfileId, null); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param headers Optional headers to include in the request + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, headers); + return localVarResponse.getData(); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @return ApiResponse<List<String>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, null); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<String>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileTimeseriesKeysRequestBuilder(deviceProfileId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDeviceProfileTimeseriesKeys", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDeviceProfileTimeseriesKeysRequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "deviceProfileId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Device Profiles (getDeviceProfiles) * Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. @@ -42946,50 +42645,50 @@ private HttpRequest.Builder getEntityGroupPermissionsRequestBuilder(@javax.annot } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @return List<EntityGroupInfo> * @throws ApiException if fails to make API call */ - public List getEntityGroupsByIdsV2(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { - return getEntityGroupsByIdsV2(entityGroupIds, null); + public List getEntityGroupsByIds(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { + return getEntityGroupsByIds(entityGroupIds, null); } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<EntityGroupInfo> * @throws ApiException if fails to make API call */ - public List getEntityGroupsByIdsV2(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getEntityGroupsByIdsV2WithHttpInfo(entityGroupIds, headers); + public List getEntityGroupsByIds(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getEntityGroupsByIdsWithHttpInfo(entityGroupIds, headers); return localVarResponse.getData(); } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @return ApiResponse<List<EntityGroupInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { - return getEntityGroupsByIdsV2WithHttpInfo(entityGroupIds, null); + public ApiResponse> getEntityGroupsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { + return getEntityGroupsByIdsWithHttpInfo(entityGroupIds, null); } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityGroupInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEntityGroupsByIdsV2RequestBuilder(entityGroupIds, headers); + public ApiResponse> getEntityGroupsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEntityGroupsByIdsRequestBuilder(entityGroupIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -43000,7 +42699,7 @@ public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@ja InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEntityGroupsByIdsV2", localVarResponse); + throw getApiException("getEntityGroupsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -43036,10 +42735,10 @@ public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@ja } } - private HttpRequest.Builder getEntityGroupsByIdsV2RequestBuilder(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { + private HttpRequest.Builder getEntityGroupsByIdsRequestBuilder(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { // verify the required parameter 'entityGroupIds' is set if (entityGroupIds == null) { - throw new ApiException(400, "Missing the required parameter 'entityGroupIds' when calling getEntityGroupsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'entityGroupIds' when calling getEntityGroupsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -44268,218 +43967,50 @@ private HttpRequest.Builder getEntityViewsByEntityGroupIdRequestBuilder(@javax.a } /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @return List<EntityView> - * @throws ApiException if fails to make API call - */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2(entityViewIds, null); - } - - /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return List<EntityView> - * @throws ApiException if fails to make API call - */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getEntityViewsByIdsV2WithHttpInfo(entityViewIds, headers); - return localVarResponse.getData(); - } - - /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @return ApiResponse<List<EntityView>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2WithHttpInfo(entityViewIds, null); - } - - /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityView>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsV2RequestBuilder(entityViewIds, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEntityViewsByIdsV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getEntityViewsByIdsV2RequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - // verify the required parameter 'entityViewIds' is set - if (entityViewIds == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIdsV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/entityViews/list"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "entityViewIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "entityViewIds", entityViewIds)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return PageDataEventInfo + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIds(entityViewIds, null); } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return PageDataEventInfo + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getEntityViewsByIdsWithHttpInfo(entityViewIds, headers); return localVarResponse.getData(); } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return ApiResponse<PageDataEventInfo> + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIdsWithHttpInfo(entityViewIds, null); } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEventInfo> + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEventsRequestBuilder(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsRequestBuilder(entityViewIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -44490,11 +44021,11 @@ public ApiResponse getEventsWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents", localVarResponse); + throw getApiException("getEntityViewsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -44504,10 +44035,10 @@ public ApiResponse getEventsWithHttpInfo(@javax.annotation.No String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEventInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -44526,53 +44057,21 @@ public ApiResponse getEventsWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents"); - } - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents"); + private HttpRequest.Builder getEntityViewsByIdsRequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + // verify the required parameter 'entityViewIds' is set + if (entityViewIds == null) { + throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/events/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); + String localVarPath = "/api/entityViews/list"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "tenantId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("tenantId", tenantId)); - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "entityViewIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "entityViewIds", entityViewIds)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -44600,7 +44099,7 @@ private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull St } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44616,12 +44115,12 @@ private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull St * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44638,13 +44137,13 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44660,12 +44159,12 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44682,8 +44181,8 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents1RequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByFilterRequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -44694,7 +44193,7 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents1", localVarResponse); + throw getApiException("getEventsByFilter", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -44730,30 +44229,30 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByFilterRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByFilter"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByFilter"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByFilter"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByFilter"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByFilter"); } // verify the required parameter 'eventFilter' is set if (eventFilter == null) { - throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEventsByFilter"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -44814,7 +44313,7 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44830,12 +44329,12 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44852,13 +44351,13 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44874,12 +44373,12 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -44896,8 +44395,8 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents2RequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByTypeRequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -44908,7 +44407,7 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents2", localVarResponse); + throw getApiException("getEventsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -44944,30 +44443,30 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByTypeRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByType"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByType"); } // verify the required parameter 'eventType' is set if (eventType == null) { - throw new ApiException(400, "Missing the required parameter 'eventType' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'eventType' when calling getEventsByType"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -45540,7 +45039,7 @@ private HttpRequest.Builder getFullTranslationRequestBuilder(@javax.annotation.N } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call @@ -45550,7 +45049,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() throws A } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode @@ -45562,7 +45061,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings(Map getGeneralUserSettin } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> @@ -47558,50 +47057,50 @@ private HttpRequest.Builder getIntegrationsRequestBuilder(@javax.annotation.Nonn } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @return List<Integration> * @throws ApiException if fails to make API call */ - public List getIntegrationsByIdsV2(@javax.annotation.Nonnull List integrationIds) throws ApiException { - return getIntegrationsByIdsV2(integrationIds, null); + public List getIntegrationsByIds(@javax.annotation.Nonnull List integrationIds) throws ApiException { + return getIntegrationsByIds(integrationIds, null); } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Integration> * @throws ApiException if fails to make API call */ - public List getIntegrationsByIdsV2(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getIntegrationsByIdsV2WithHttpInfo(integrationIds, headers); + public List getIntegrationsByIds(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getIntegrationsByIdsWithHttpInfo(integrationIds, headers); return localVarResponse.getData(); } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @return ApiResponse<List<Integration>> * @throws ApiException if fails to make API call */ - public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List integrationIds) throws ApiException { - return getIntegrationsByIdsV2WithHttpInfo(integrationIds, null); + public ApiResponse> getIntegrationsByIdsWithHttpInfo(@javax.annotation.Nonnull List integrationIds) throws ApiException { + return getIntegrationsByIdsWithHttpInfo(integrationIds, null); } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Integration>> * @throws ApiException if fails to make API call */ - public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getIntegrationsByIdsV2RequestBuilder(integrationIds, headers); + public ApiResponse> getIntegrationsByIdsWithHttpInfo(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getIntegrationsByIdsRequestBuilder(integrationIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -47612,7 +47111,7 @@ public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getIntegrationsByIdsV2", localVarResponse); + throw getApiException("getIntegrationsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -47648,10 +47147,10 @@ public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax. } } - private HttpRequest.Builder getIntegrationsByIdsV2RequestBuilder(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + private HttpRequest.Builder getIntegrationsByIdsRequestBuilder(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { // verify the required parameter 'integrationIds' is set if (integrationIds == null) { - throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling getIntegrationsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling getIntegrationsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -50022,6 +49521,115 @@ private HttpRequest.Builder getLwm2mListObjectsPageRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl() throws ApiException { + return getMailOAuth2AuthorizationUrl(null); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailOAuth2AuthorizationUrlWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo() throws ApiException { + return getMailOAuth2AuthorizationUrlWithHttpInfo(null); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailOAuth2AuthorizationUrlRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getMailOAuth2AuthorizationUrl", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getMailOAuth2AuthorizationUrlRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/admin/mail/oauth2/authorize"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/text, application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 log in processing URL (getMailProcessingUrl) * Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider and user consent for requested scope, it makes a redirect to this path so that the platform can do further log in processing and generating access tokens. Available for users with 'SYS_ADMIN' authority. @@ -50487,7 +50095,7 @@ private HttpRequest.Builder getMergedCustomTranslationRequestBuilder(@javax.anno } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @return QrCodeSettings * @throws ApiException if fails to make API call @@ -50497,7 +50105,7 @@ public QrCodeSettings getMergedMobileAppSettings() throws ApiException { } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @param headers Optional headers to include in the request * @return QrCodeSettings @@ -50509,7 +50117,7 @@ public QrCodeSettings getMergedMobileAppSettings(Map headers) th } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @return ApiResponse<QrCodeSettings> * @throws ApiException if fails to make API call @@ -50519,7 +50127,7 @@ public ApiResponse getMergedMobileAppSettingsWithHttpInfo() thro } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<QrCodeSettings> @@ -50823,7 +50431,7 @@ private HttpRequest.Builder getMobileAppBundleInfoByIdRequestBuilder(@javax.anno } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @return MobileApp @@ -50834,7 +50442,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id) throws ApiE } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -50847,7 +50455,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id, Map getMobileAppByIdWithHttpInfo(@javax.annotation.Non } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -52249,50 +51857,50 @@ private HttpRequest.Builder getNotificationTargetsRequestBuilder(@javax.annotati } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2(ids, null); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIds(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - ApiResponse> localVarResponse = getNotificationTargetsByIdsV2WithHttpInfo(ids, headers); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + ApiResponse> localVarResponse = getNotificationTargetsByIdsWithHttpInfo(ids, headers); return localVarResponse.getData(); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2WithHttpInfo(ids, null); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIdsWithHttpInfo(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsV2RequestBuilder(ids, headers); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsRequestBuilder(ids, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -52303,7 +51911,7 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsByIdsV2", localVarResponse); + throw getApiException("getNotificationTargetsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -52339,10 +51947,10 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt } } - private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsByIdsRequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { // verify the required parameter 'ids' is set if (ids == null) { - throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -52381,7 +51989,7 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -52392,12 +52000,12 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -52409,13 +52017,13 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -52426,12 +52034,12 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -52443,8 +52051,8 @@ public ApiResponse getNotificationTargetsBySupported * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeRequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -52455,7 +52063,7 @@ public ApiResponse getNotificationTargetsBySupported InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsBySupportedNotificationTypeV2", localVarResponse); + throw getApiException("getNotificationTargetsBySupportedNotificationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -52491,18 +52099,18 @@ public ApiResponse getNotificationTargetsBySupported } } - private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeRequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'notificationType' is set if (notificationType == null) { - throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -53123,6 +52731,115 @@ private HttpRequest.Builder getOAuth2ClientByIdRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates() throws ApiException { + return getOAuth2ClientRegistrationTemplates(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse> localVarResponse = getOAuth2ClientRegistrationTemplatesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getOAuth2ClientRegistrationTemplatesWithHttpInfo(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientRegistrationTemplatesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getOAuth2ClientRegistrationTemplates", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getOAuth2ClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/oauth2/config/template"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 clients (getOAuth2Clients) * Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header) @@ -53654,7 +53371,7 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -53666,12 +53383,12 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileIdAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileIdAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -53684,13 +53401,13 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileIdAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -53702,12 +53419,12 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -53720,8 +53437,8 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getOtaPackages1RequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOtaPackagesByDeviceProfileIdAndTypeRequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -53732,7 +53449,7 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getOtaPackages1", localVarResponse); + throw getApiException("getOtaPackagesByDeviceProfileIdAndType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -53768,22 +53485,22 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an } } - private HttpRequest.Builder getOtaPackages1RequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getOtaPackagesByDeviceProfileIdAndTypeRequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'deviceProfileId' is set if (deviceProfileId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackagesByDeviceProfileIdAndType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackagesByDeviceProfileIdAndType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackagesByDeviceProfileIdAndType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackagesByDeviceProfileIdAndType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -54815,7 +54532,7 @@ private HttpRequest.Builder getPrivacyPolicyRequestBuilder(@javax.annotation.Nul } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @return QrCodeSettings * @throws ApiException if fails to make API call @@ -54825,7 +54542,7 @@ public QrCodeSettings getQrCodeSettings() throws ApiException { } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @param headers Optional headers to include in the request * @return QrCodeSettings @@ -54837,7 +54554,7 @@ public QrCodeSettings getQrCodeSettings(Map headers) throws ApiE } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @return ApiResponse<QrCodeSettings> * @throws ApiException if fails to make API call @@ -54847,7 +54564,7 @@ public ApiResponse getQrCodeSettingsWithHttpInfo() throws ApiExc } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<QrCodeSettings> @@ -55278,50 +54995,50 @@ private HttpRequest.Builder getQueueStatsByIdRequestBuilder(@javax.annotation.No } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2(queueStatsIds, null); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIds(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, headers); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getQueueStatsByIdsWithHttpInfo(queueStatsIds, headers); return localVarResponse.getData(); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, null); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIdsWithHttpInfo(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsV2RequestBuilder(queueStatsIds, headers); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsRequestBuilder(queueStatsIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -55332,7 +55049,7 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getQueueStatsByIdsV2", localVarResponse); + throw getApiException("getQueueStatsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -55368,10 +55085,10 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann } } - private HttpRequest.Builder getQueueStatsByIdsV2RequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + private HttpRequest.Builder getQueueStatsByIdsRequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { // verify the required parameter 'queueStatsIds' is set if (queueStatsIds == null) { - throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -56148,6 +55865,138 @@ private HttpRequest.Builder getReportInfosRequestBuilder(@javax.annotation.Nonnu return localVarRequestBuilder; } + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @return List<ReportInfo> + * @throws ApiException if fails to make API call + */ + public List getReportInfosByIds(@javax.annotation.Nonnull List strReportIds) throws ApiException { + return getReportInfosByIds(strReportIds, null); + } + + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @param headers Optional headers to include in the request + * @return List<ReportInfo> + * @throws ApiException if fails to make API call + */ + public List getReportInfosByIds(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getReportInfosByIdsWithHttpInfo(strReportIds, headers); + return localVarResponse.getData(); + } + + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @return ApiResponse<List<ReportInfo>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getReportInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List strReportIds) throws ApiException { + return getReportInfosByIdsWithHttpInfo(strReportIds, null); + } + + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<ReportInfo>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getReportInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getReportInfosByIdsRequestBuilder(strReportIds, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getReportInfosByIds", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getReportInfosByIdsRequestBuilder(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { + // verify the required parameter 'strReportIds' is set + if (strReportIds == null) { + throw new ApiException(400, "Missing the required parameter 'strReportIds' when calling getReportInfosByIds"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v2/reportInfos"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "strReportIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "strReportIds", strReportIds)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Report Template (getReportTemplateById) * Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -56676,138 +56525,6 @@ private HttpRequest.Builder getReportsRequestBuilder(@javax.annotation.Nonnull I return localVarRequestBuilder; } - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @return List<ReportInfo> - * @throws ApiException if fails to make API call - */ - public List getReports1(@javax.annotation.Nonnull List strReportIds) throws ApiException { - return getReports1(strReportIds, null); - } - - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return List<ReportInfo> - * @throws ApiException if fails to make API call - */ - public List getReports1(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getReports1WithHttpInfo(strReportIds, headers); - return localVarResponse.getData(); - } - - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @return ApiResponse<List<ReportInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getReports1WithHttpInfo(@javax.annotation.Nonnull List strReportIds) throws ApiException { - return getReports1WithHttpInfo(strReportIds, null); - } - - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<ReportInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getReports1WithHttpInfo(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getReports1RequestBuilder(strReportIds, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getReports1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getReports1RequestBuilder(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { - // verify the required parameter 'strReportIds' is set - if (strReportIds == null) { - throw new ApiException(400, "Missing the required parameter 'strReportIds' when calling getReports1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v2/reportInfos"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "strReportIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "strReportIds", strReportIds)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get repository settings (getRepositorySettings) * Get the repository settings object. Available for users with 'TENANT_ADMIN' authority. @@ -57863,50 +57580,50 @@ private HttpRequest.Builder getRolesRequestBuilder(@javax.annotation.Nonnull Str } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @return List<Role> * @throws ApiException if fails to make API call */ - public List getRolesByIdsV2(@javax.annotation.Nonnull List roleIds) throws ApiException { - return getRolesByIdsV2(roleIds, null); + public List getRolesByIds(@javax.annotation.Nonnull List roleIds) throws ApiException { + return getRolesByIds(roleIds, null); } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Role> * @throws ApiException if fails to make API call */ - public List getRolesByIdsV2(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getRolesByIdsV2WithHttpInfo(roleIds, headers); + public List getRolesByIds(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getRolesByIdsWithHttpInfo(roleIds, headers); return localVarResponse.getData(); } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @return ApiResponse<List<Role>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List roleIds) throws ApiException { - return getRolesByIdsV2WithHttpInfo(roleIds, null); + public ApiResponse> getRolesByIdsWithHttpInfo(@javax.annotation.Nonnull List roleIds) throws ApiException { + return getRolesByIdsWithHttpInfo(roleIds, null); } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Role>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getRolesByIdsV2RequestBuilder(roleIds, headers); + public ApiResponse> getRolesByIdsWithHttpInfo(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRolesByIdsRequestBuilder(roleIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -57917,7 +57634,7 @@ public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getRolesByIdsV2", localVarResponse); + throw getApiException("getRolesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -57953,10 +57670,10 @@ public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder getRolesByIdsV2RequestBuilder(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { + private HttpRequest.Builder getRolesByIdsRequestBuilder(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { // verify the required parameter 'roleIds' is set if (roleIds == null) { - throw new ApiException(400, "Missing the required parameter 'roleIds' when calling getRolesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'roleIds' when calling getRolesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -58633,50 +58350,50 @@ private HttpRequest.Builder getRuleChainsRequestBuilder(@javax.annotation.Nonnul } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2(ruleChainIds, null); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIds(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, headers); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getRuleChainsByIdsWithHttpInfo(ruleChainIds, headers); return localVarResponse.getData(); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, null); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIdsWithHttpInfo(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsV2RequestBuilder(ruleChainIds, headers); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsRequestBuilder(ruleChainIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -58687,7 +58404,7 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getRuleChainsByIdsV2", localVarResponse); + throw getApiException("getRuleChainsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -58723,10 +58440,10 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno } } - private HttpRequest.Builder getRuleChainsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + private HttpRequest.Builder getRuleChainsByIdsRequestBuilder(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { // verify the required parameter 'ruleChainIds' is set if (ruleChainIds == null) { - throw new ApiException(400, "Missing the required parameter 'ruleChainIds' when calling getRuleChainsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ruleChainIds' when calling getRuleChainsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -59351,50 +59068,50 @@ private HttpRequest.Builder getSchedulerEventsRequestBuilder(@javax.annotation.N } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @return List<SchedulerEventInfo> * @throws ApiException if fails to make API call */ - public List getSchedulerEventsByIdsV2(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { - return getSchedulerEventsByIdsV2(schedulerEventIds, null); + public List getSchedulerEventsByIds(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { + return getSchedulerEventsByIds(schedulerEventIds, null); } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<SchedulerEventInfo> * @throws ApiException if fails to make API call */ - public List getSchedulerEventsByIdsV2(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getSchedulerEventsByIdsV2WithHttpInfo(schedulerEventIds, headers); + public List getSchedulerEventsByIds(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getSchedulerEventsByIdsWithHttpInfo(schedulerEventIds, headers); return localVarResponse.getData(); } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @return ApiResponse<List<SchedulerEventInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSchedulerEventsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { - return getSchedulerEventsByIdsV2WithHttpInfo(schedulerEventIds, null); + public ApiResponse> getSchedulerEventsByIdsWithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { + return getSchedulerEventsByIdsWithHttpInfo(schedulerEventIds, null); } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<SchedulerEventInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSchedulerEventsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSchedulerEventsByIdsV2RequestBuilder(schedulerEventIds, headers); + public ApiResponse> getSchedulerEventsByIdsWithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSchedulerEventsByIdsRequestBuilder(schedulerEventIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -59405,7 +59122,7 @@ public ApiResponse> getSchedulerEventsByIdsV2WithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getSchedulerEventsByIdsV2", localVarResponse); + throw getApiException("getSchedulerEventsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -59441,10 +59158,10 @@ public ApiResponse> getSchedulerEventsByIdsV2WithHttpIn } } - private HttpRequest.Builder getSchedulerEventsByIdsV2RequestBuilder(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { + private HttpRequest.Builder getSchedulerEventsByIdsRequestBuilder(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { // verify the required parameter 'schedulerEventIds' is set if (schedulerEventIds == null) { - throw new ApiException(400, "Missing the required parameter 'schedulerEventIds' when calling getSchedulerEventsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'schedulerEventIds' when calling getSchedulerEventsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -61585,50 +61302,50 @@ private HttpRequest.Builder getSystemInfoRequestBuilder(Map head } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2(resourceIds, null); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIds(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, headers); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, headers); return localVarResponse.getData(); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, null); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsV2RequestBuilder(resourceIds, headers); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsRequestBuilder(resourceIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -61639,7 +61356,7 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getSystemOrTenantResourcesByIdsV2", localVarResponse); + throw getApiException("getSystemOrTenantResourcesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -61675,10 +61392,10 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt } } - private HttpRequest.Builder getSystemOrTenantResourcesByIdsV2RequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + private HttpRequest.Builder getSystemOrTenantResourcesByIdsRequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { // verify the required parameter 'resourceIds' is set if (resourceIds == null) { - throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -61886,7 +61603,7 @@ private HttpRequest.Builder getTenantAdminsRequestBuilder(@javax.annotation.Nonn } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @return Asset @@ -61897,7 +61614,7 @@ public Asset getTenantAssetByName(@javax.annotation.Nonnull String assetName) th } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @param headers Optional headers to include in the request @@ -61910,7 +61627,7 @@ public Asset getTenantAssetByName(@javax.annotation.Nonnull String assetName, Ma } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @return ApiResponse<Asset> @@ -61921,7 +61638,7 @@ public ApiResponse getTenantAssetByNameWithHttpInfo(@javax.annotation.Non } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @param headers Optional headers to include in the request @@ -62434,27 +62151,27 @@ private HttpRequest.Builder getTenantCustomerRequestBuilder(@javax.annotation.No } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -62462,33 +62179,33 @@ public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Strin * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -62496,8 +62213,8 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -62544,11 +62261,7 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax } } - private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboards"); - } + private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards"); @@ -62560,8 +62273,7 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/{tenantId}/dashboards" - .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); + String localVarPath = "/api/tenant/dashboards"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -62570,6 +62282,8 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "mobile"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -62603,27 +62317,27 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -62631,33 +62345,33 @@ public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Inte * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -62665,8 +62379,8 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboards1RequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsByTenantIdRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -62677,7 +62391,7 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantDashboards1", localVarResponse); + throw getApiException("getTenantDashboardsByTenantId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -62713,19 +62427,24 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java } } - private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getTenantDashboardsByTenantIdRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboardsByTenantId"); + } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboardsByTenantId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboardsByTenantId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/dashboards"; + String localVarPath = "/api/tenant/{tenantId}/dashboards" + .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -62734,8 +62453,6 @@ private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "mobile"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -64210,7 +63927,7 @@ private HttpRequest.Builder getTenantMobileAppBundleInfosRequestBuilder(@javax.a } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -64226,7 +63943,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -64244,7 +63961,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -64260,7 +63977,7 @@ public ApiResponse getTenantMobileAppsWithHttpInfo(@javax.ann } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -65512,7 +65229,7 @@ private HttpRequest.Builder getTenantQueuesByServiceTypeRequestBuilder(@javax.an } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -65527,7 +65244,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -65544,7 +65261,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -65559,7 +65276,7 @@ public ApiResponse getTenantResourcesWithHttpInfo(@javax } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -66159,50 +65876,50 @@ private HttpRequest.Builder getTenantsRequestBuilder(@javax.annotation.Nonnull I } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2(tenantIds, null); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIds(tenantIds, null); } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTenantsByIdsV2WithHttpInfo(tenantIds, headers); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getTenantsByIdsWithHttpInfo(tenantIds, headers); return localVarResponse.getData(); } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2WithHttpInfo(tenantIds, null); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIdsWithHttpInfo(tenantIds, null); } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsV2RequestBuilder(tenantIds, headers); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsRequestBuilder(tenantIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -66213,7 +65930,7 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantsByIdsV2", localVarResponse); + throw getApiException("getTenantsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -66249,10 +65966,10 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation } } - private HttpRequest.Builder getTenantsByIdsV2RequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + private HttpRequest.Builder getTenantsByIdsRequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { // verify the required parameter 'tenantIds' is set if (tenantIds == null) { - throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -66906,134 +66623,6 @@ private HttpRequest.Builder getTimeseriesKeysRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTimeseriesKeys1WithHttpInfo(deviceProfileId, headers); - return localVarResponse.getData(); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1WithHttpInfo(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTimeseriesKeys1RequestBuilder(deviceProfileId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTimeseriesKeys1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getTimeseriesKeys1RequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "deviceProfileId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get end-user multi-translation for basic edit (getTranslationForBasicEdit) * Fetch the translation info map where value is info object containing key translation, origin translation, translation of parent level, translation status. @@ -71177,50 +70766,50 @@ private HttpRequest.Builder getUsersByEntityGroupIdRequestBuilder(@javax.annotat } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2(userIds, null); + public List getUsersByIds(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIds(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getUsersByIdsV2WithHttpInfo(userIds, headers); + public List getUsersByIds(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getUsersByIdsWithHttpInfo(userIds, headers); return localVarResponse.getData(); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2WithHttpInfo(userIds, null); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIdsWithHttpInfo(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getUsersByIdsV2RequestBuilder(userIds, headers); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getUsersByIdsRequestBuilder(userIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71231,7 +70820,7 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getUsersByIdsV2", localVarResponse); + throw getApiException("getUsersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -71267,10 +70856,10 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder getUsersByIdsV2RequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + private HttpRequest.Builder getUsersByIdsRequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { // verify the required parameter 'userIds' is set if (userIds == null) { - throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -73275,46 +72864,51 @@ private HttpRequest.Builder getWidgetsBundlesListRequestBuilder(@javax.annotatio } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return List<WidgetsBundle> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2() throws ApiException { - return getWidgetsBundlesV2(null); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + handleMailOAuth2Callback(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return List<WidgetsBundle> * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2(Map headers) throws ApiException { - ApiResponse> localVarResponse = getWidgetsBundlesV2WithHttpInfo(headers); - return localVarResponse.getData(); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + handleMailOAuth2CallbackWithHttpInfo(code, state, headers); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return ApiResponse<List<WidgetsBundle>> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo() throws ApiException { - return getWidgetsBundlesV2WithHttpInfo(null); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + return handleMailOAuth2CallbackWithHttpInfo(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetsBundle>> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getWidgetsBundlesV2RequestBuilder(headers); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleMailOAuth2CallbackRequestBuilder(code, state, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -73325,27 +72919,16 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -73361,13 +72944,38 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { + private HttpRequest.Builder handleMailOAuth2CallbackRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException(400, "Missing the required parameter 'code' when calling handleMailOAuth2Callback"); + } + // verify the required parameter 'state' is set + if (state == null) { + throw new ApiException(400, "Missing the required parameter 'state' when calling handleMailOAuth2Callback"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/widgetsBundles/all"; + String localVarPath = "/api/admin/mail/oauth2/code"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "code"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); + localVarQueryParameterBaseName = "state"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Accept", "application/json"); @@ -73384,54 +72992,54 @@ private HttpRequest.Builder getWidgetsBundlesV2RequestBuilder(Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -73442,7 +73050,7 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -73478,19 +73086,19 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/oneway/{deviceId}" + String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -73511,54 +73119,54 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1(deviceId, body, null); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -73569,7 +73177,7 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -73605,19 +73213,19 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" + String localVarPath = "/api/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -73638,7 +73246,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -73646,12 +73254,12 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest(entityType, entityId, body, null); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntity(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -73660,13 +73268,13 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, headers); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, headers); return localVarResponse.getData(); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -73674,12 +73282,12 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -73688,8 +73296,8 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestRequestBuilder(entityType, entityId, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityRequestBuilder(entityType, entityId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -73700,7 +73308,7 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -73736,18 +73344,18 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation } } - private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -73774,62 +73382,66 @@ private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotat } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1(entityType, entityId, timeout, body, null); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest1RequestBuilder(entityType, entityId, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(entityType, entityId, queueName, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -73840,7 +73452,7 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest1", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithQueueAndTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -73876,29 +73488,34 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); + } + // verify the required parameter 'queueName' is set + if (queueName == null) { + throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) + .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -73919,66 +73536,62 @@ private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annota } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body, null); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest2RequestBuilder(entityType, entityId, queueName, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(entityType, entityId, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -73989,7 +73602,7 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest2", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -74025,34 +73638,29 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest2"); - } - // verify the required parameter 'queueName' is set - if (queueName == null) { - throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) - .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -74073,50 +73681,50 @@ private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annota } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3(body, null); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUser(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest3WithHttpInfo(body, headers); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForUserWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3WithHttpInfo(body, null); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUserWithHttpInfo(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest3RequestBuilder(body, headers); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForUserRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -74127,7 +73735,7 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest3", localVarResponse); + throw getApiException("handleRuleEngineRequestForUser", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -74163,10 +73771,10 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForUserRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest3"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -74191,54 +73799,54 @@ private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annota } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -74249,7 +73857,7 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -74285,19 +73893,19 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/twoway/{deviceId}" + String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -74318,54 +73926,54 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -74376,7 +73984,7 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -74412,19 +74020,19 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" + String localVarPath = "/api/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -80121,7 +79729,7 @@ private HttpRequest.Builder publicConnectToTrendzRequestBuilder(Map putGeneralUserSettingsWithHttpInfo(@javax.annotation.Nu } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @param headers Optional headers to include in the request @@ -80230,7 +79838,7 @@ private HttpRequest.Builder putGeneralUserSettingsRequestBuilder(@javax.annotati } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -80241,7 +79849,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -80253,7 +79861,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -80265,7 +79873,7 @@ public ApiResponse putUserSettingsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -83573,6 +83181,129 @@ private HttpRequest.Builder saveCalculatedFieldRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + ApiResponse localVarResponse = saveClaimingInfoWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfoWithHttpInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveClaimingInfoRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveClaimingInfo", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveClaimingInfoRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling saveClaimingInfo"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/claim" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients @@ -84812,148 +84543,6 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { - return saveDeviceWithCredentials(requestBody, entityGroupId, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @param headers Optional headers to include in the request - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, headers); - return localVarResponse.getData(); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { - return saveDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(requestBody, entityGroupId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { - // verify the required parameter 'requestBody' is set - if (requestBody == null) { - throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveDeviceWithCredentials"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/lwm2m/device-credentials"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "entityGroupId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("entityGroupId", entityGroupId)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Create Device (saveDevice) with credentials * 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)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -84966,8 +84555,8 @@ private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annot * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -84983,8 +84572,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); return localVarResponse.getData(); } @@ -85000,8 +84589,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -85017,8 +84606,8 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentials1RequestBuilder(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -85029,7 +84618,7 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials1", localVarResponse); + throw getApiException("saveDeviceWithCredentials", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -85065,10 +84654,10 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat } } - private HttpRequest.Builder saveDeviceWithCredentials1RequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { // verify the required parameter 'saveDeviceWithCredentialsRequest' is set if (saveDeviceWithCredentialsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials1"); + throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -86922,6 +86511,148 @@ private HttpRequest.Builder saveLoginWhiteLabelParamsRequestBuilder(@javax.annot return localVarRequestBuilder; } + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { + return saveLwm2mDeviceWithCredentials(requestBody, entityGroupId, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @param headers Optional headers to include in the request + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { + ApiResponse localVarResponse = saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, headers); + return localVarResponse.getData(); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { + return saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveLwm2mDeviceWithCredentialsRequestBuilder(requestBody, entityGroupId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveLwm2mDeviceWithCredentials", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveLwm2mDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveLwm2mDeviceWithCredentials"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/lwm2m/device-credentials"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "entityGroupId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("entityGroupId", entityGroupId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Save the Mail templates settings (saveMailTemplates) * Creates or Updates the Mail templates settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. @@ -88481,7 +88212,7 @@ private HttpRequest.Builder savePlatformTwoFaSettingsRequestBuilder(@javax.annot } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @return QrCodeSettings @@ -88492,7 +88223,7 @@ public QrCodeSettings saveQrCodeSettings(@javax.annotation.Nonnull QrCodeSetting } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @param headers Optional headers to include in the request @@ -88505,7 +88236,7 @@ public QrCodeSettings saveQrCodeSettings(@javax.annotation.Nonnull QrCodeSetting } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @return ApiResponse<QrCodeSettings> @@ -88516,7 +88247,7 @@ public ApiResponse saveQrCodeSettingsWithHttpInfo(@javax.annotat } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @param headers Optional headers to include in the request @@ -88753,10 +88484,11 @@ private HttpRequest.Builder saveQueueRequestBuilder(@javax.annotation.Nonnull St * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - saveRelation(entityRelation, null); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + return saveRelation(entityRelation, null); } /** @@ -88764,20 +88496,22 @@ public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - saveRelationWithHttpInfo(entityRelation, headers); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + ApiResponse localVarResponse = saveRelationWithHttpInfo(entityRelation, headers); + return localVarResponse.getData(); } /** * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { return saveRelationWithHttpInfo(entityRelation, null); } @@ -88786,10 +88520,10 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = saveRelationRequestBuilder(entityRelation, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -88804,118 +88538,6 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti throw getApiException("saveRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - // verify the required parameter 'entityRelation' is set - if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelation); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRelationV2WithHttpInfo(entityRelation, headers); - return localVarResponse.getData(); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2WithHttpInfo(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRelationV2RequestBuilder(entityRelation, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -88949,10 +88571,10 @@ public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder saveRelationV2RequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { // verify the required parameter 'entityRelation' is set if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelationV2"); + throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -89604,129 +89226,6 @@ private HttpRequest.Builder saveRuleChainRequestBuilder(@javax.annotation.Nonnul return localVarRequestBuilder; } - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, headers); - return localVarResponse.getData(); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRuleChain1RequestBuilder(defaultRuleChainCreateRequest, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRuleChain1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRuleChain1RequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - // verify the required parameter 'defaultRuleChainCreateRequest' is set - if (defaultRuleChainCreateRequest == null) { - throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling saveRuleChain1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/ruleChain/device/default"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Update Rule Chain Metadata * Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. @@ -91764,115 +91263,6 @@ private HttpRequest.Builder sendActivationEmailRequestBuilder(@javax.annotation. return localVarRequestBuilder; } - /** - * sendActivationEmail - * - * @param body (required) - * @throws ApiException if fails to make API call - */ - public void sendActivationEmail1(@javax.annotation.Nullable Object body) throws ApiException { - sendActivationEmail1(body, null); - } - - /** - * sendActivationEmail - * - * @param body (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void sendActivationEmail1(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - sendActivationEmail1WithHttpInfo(body, headers); - } - - /** - * sendActivationEmail - * - * @param body (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse sendActivationEmail1WithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { - return sendActivationEmail1WithHttpInfo(body, null); - } - - /** - * sendActivationEmail - * - * @param body (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse sendActivationEmail1WithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = sendActivationEmail1RequestBuilder(body, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("sendActivationEmail1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder sendActivationEmail1RequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling sendActivationEmail1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/billingEndpoint/sendActivation"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Send add-on access error notification to System/Tenant administrators (sendAddonAccessError) * Send add-on access error notification by Tenant Administrator or Customer User to System/Tenant administrators. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -92081,6 +91471,115 @@ private HttpRequest.Builder sendAddonAccessRequestRequestBuilder(@javax.annotati return localVarRequestBuilder; } + /** + * sendBillingActivationEmail + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void sendBillingActivationEmail(@javax.annotation.Nullable Object body) throws ApiException { + sendBillingActivationEmail(body, null); + } + + /** + * sendBillingActivationEmail + * + * @param body (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void sendBillingActivationEmail(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + sendBillingActivationEmailWithHttpInfo(body, headers); + } + + /** + * sendBillingActivationEmail + * + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse sendBillingActivationEmailWithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { + return sendBillingActivationEmailWithHttpInfo(body, null); + } + + /** + * sendBillingActivationEmail + * + * @param body (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse sendBillingActivationEmailWithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sendBillingActivationEmailRequestBuilder(body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("sendBillingActivationEmail", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder sendBillingActivationEmailRequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling sendBillingActivationEmail"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/billingEndpoint/sendActivation"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * sendChatMessage * @@ -93567,6 +93066,129 @@ private HttpRequest.Builder setDefaultTenantProfileRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @return RuleChain + * @throws ApiException if fails to make API call + */ + public RuleChain setDeviceDefaultRuleChain(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { + return setDeviceDefaultRuleChain(defaultRuleChainCreateRequest, null); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @param headers Optional headers to include in the request + * @return RuleChain + * @throws ApiException if fails to make API call + */ + public RuleChain setDeviceDefaultRuleChain(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = setDeviceDefaultRuleChainWithHttpInfo(defaultRuleChainCreateRequest, headers); + return localVarResponse.getData(); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @return ApiResponse<RuleChain> + * @throws ApiException if fails to make API call + */ + public ApiResponse setDeviceDefaultRuleChainWithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { + return setDeviceDefaultRuleChainWithHttpInfo(defaultRuleChainCreateRequest, null); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<RuleChain> + * @throws ApiException if fails to make API call + */ + public ApiResponse setDeviceDefaultRuleChainWithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = setDeviceDefaultRuleChainRequestBuilder(defaultRuleChainCreateRequest, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("setDeviceDefaultRuleChain", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder setDeviceDefaultRuleChainRequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + // verify the required parameter 'defaultRuleChainCreateRequest' is set + if (defaultRuleChainCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling setDeviceDefaultRuleChain"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/ruleChain/device/default"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Set root rule chain for provided edge (setEdgeRootRuleChain) * Change root rule chain of the edge to the new provided rule chain. This operation will send a notification to update root rule chain on remote edge service. Available for users with 'TENANT_ADMIN' authority. @@ -95739,106 +95361,11 @@ public ApiResponse tenantWhiteLabelingAllowedWithHttpInfo(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/tenant/whiteLabelingAllowed"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * tenantWhiteLabelingAllowed - * - * @throws ApiException if fails to make API call - */ - public void tenantWhiteLabelingAllowed1() throws ApiException { - tenantWhiteLabelingAllowed1(null); - } - - /** - * tenantWhiteLabelingAllowed - * - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void tenantWhiteLabelingAllowed1(Map headers) throws ApiException { - tenantWhiteLabelingAllowed1WithHttpInfo(headers); - } - - /** - * tenantWhiteLabelingAllowed - * - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse tenantWhiteLabelingAllowed1WithHttpInfo() throws ApiException { - return tenantWhiteLabelingAllowed1WithHttpInfo(null); - } - - /** - * tenantWhiteLabelingAllowed - * - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse tenantWhiteLabelingAllowed1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = tenantWhiteLabelingAllowed1RequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("tenantWhiteLabelingAllowed1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder tenantWhiteLabelingAllowed1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder tenantWhiteLabelingAllowedRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/cloudEndpoint/tenant/permission/whiteLabelingAllowed"; + String localVarPath = "/api/tenant/whiteLabelingAllowed"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -95965,6 +95492,129 @@ private HttpRequest.Builder termsOfUseAcceptedRequestBuilder(Map return localVarRequestBuilder; } + /** + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScript(body, null); + } + + /** + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) + * @param headers Optional headers to include in the request + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + ApiResponse localVarResponse = testCalculatedFieldScriptWithHttpInfo(body, headers); + return localVarResponse.getData(); + } + + /** + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScriptWithHttpInfo(body, null); + } + + /** + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testCalculatedFieldScriptRequestBuilder(body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testCalculatedFieldScript", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testCalculatedFieldScriptRequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling testCalculatedFieldScript"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/calculatedField/testScript"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Test converter function (testDownLinkConverter) * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. @@ -96108,7 +95758,7 @@ private HttpRequest.Builder testDownLinkConverterRequestBuilder(@javax.annotatio } /** - * Download test report (downloadTestReport) + * Download test report (testReportAndDownload) * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. * @param reportRequest (required) * @return File @@ -96119,7 +95769,7 @@ public File testReportAndDownload(@javax.annotation.Nonnull ReportRequest report } /** - * Download test report (downloadTestReport) + * Download test report (testReportAndDownload) * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. * @param reportRequest (required) * @param headers Optional headers to include in the request @@ -96132,7 +95782,7 @@ public File testReportAndDownload(@javax.annotation.Nonnull ReportRequest report } /** - * Download test report (downloadTestReport) + * Download test report (testReportAndDownload) * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. * @param reportRequest (required) * @return ApiResponse<File> @@ -96143,7 +95793,7 @@ public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Non } /** - * Download test report (downloadTestReport) + * Download test report (testReportAndDownload) * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. * @param reportRequest (required) * @param headers Optional headers to include in the request @@ -96237,8 +95887,8 @@ private HttpRequest.Builder testReportAndDownloadRequestBuilder(@javax.annotatio * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScript(body, scriptLang, null); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScript(body, scriptLang, null); } /** @@ -96250,8 +95900,8 @@ public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Null * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - ApiResponse localVarResponse = testScriptWithHttpInfo(body, scriptLang, headers); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + ApiResponse localVarResponse = testRuleChainScriptWithHttpInfo(body, scriptLang, headers); return localVarResponse.getData(); } @@ -96263,8 +95913,8 @@ public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Null * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScriptWithHttpInfo(body, scriptLang, null); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScriptWithHttpInfo(body, scriptLang, null); } /** @@ -96276,8 +95926,8 @@ public ApiResponse testScriptWithHttpIn * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScriptRequestBuilder(body, scriptLang, headers); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testRuleChainScriptRequestBuilder(body, scriptLang, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -96288,7 +95938,7 @@ public ApiResponse testScriptWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript", localVarResponse); + throw getApiException("testRuleChainScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -96324,10 +95974,10 @@ public ApiResponse testScriptWithHttpIn } } - private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + private HttpRequest.Builder testRuleChainScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testRuleChainScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -96371,129 +96021,6 @@ private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable return localVarRequestBuilder; } - /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1(body, null); - } - - /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) - * @param headers Optional headers to include in the request - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - ApiResponse localVarResponse = testScript1WithHttpInfo(body, headers); - return localVarResponse.getData(); - } - - /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1WithHttpInfo(body, null); - } - - /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScript1RequestBuilder(body, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder testScript1RequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/calculatedField/testScript"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Test converter function (testUpLinkConverter) * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ }, \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\", \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/_** Decoder **_/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/_** Helper functions **_/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\" } ``` * 'metadata' - integration metadata; * 'payload' - base64 string representation of the data; * 'decoder' - string representation of the decoder configuration; * 'converter' - JSON object representing converter. ## Response Body Example ```json { \"output\":\"{\\\"deviceName\\\":\\\"Device A\\\",\\\"deviceType\\\":\\\"thermostat\\\",\\\"customerName\\\":\\\"customer\\\",\\\"groupName\\\":\\\"thermostat devices\\\",\\\"attributes\\\":{\\\"model\\\":\\\"Model A\\\",\\\"serialNumber\\\":\\\"SN111\\\"},\\\"telemetry\\\":{\\\"temperature\\\":42,\\\"humidity\\\":80,\\\"rawData\\\":\\\"{\\\\n \\\\\\\"data\\\\\\\": \\\\\\\"data\\\\\\\"\\\\n}\\\"}}\", \"error\":\"\" } ``` * 'output' - string representation of the output message; * 'error' - string representation of the error message. @@ -98932,42 +98459,42 @@ private HttpRequest.Builder updateImagePublicStatusRequestBuilder(@javax.annotat } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients(id, UUID, null); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateMobileAppBundleOauth2Clients(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2ClientsWithHttpInfo(id, UUID, headers); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, headers); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2ClientsWithHttpInfo(id, UUID, null); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) @@ -98975,8 +98502,8 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2ClientsRequestBuilder(id, UUID, headers); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateMobileAppBundleOauth2ClientsRequestBuilder(id, UUID, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -98987,7 +98514,7 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients", localVarResponse); + throw getApiException("updateMobileAppBundleOauth2Clients", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -99012,14 +98539,14 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + private HttpRequest.Builder updateMobileAppBundleOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateMobileAppBundleOauth2Clients"); } // verify the required parameter 'UUID' is set if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateMobileAppBundleOauth2Clients"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -99056,8 +98583,8 @@ private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation. * @param UUID (required) * @throws ApiException if fails to make API call */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients1(id, UUID, null); + public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateOauth2Clients(id, UUID, null); } /** @@ -99068,8 +98595,8 @@ public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annot * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2Clients1WithHttpInfo(id, UUID, headers); + public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateOauth2ClientsWithHttpInfo(id, UUID, headers); } /** @@ -99080,8 +98607,8 @@ public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annot * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2Clients1WithHttpInfo(id, UUID, null); + public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateOauth2ClientsWithHttpInfo(id, UUID, null); } /** @@ -99093,8 +98620,8 @@ public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonn * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2Clients1RequestBuilder(id, UUID, headers); + public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateOauth2ClientsRequestBuilder(id, UUID, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -99105,7 +98632,7 @@ public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients1", localVarResponse); + throw getApiException("updateOauth2Clients", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -99130,14 +98657,14 @@ public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonn } } - private HttpRequest.Builder updateOauth2Clients1RequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients1"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients"); } // verify the required parameter 'UUID' is set if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients1"); + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); diff --git a/paas/src/main/java/org/thingsboard/client/model/AiModelExportData.java b/paas/src/main/java/org/thingsboard/client/model/AiModelExportData.java new file mode 100644 index 00000000..0a9d6d84 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/AiModelExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AiModelExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AiModelExportData extends EntityExportData { + public AiModelExportData() { + } + + @Override + public AiModelExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AiModelExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AiModelExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AiModelExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AiModelExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AiModelExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiModelExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelExportData", AiModelExportData.class); + JSON.registerDiscriminator(AiModelExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java new file mode 100644 index 00000000..62a6084e --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmAssignmentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmAssignmentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmAssignmentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmAssignmentRecipientsConfig() { + } + + public AlarmAssignmentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmAssignmentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmAssignmentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmAssignmentRecipientsConfig alarmAssignmentRecipientsConfig = (AlarmAssignmentRecipientsConfig) o; + return Objects.equals(this.targets, alarmAssignmentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmAssignmentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmAssignmentRecipientsConfig", AlarmAssignmentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmAssignmentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java new file mode 100644 index 00000000..910e38e3 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmCommentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmCommentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmCommentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmCommentRecipientsConfig() { + } + + public AlarmCommentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmCommentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmCommentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmCommentRecipientsConfig alarmCommentRecipientsConfig = (AlarmCommentRecipientsConfig) o; + return Objects.equals(this.targets, alarmCommentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmCommentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmCommentRecipientsConfig", AlarmCommentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmCommentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java new file mode 100644 index 00000000..09389b53 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageLimitRecipientsConfig + */ +@JsonPropertyOrder({ + ApiUsageLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ApiUsageLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ApiUsageLimitRecipientsConfig() { + } + + public ApiUsageLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ApiUsageLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ApiUsageLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiUsageLimitRecipientsConfig apiUsageLimitRecipientsConfig = (ApiUsageLimitRecipientsConfig) o; + return Objects.equals(this.targets, apiUsageLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageLimitRecipientsConfig", ApiUsageLimitRecipientsConfig.class); + JSON.registerDiscriminator(ApiUsageLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetExportData.java b/paas/src/main/java/org/thingsboard/client/model/AssetExportData.java new file mode 100644 index 00000000..b2464a0f --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/AssetExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetExportData extends EntityExportData { + public AssetExportData() { + } + + @Override + public AssetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetExportData", AssetExportData.class); + JSON.registerDiscriminator(AssetExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java b/paas/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java new file mode 100644 index 00000000..94e83fb2 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetProfileExportData extends EntityExportData { + public AssetProfileExportData() { + } + + @Override + public AssetProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileExportData", AssetProfileExportData.class); + JSON.registerDiscriminator(AssetProfileExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java b/paas/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java index d2703af9..989314e3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java +++ b/paas/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultAsset { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultAsset { public BulkImportResultAsset() { } - public BulkImportResultAsset created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultAsset created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultAsset created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultAsset updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultAsset errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultAsset bulkImportResultAsset = (BulkImportResultAsset) o; - return equalsNullable(this.created, bulkImportResultAsset.created) && - equalsNullable(this.updated, bulkImportResultAsset.updated) && - equalsNullable(this.errors, bulkImportResultAsset.errors) && + return Objects.equals(this.created, bulkImportResultAsset.created) && + Objects.equals(this.updated, bulkImportResultAsset.updated) && + Objects.equals(this.errors, bulkImportResultAsset.errors) && Objects.equals(this.errorsList, bulkImportResultAsset.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/paas/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java b/paas/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java index dfd9c000..04a16777 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java +++ b/paas/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultDevice { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultDevice { public BulkImportResultDevice() { } - public BulkImportResultDevice created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultDevice created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultDevice created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultDevice updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultDevice errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultDevice bulkImportResultDevice = (BulkImportResultDevice) o; - return equalsNullable(this.created, bulkImportResultDevice.created) && - equalsNullable(this.updated, bulkImportResultDevice.updated) && - equalsNullable(this.errors, bulkImportResultDevice.errors) && + return Objects.equals(this.created, bulkImportResultDevice.created) && + Objects.equals(this.updated, bulkImportResultDevice.updated) && + Objects.equals(this.errors, bulkImportResultDevice.errors) && Objects.equals(this.errorsList, bulkImportResultDevice.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/paas/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java b/paas/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java index db2ffa8f..15572565 100644 --- a/paas/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java +++ b/paas/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultEdge { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultEdge { public BulkImportResultEdge() { } - public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultEdge created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultEdge updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultEdge errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultEdge bulkImportResultEdge = (BulkImportResultEdge) o; - return equalsNullable(this.created, bulkImportResultEdge.created) && - equalsNullable(this.updated, bulkImportResultEdge.updated) && - equalsNullable(this.errors, bulkImportResultEdge.errors) && + return Objects.equals(this.created, bulkImportResultEdge.created) && + Objects.equals(this.updated, bulkImportResultEdge.updated) && + Objects.equals(this.errors, bulkImportResultEdge.errors) && Objects.equals(this.errorsList, bulkImportResultEdge.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/paas/src/main/java/org/thingsboard/client/model/ConverterExportData.java b/paas/src/main/java/org/thingsboard/client/model/ConverterExportData.java new file mode 100644 index 00000000..d2f22126 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/ConverterExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ConverterExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ConverterExportData extends EntityExportData { + public ConverterExportData() { + } + + @Override + public ConverterExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public ConverterExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public ConverterExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public ConverterExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public ConverterExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this ConverterExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConverterExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ConverterExportData", ConverterExportData.class); + JSON.registerDiscriminator(ConverterExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index fff81a8b..656fb616 100644 --- a/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -70,12 +70,6 @@ public CsvReportTemplateConfig filters(@javax.annotation.Nullable List f return this; } - @Override - public CsvReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.setTimeDataPattern(timeDataPattern); - return this; - } - @Override public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { this.setNamePattern(namePattern); @@ -88,6 +82,12 @@ public CsvReportTemplateConfig components(@javax.annotation.Nonnull List entityAliases) { this.setEntityAliases(entityAliases); @@ -180,11 +180,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - // add `namePattern` to the URL query string if (getNamePattern() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); @@ -200,6 +195,11 @@ public String toUrlQueryString(String prefix) { } } + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `entityAliases` to the URL query string if (getEntityAliases() != null) { for (int i = 0; i < getEntityAliases().size(); i++) { diff --git a/paas/src/main/java/org/thingsboard/client/model/CustomerExportData.java b/paas/src/main/java/org/thingsboard/client/model/CustomerExportData.java new file mode 100644 index 00000000..af5c6235 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/CustomerExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * CustomerExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class CustomerExportData extends EntityExportData { + public CustomerExportData() { + } + + @Override + public CustomerExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public CustomerExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public CustomerExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public CustomerExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public CustomerExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this CustomerExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerExportData", CustomerExportData.class); + JSON.registerDiscriminator(CustomerExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/DashboardExportData.java b/paas/src/main/java/org/thingsboard/client/model/DashboardExportData.java new file mode 100644 index 00000000..236285a8 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/DashboardExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DashboardExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DashboardExportData extends EntityExportData { + public DashboardExportData() { + } + + @Override + public DashboardExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DashboardExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DashboardExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DashboardExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DashboardExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DashboardExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DashboardExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardExportData", DashboardExportData.class); + JSON.registerDiscriminator(DashboardExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java index e786f73b..7678be98 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java @@ -172,6 +172,12 @@ public void setNotifyOn(@javax.annotation.Nonnull Set notifyOn) { } + @Override + public DeviceActivityNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this DeviceActivityNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java new file mode 100644 index 00000000..937ead2e --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceActivityRecipientsConfig + */ +@JsonPropertyOrder({ + DeviceActivityRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class DeviceActivityRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public DeviceActivityRecipientsConfig() { + } + + public DeviceActivityRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public DeviceActivityRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this DeviceActivityRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceActivityRecipientsConfig deviceActivityRecipientsConfig = (DeviceActivityRecipientsConfig) o; + return Objects.equals(this.targets, deviceActivityRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceActivityRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceActivityRecipientsConfig", DeviceActivityRecipientsConfig.class); + JSON.registerDiscriminator(DeviceActivityRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java b/paas/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java new file mode 100644 index 00000000..8d7146a3 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DeviceProfileExportData extends EntityExportData { + public DeviceProfileExportData() { + } + + @Override + public DeviceProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DeviceProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DeviceProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DeviceProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DeviceProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DeviceProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileExportData", DeviceProfileExportData.class); + JSON.registerDiscriminator(DeviceProfileExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java index ac43f101..77fcc393 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setEdges(@javax.annotation.Nullable Set edges) { } + @Override + public EdgeCommunicationFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeCommunicationFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java similarity index 70% rename from ce/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java rename to paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java index c3c292af..c598e977 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java @@ -41,11 +41,10 @@ import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * Default notification rule recipients configuration + * EdgeCommunicationFailureRecipientsConfig */ @JsonPropertyOrder({ - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TRIGGER_TYPE, - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TARGETS + EdgeCommunicationFailureRecipientsConfig.JSON_PROPERTY_TARGETS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -54,48 +53,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) -public class DefaultNotificationRuleRecipientsConfig extends NotificationRuleRecipientsConfig { - public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull - private NotificationRuleTriggerType triggerType = NotificationRuleTriggerType.ENTITY_ACTION; - +public class EdgeCommunicationFailureRecipientsConfig extends NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TARGETS = "targets"; @javax.annotation.Nonnull private List targets = new ArrayList<>(); - public DefaultNotificationRuleRecipientsConfig() { - } - - public DefaultNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get triggerType - * @return triggerType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotificationRuleTriggerType getTriggerType() { - return triggerType; - } - - - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; + public EdgeCommunicationFailureRecipientsConfig() { } - - public DefaultNotificationRuleRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + public EdgeCommunicationFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { this.targets = targets; return this; } - public DefaultNotificationRuleRecipientsConfig addTargetsItem(UUID targetsItem) { + public EdgeCommunicationFailureRecipientsConfig addTargetsItem(UUID targetsItem) { if (this.targets == null) { this.targets = new ArrayList<>(); } @@ -122,8 +93,14 @@ public void setTargets(@javax.annotation.Nonnull List targets) { } + @Override + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** - * Return true if this DefaultNotificationRuleRecipientsConfig object is equal to o. + * Return true if this EdgeCommunicationFailureRecipientsConfig object is equal to o. */ @Override public boolean equals(Object o) { @@ -133,23 +110,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DefaultNotificationRuleRecipientsConfig defaultNotificationRuleRecipientsConfig = (DefaultNotificationRuleRecipientsConfig) o; - return Objects.equals(this.triggerType, defaultNotificationRuleRecipientsConfig.triggerType) && - Objects.equals(this.targets, defaultNotificationRuleRecipientsConfig.targets) && + EdgeCommunicationFailureRecipientsConfig edgeCommunicationFailureRecipientsConfig = (EdgeCommunicationFailureRecipientsConfig) o; + return Objects.equals(this.targets, edgeCommunicationFailureRecipientsConfig.targets) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(triggerType, targets, super.hashCode()); + return Objects.hash(targets, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DefaultNotificationRuleRecipientsConfig {\n"); + sb.append("class EdgeCommunicationFailureRecipientsConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" triggerType: ").append(toIndentedString(triggerType)).append("\n"); sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,8 +194,8 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("DefaultNotificationRuleRecipientsConfig", DefaultNotificationRuleRecipientsConfig.class); - JSON.registerDiscriminator(DefaultNotificationRuleRecipientsConfig.class, "triggerType", mappings); + mappings.put("EdgeCommunicationFailureRecipientsConfig", EdgeCommunicationFailureRecipientsConfig.class); + JSON.registerDiscriminator(EdgeCommunicationFailureRecipientsConfig.class, "triggerType", mappings); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java index bca83fc2..ddb2335e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java @@ -134,6 +134,12 @@ public void setNotifyOn(@javax.annotation.Nullable Set no } + @Override + public EdgeConnectionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeConnectionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java new file mode 100644 index 00000000..e8a8443d --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EdgeConnectionRecipientsConfig + */ +@JsonPropertyOrder({ + EdgeConnectionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EdgeConnectionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EdgeConnectionRecipientsConfig() { + } + + public EdgeConnectionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EdgeConnectionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EdgeConnectionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EdgeConnectionRecipientsConfig edgeConnectionRecipientsConfig = (EdgeConnectionRecipientsConfig) o; + return Objects.equals(this.targets, edgeConnectionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EdgeConnectionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeConnectionRecipientsConfig", EdgeConnectionRecipientsConfig.class); + JSON.registerDiscriminator(EdgeConnectionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java index e7fd1178..0c43a420 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java @@ -125,6 +125,12 @@ public void setThreshold(@javax.annotation.Nullable Float threshold) { } + @Override + public EntitiesLimitNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntitiesLimitNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java new file mode 100644 index 00000000..0008b4fc --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntitiesLimitRecipientsConfig + */ +@JsonPropertyOrder({ + EntitiesLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntitiesLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntitiesLimitRecipientsConfig() { + } + + public EntitiesLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntitiesLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntitiesLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntitiesLimitRecipientsConfig entitiesLimitRecipientsConfig = (EntitiesLimitRecipientsConfig) o; + return Objects.equals(this.targets, entitiesLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntitiesLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntitiesLimitRecipientsConfig", EntitiesLimitRecipientsConfig.class); + JSON.registerDiscriminator(EntitiesLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java index 033afe05..1b5d49b5 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java @@ -182,6 +182,12 @@ public void setDeleted(@javax.annotation.Nullable Boolean deleted) { } + @Override + public EntityActionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntityActionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java new file mode 100644 index 00000000..80c67578 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityActionRecipientsConfig + */ +@JsonPropertyOrder({ + EntityActionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntityActionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntityActionRecipientsConfig() { + } + + public EntityActionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntityActionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntityActionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityActionRecipientsConfig entityActionRecipientsConfig = (EntityActionRecipientsConfig) o; + return Objects.equals(this.targets, entityActionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityActionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityActionRecipientsConfig", EntityActionRecipientsConfig.class); + JSON.registerDiscriminator(EntityActionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java b/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java index 51f3595c..f5638b2d 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java @@ -61,15 +61,26 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "ASSET"), - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "CUSTOMER"), - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "DASHBOARD"), + @JsonSubTypes.Type(value = AiModelExportData.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AssetExportData.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileExportData.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = ConverterExportData.class, name = "CONVERTER"), + @JsonSubTypes.Type(value = CustomerExportData.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardExportData.class, name = "DASHBOARD"), @JsonSubTypes.Type(value = DeviceExportData.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileExportData.class, name = "DEVICE_PROFILE"), @JsonSubTypes.Type(value = EntityGroupExportData.class, name = "ENTITY_GROUP"), - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = EntityViewExportData.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = IntegrationExportData.class, name = "INTEGRATION"), + @JsonSubTypes.Type(value = NotificationRuleExportData.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetExportData.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateExportData.class, name = "NOTIFICATION_TEMPLATE"), @JsonSubTypes.Type(value = OtaPackageExportData.class, name = "OTA_PACKAGE"), + @JsonSubTypes.Type(value = ReportTemplateExportData.class, name = "REPORT_TEMPLATE"), + @JsonSubTypes.Type(value = RoleExportData.class, name = "ROLE"), @JsonSubTypes.Type(value = RuleChainExportData.class, name = "RULE_CHAIN"), @JsonSubTypes.Type(value = SchedulerEventExportData.class, name = "SCHEDULER_EVENT"), + @JsonSubTypes.Type(value = TbResourceExportData.class, name = "TB_RESOURCE"), @JsonSubTypes.Type(value = WidgetsBundleExportData.class, name = "WIDGETS_BUNDLE"), @JsonSubTypes.Type(value = WidgetTypeExportData.class, name = "WIDGET_TYPE"), }) @@ -366,15 +377,26 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("ASSET", GroupEntityExportData.class); - mappings.put("CUSTOMER", GroupEntityExportData.class); - mappings.put("DASHBOARD", GroupEntityExportData.class); + mappings.put("AI_MODEL", AiModelExportData.class); + mappings.put("ASSET", AssetExportData.class); + mappings.put("ASSET_PROFILE", AssetProfileExportData.class); + mappings.put("CONVERTER", ConverterExportData.class); + mappings.put("CUSTOMER", CustomerExportData.class); + mappings.put("DASHBOARD", DashboardExportData.class); mappings.put("DEVICE", DeviceExportData.class); + mappings.put("DEVICE_PROFILE", DeviceProfileExportData.class); mappings.put("ENTITY_GROUP", EntityGroupExportData.class); - mappings.put("ENTITY_VIEW", GroupEntityExportData.class); + mappings.put("ENTITY_VIEW", EntityViewExportData.class); + mappings.put("INTEGRATION", IntegrationExportData.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleExportData.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetExportData.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateExportData.class); mappings.put("OTA_PACKAGE", OtaPackageExportData.class); + mappings.put("REPORT_TEMPLATE", ReportTemplateExportData.class); + mappings.put("ROLE", RoleExportData.class); mappings.put("RULE_CHAIN", RuleChainExportData.class); mappings.put("SCHEDULER_EVENT", SchedulerEventExportData.class); + mappings.put("TB_RESOURCE", TbResourceExportData.class); mappings.put("WIDGETS_BUNDLE", WidgetsBundleExportData.class); mappings.put("WIDGET_TYPE", WidgetTypeExportData.class); mappings.put("EntityExportData", EntityExportData.class); diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityViewExportData.java b/paas/src/main/java/org/thingsboard/client/model/EntityViewExportData.java new file mode 100644 index 00000000..caf77159 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/EntityViewExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityViewExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class EntityViewExportData extends EntityExportData { + public EntityViewExportData() { + } + + @Override + public EntityViewExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public EntityViewExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public EntityViewExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public EntityViewExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public EntityViewExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this EntityViewExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityViewExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewExportData", EntityViewExportData.class); + JSON.registerDiscriminator(EntityViewExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java index efdd05d3..6867a75b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java @@ -94,6 +94,12 @@ public void setEscalationTable(@javax.annotation.Nonnull Map> } + @Override + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EscalatedNotificationRuleRecipientsConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/Integration.java b/paas/src/main/java/org/thingsboard/client/model/Integration.java index d675921c..5ea643ca 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Integration.java +++ b/paas/src/main/java/org/thingsboard/client/model/Integration.java @@ -56,8 +56,8 @@ Integration.JSON_PROPERTY_SECRET, Integration.JSON_PROPERTY_CONFIGURATION, Integration.JSON_PROPERTY_ADDITIONAL_INFO, - Integration.JSON_PROPERTY_REMOTE, - Integration.JSON_PROPERTY_EDGE_TEMPLATE + Integration.JSON_PROPERTY_EDGE_TEMPLATE, + Integration.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Integration { @@ -125,14 +125,14 @@ public class Integration { @javax.annotation.Nullable private com.fasterxml.jackson.databind.JsonNode additionalInfo; - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; @javax.annotation.Nullable private Boolean edgeTemplate; + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public Integration() { } @@ -512,51 +512,51 @@ public void setAdditionalInfo(@javax.annotation.Nullable com.fasterxml.jackson.d } - public Integration remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; + public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; return this; } /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; + public Boolean getEdgeTemplate() { + return edgeTemplate; } - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; } - public Integration edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; + public Integration remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; return this; } /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; + public Boolean getRemote() { + return remote; } - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; } @@ -588,13 +588,13 @@ public boolean equals(Object o) { Objects.equals(this.secret, integration.secret) && Objects.equals(this._configuration, integration._configuration) && Objects.equals(this.additionalInfo, integration.additionalInfo) && - Objects.equals(this.remote, integration.remote) && - Objects.equals(this.edgeTemplate, integration.edgeTemplate); + Objects.equals(this.edgeTemplate, integration.edgeTemplate) && + Objects.equals(this.remote, integration.remote); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, remote, edgeTemplate); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, defaultConverterId, downlinkConverterId, routingKey, secret, _configuration, additionalInfo, edgeTemplate, remote); } @Override @@ -617,8 +617,8 @@ public String toString() { sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -746,16 +746,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sadditionalInfo%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAdditionalInfo())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - // add `edgeTemplate` to the URL query string if (getEdgeTemplate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); } + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/GroupEntityExportData.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationExportData.java similarity index 90% rename from pe/src/main/java/org/thingsboard/client/model/GroupEntityExportData.java rename to paas/src/main/java/org/thingsboard/client/model/IntegrationExportData.java index 55ef4df4..427fa831 100644 --- a/pe/src/main/java/org/thingsboard/client/model/GroupEntityExportData.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationExportData.java @@ -46,7 +46,7 @@ import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * GroupEntityExportData + * IntegrationExportData */ @JsonPropertyOrder({ }) @@ -57,42 +57,42 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) -public class GroupEntityExportData extends EntityExportData { - public GroupEntityExportData() { +public class IntegrationExportData extends EntityExportData { + public IntegrationExportData() { } @Override - public GroupEntityExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + public IntegrationExportData entityType(@javax.annotation.Nonnull EntityType entityType) { this.setEntityType(entityType); return this; } @Override - public GroupEntityExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + public IntegrationExportData entity(@javax.annotation.Nullable ExportableEntity entity) { this.setEntity(entity); return this; } @Override - public GroupEntityExportData relations(@javax.annotation.Nullable List relations) { + public IntegrationExportData relations(@javax.annotation.Nullable List relations) { this.setRelations(relations); return this; } @Override - public GroupEntityExportData attributes(@javax.annotation.Nullable Map> attributes) { + public IntegrationExportData attributes(@javax.annotation.Nullable Map> attributes) { this.setAttributes(attributes); return this; } @Override - public GroupEntityExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + public IntegrationExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { this.setCalculatedFields(calculatedFields); return this; } /** - * Return true if this GroupEntityExportData object is equal to o. + * Return true if this IntegrationExportData object is equal to o. */ @Override public boolean equals(Object o) { @@ -113,7 +113,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GroupEntityExportData {\n"); + sb.append("class IntegrationExportData {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); @@ -206,8 +206,8 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("GroupEntityExportData", GroupEntityExportData.class); - JSON.registerDiscriminator(GroupEntityExportData.class, "entityType", mappings); + mappings.put("IntegrationExportData", IntegrationExportData.class); + JSON.registerDiscriminator(IntegrationExportData.class, "entityType", mappings); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java index 74e01089..7f818e83 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationInfo.java @@ -55,8 +55,8 @@ IntegrationInfo.JSON_PROPERTY_VERSION, IntegrationInfo.JSON_PROPERTY_STATUS, IntegrationInfo.JSON_PROPERTY_STATS, - IntegrationInfo.JSON_PROPERTY_REMOTE, - IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE + IntegrationInfo.JSON_PROPERTY_EDGE_TEMPLATE, + IntegrationInfo.JSON_PROPERTY_REMOTE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class IntegrationInfo { @@ -107,14 +107,14 @@ public class IntegrationInfo { public static final String JSON_PROPERTY_STATS = "stats"; private JsonNullable stats = JsonNullable.of(null); - public static final String JSON_PROPERTY_REMOTE = "remote"; - @javax.annotation.Nullable - private Boolean remote; - public static final String JSON_PROPERTY_EDGE_TEMPLATE = "edgeTemplate"; @javax.annotation.Nullable private Boolean edgeTemplate; + public static final String JSON_PROPERTY_REMOTE = "remote"; + @javax.annotation.Nullable + private Boolean remote; + public IntegrationInfo() { } @@ -406,51 +406,51 @@ public void setStats(@javax.annotation.Nullable Object stats) { } - public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; + public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; return this; } /** - * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core - * @return remote + * Boolean flag that specifies that is regular or edge template integration + * @return edgeTemplate */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRemote() { - return remote; + public Boolean getEdgeTemplate() { + return edgeTemplate; } - @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) + @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRemote(@javax.annotation.Nullable Boolean remote) { - this.remote = remote; + public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { + this.edgeTemplate = edgeTemplate; } - public IntegrationInfo edgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; + public IntegrationInfo remote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; return this; } /** - * Boolean flag that specifies that is regular or edge template integration - * @return edgeTemplate + * Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core + * @return remote */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEdgeTemplate() { - return edgeTemplate; + public Boolean getRemote() { + return remote; } - @JsonProperty(value = JSON_PROPERTY_EDGE_TEMPLATE, required = false) + @JsonProperty(value = JSON_PROPERTY_REMOTE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEdgeTemplate(@javax.annotation.Nullable Boolean edgeTemplate) { - this.edgeTemplate = edgeTemplate; + public void setRemote(@javax.annotation.Nullable Boolean remote) { + this.remote = remote; } @@ -478,8 +478,8 @@ public boolean equals(Object o) { Objects.equals(this.version, integrationInfo.version) && Objects.equals(this.status, integrationInfo.status) && equalsNullable(this.stats, integrationInfo.stats) && - Objects.equals(this.remote, integrationInfo.remote) && - Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate); + Objects.equals(this.edgeTemplate, integrationInfo.edgeTemplate) && + Objects.equals(this.remote, integrationInfo.remote); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -488,7 +488,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, status, hashCodeNullable(stats), remote, edgeTemplate); + return Objects.hash(id, createdTime, tenantId, name, type, debugMode, debugSettings, enabled, allowCreateDevicesOrAssets, version, status, hashCodeNullable(stats), edgeTemplate, remote); } private static int hashCodeNullable(JsonNullable a) { @@ -514,8 +514,8 @@ public String toString() { sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); - sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append(" edgeTemplate: ").append(toIndentedString(edgeTemplate)).append("\n"); + sb.append(" remote: ").append(toIndentedString(remote)).append("\n"); sb.append("}"); return sb.toString(); } @@ -623,16 +623,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstats%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStats())))); } - // add `remote` to the URL query string - if (getRemote() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); - } - // add `edgeTemplate` to the URL query string if (getEdgeTemplate() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sedgeTemplate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEdgeTemplate())))); } + // add `remote` to the URL query string + if (getRemote() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sremote%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getRemote())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java index 08e16562..bb17b583 100644 --- a/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java @@ -202,6 +202,12 @@ public void setOnlyOnError(@javax.annotation.Nullable Boolean onlyOnError) { } + @Override + public IntegrationLifecycleEventNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this IntegrationLifecycleEventNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java new file mode 100644 index 00000000..b9c5d542 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * IntegrationLifecycleEventRecipientsConfig + */ +@JsonPropertyOrder({ + IntegrationLifecycleEventRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class IntegrationLifecycleEventRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public IntegrationLifecycleEventRecipientsConfig() { + } + + public IntegrationLifecycleEventRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public IntegrationLifecycleEventRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public IntegrationLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this IntegrationLifecycleEventRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationLifecycleEventRecipientsConfig integrationLifecycleEventRecipientsConfig = (IntegrationLifecycleEventRecipientsConfig) o; + return Objects.equals(this.targets, integrationLifecycleEventRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationLifecycleEventRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IntegrationLifecycleEventRecipientsConfig", IntegrationLifecycleEventRecipientsConfig.class); + JSON.registerDiscriminator(IntegrationLifecycleEventRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java index 910f35c6..ebb08c63 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class NewPlatformVersionNotificationRuleTriggerConfig extends Notificatio public NewPlatformVersionNotificationRuleTriggerConfig() { } + @Override + public NewPlatformVersionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this NewPlatformVersionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java new file mode 100644 index 00000000..97cc594a --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NewPlatformVersionRecipientsConfig + */ +@JsonPropertyOrder({ + NewPlatformVersionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class NewPlatformVersionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public NewPlatformVersionRecipientsConfig() { + } + + public NewPlatformVersionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public NewPlatformVersionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this NewPlatformVersionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewPlatformVersionRecipientsConfig newPlatformVersionRecipientsConfig = (NewPlatformVersionRecipientsConfig) o; + return Objects.equals(this.targets, newPlatformVersionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewPlatformVersionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NewPlatformVersionRecipientsConfig", NewPlatformVersionRecipientsConfig.class); + JSON.registerDiscriminator(NewPlatformVersionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationInfo.java b/paas/src/main/java/org/thingsboard/client/model/NotificationInfo.java index d7dd1bb2..f2b443cc 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationInfo.java @@ -41,8 +41,8 @@ * NotificationInfo */ @JsonPropertyOrder({ - NotificationInfo.JSON_PROPERTY_STATE_ENTITY_ID, NotificationInfo.JSON_PROPERTY_DASHBOARD_ID, + NotificationInfo.JSON_PROPERTY_STATE_ENTITY_ID, NotificationInfo.JSON_PROPERTY_TYPE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -53,14 +53,14 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) public class NotificationInfo { - public static final String JSON_PROPERTY_STATE_ENTITY_ID = "stateEntityId"; - @javax.annotation.Nullable - private EntityId stateEntityId; - public static final String JSON_PROPERTY_DASHBOARD_ID = "dashboardId"; @javax.annotation.Nullable private DashboardId dashboardId; + public static final String JSON_PROPERTY_STATE_ENTITY_ID = "stateEntityId"; + @javax.annotation.Nullable + private EntityId stateEntityId; + public static final String JSON_PROPERTY_TYPE = "type"; @javax.annotation.Nonnull private String type; @@ -68,51 +68,51 @@ public class NotificationInfo { public NotificationInfo() { } - public NotificationInfo stateEntityId(@javax.annotation.Nullable EntityId stateEntityId) { - this.stateEntityId = stateEntityId; + public NotificationInfo dashboardId(@javax.annotation.Nullable DashboardId dashboardId) { + this.dashboardId = dashboardId; return this; } /** - * Get stateEntityId - * @return stateEntityId + * Get dashboardId + * @return dashboardId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STATE_ENTITY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getStateEntityId() { - return stateEntityId; + public DashboardId getDashboardId() { + return dashboardId; } - @JsonProperty(value = JSON_PROPERTY_STATE_ENTITY_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStateEntityId(@javax.annotation.Nullable EntityId stateEntityId) { - this.stateEntityId = stateEntityId; + public void setDashboardId(@javax.annotation.Nullable DashboardId dashboardId) { + this.dashboardId = dashboardId; } - public NotificationInfo dashboardId(@javax.annotation.Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; + public NotificationInfo stateEntityId(@javax.annotation.Nullable EntityId stateEntityId) { + this.stateEntityId = stateEntityId; return this; } /** - * Get dashboardId - * @return dashboardId + * Get stateEntityId + * @return stateEntityId */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_STATE_ENTITY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getDashboardId() { - return dashboardId; + public EntityId getStateEntityId() { + return stateEntityId; } - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) + @JsonProperty(value = JSON_PROPERTY_STATE_ENTITY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDashboardId(@javax.annotation.Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; + public void setStateEntityId(@javax.annotation.Nullable EntityId stateEntityId) { + this.stateEntityId = stateEntityId; } @@ -152,22 +152,22 @@ public boolean equals(Object o) { return false; } NotificationInfo notificationInfo = (NotificationInfo) o; - return Objects.equals(this.stateEntityId, notificationInfo.stateEntityId) && - Objects.equals(this.dashboardId, notificationInfo.dashboardId) && + return Objects.equals(this.dashboardId, notificationInfo.dashboardId) && + Objects.equals(this.stateEntityId, notificationInfo.stateEntityId) && Objects.equals(this.type, notificationInfo.type); } @Override public int hashCode() { - return Objects.hash(stateEntityId, dashboardId, type); + return Objects.hash(dashboardId, stateEntityId, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotificationInfo {\n"); - sb.append(" stateEntityId: ").append(toIndentedString(stateEntityId)).append("\n"); sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); + sb.append(" stateEntityId: ").append(toIndentedString(stateEntityId)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); @@ -216,16 +216,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `stateEntityId` to the URL query string - if (getStateEntityId() != null) { - joiner.add(getStateEntityId().toUrlQueryString(prefix + "stateEntityId" + suffix)); - } - // add `dashboardId` to the URL query string if (getDashboardId() != null) { joiner.add(getDashboardId().toUrlQueryString(prefix + "dashboardId" + suffix)); } + // add `stateEntityId` to the URL query string + if (getStateEntityId() != null) { + joiner.add(getStateEntityId().toUrlQueryString(prefix + "stateEntityId" + suffix)); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java b/paas/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java index 73d4c129..0b7e0e58 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java @@ -29,10 +29,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -51,14 +47,15 @@ public class NotificationRequestStats { public static final String JSON_PROPERTY_SENT = "sent"; @javax.annotation.Nullable - private Map sent = new HashMap<>(); + private Map sent = new HashMap<>(); public static final String JSON_PROPERTY_ERRORS = "errors"; @javax.annotation.Nullable private Map> errors = new HashMap<>(); public static final String JSON_PROPERTY_TOTAL_ERRORS = "totalErrors"; - private JsonNullable totalErrors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer totalErrors; public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable @@ -71,12 +68,12 @@ public class NotificationRequestStats { public NotificationRequestStats() { } - public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { + public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { this.sent = sent; return this; } - public NotificationRequestStats putSentItem(String key, Object sentItem) { + public NotificationRequestStats putSentItem(String key, Integer sentItem) { if (this.sent == null) { this.sent = new HashMap<>(); } @@ -90,15 +87,15 @@ public NotificationRequestStats putSentItem(String key, Object sentItem) { */ @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getSent() { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSent() { return sent; } @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setSent(@javax.annotation.Nullable Map sent) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSent(@javax.annotation.Nullable Map sent) { this.sent = sent; } @@ -135,8 +132,8 @@ public void setErrors(@javax.annotation.Nullable Map } - public NotificationRequestStats totalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + public NotificationRequestStats totalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; return this; } @@ -145,25 +142,17 @@ public NotificationRequestStats totalErrors(@javax.annotation.Nullable Object to * @return totalErrors */ @javax.annotation.Nullable - @JsonIgnore - public Object getTotalErrors() { - return totalErrors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getTotalErrors_JsonNullable() { + public Integer getTotalErrors() { return totalErrors; } - - @JsonProperty(JSON_PROPERTY_TOTAL_ERRORS) - public void setTotalErrors_JsonNullable(JsonNullable totalErrors) { - this.totalErrors = totalErrors; - } - public void setTotalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + + @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; } @@ -229,25 +218,14 @@ public boolean equals(Object o) { NotificationRequestStats notificationRequestStats = (NotificationRequestStats) o; return Objects.equals(this.sent, notificationRequestStats.sent) && Objects.equals(this.errors, notificationRequestStats.errors) && - equalsNullable(this.totalErrors, notificationRequestStats.totalErrors) && + Objects.equals(this.totalErrors, notificationRequestStats.totalErrors) && Objects.equals(this.error, notificationRequestStats.error) && Objects.equals(this.totalSent, notificationRequestStats.totalSent); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(sent, errors, hashCodeNullable(totalErrors), error, totalSent); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(sent, errors, totalErrors, error, totalSent); } @Override diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java new file mode 100644 index 00000000..15ccb3a8 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationRuleExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationRuleExportData extends EntityExportData { + public NotificationRuleExportData() { + } + + @Override + public NotificationRuleExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationRuleExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationRuleExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationRuleExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationRuleExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationRuleExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRuleExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleExportData", NotificationRuleExportData.class); + JSON.registerDiscriminator(NotificationRuleExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index 001dedaf..cff3b700 100644 --- a/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -50,20 +50,20 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = EscalatedNotificationRuleRecipientsConfig.class, name = "ALARM"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_COMMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "API_USAGE_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "DEVICE_ACTIVITY"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_CONNECTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITIES_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITY_ACTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "INTEGRATION_LIFECYCLE_EVENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RATE_LIMITS"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), + @JsonSubTypes.Type(value = AlarmAssignmentRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), + @JsonSubTypes.Type(value = AlarmCommentRecipientsConfig.class, name = "ALARM_COMMENT"), + @JsonSubTypes.Type(value = ApiUsageLimitRecipientsConfig.class, name = "API_USAGE_LIMIT"), + @JsonSubTypes.Type(value = DeviceActivityRecipientsConfig.class, name = "DEVICE_ACTIVITY"), + @JsonSubTypes.Type(value = EdgeCommunicationFailureRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), + @JsonSubTypes.Type(value = EdgeConnectionRecipientsConfig.class, name = "EDGE_CONNECTION"), + @JsonSubTypes.Type(value = EntitiesLimitRecipientsConfig.class, name = "ENTITIES_LIMIT"), + @JsonSubTypes.Type(value = EntityActionRecipientsConfig.class, name = "ENTITY_ACTION"), + @JsonSubTypes.Type(value = IntegrationLifecycleEventRecipientsConfig.class, name = "INTEGRATION_LIFECYCLE_EVENT"), + @JsonSubTypes.Type(value = NewPlatformVersionRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), + @JsonSubTypes.Type(value = RateLimitsRecipientsConfig.class, name = "RATE_LIMITS"), + @JsonSubTypes.Type(value = ResourceShortageRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), + @JsonSubTypes.Type(value = RuleEngineComponentLifecycleEventRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), + @JsonSubTypes.Type(value = TaskProcessingFailureRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), }) public class NotificationRuleRecipientsConfig { @@ -181,20 +181,20 @@ public String toUrlQueryString(String prefix) { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); mappings.put("ALARM", EscalatedNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_ASSIGNMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_COMMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("API_USAGE_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("DEVICE_ACTIVITY", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_COMMUNICATION_FAILURE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_CONNECTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITIES_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITY_ACTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("INTEGRATION_LIFECYCLE_EVENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("NEW_PLATFORM_VERSION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RATE_LIMITS", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RESOURCES_SHORTAGE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("TASK_PROCESSING_FAILURE", DefaultNotificationRuleRecipientsConfig.class); + mappings.put("ALARM_ASSIGNMENT", AlarmAssignmentRecipientsConfig.class); + mappings.put("ALARM_COMMENT", AlarmCommentRecipientsConfig.class); + mappings.put("API_USAGE_LIMIT", ApiUsageLimitRecipientsConfig.class); + mappings.put("DEVICE_ACTIVITY", DeviceActivityRecipientsConfig.class); + mappings.put("EDGE_COMMUNICATION_FAILURE", EdgeCommunicationFailureRecipientsConfig.class); + mappings.put("EDGE_CONNECTION", EdgeConnectionRecipientsConfig.class); + mappings.put("ENTITIES_LIMIT", EntitiesLimitRecipientsConfig.class); + mappings.put("ENTITY_ACTION", EntityActionRecipientsConfig.class); + mappings.put("INTEGRATION_LIFECYCLE_EVENT", IntegrationLifecycleEventRecipientsConfig.class); + mappings.put("NEW_PLATFORM_VERSION", NewPlatformVersionRecipientsConfig.class); + mappings.put("RATE_LIMITS", RateLimitsRecipientsConfig.class); + mappings.put("RESOURCES_SHORTAGE", ResourceShortageRecipientsConfig.class); + mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", RuleEngineComponentLifecycleEventRecipientsConfig.class); + mappings.put("TASK_PROCESSING_FAILURE", TaskProcessingFailureRecipientsConfig.class); mappings.put("NotificationRuleRecipientsConfig", NotificationRuleRecipientsConfig.class); JSON.registerDiscriminator(NotificationRuleRecipientsConfig.class, "triggerType", mappings); } diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java b/paas/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java new file mode 100644 index 00000000..84fa3fcb --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationTargetExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTargetExportData extends EntityExportData { + public NotificationTargetExportData() { + } + + @Override + public NotificationTargetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationTargetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationTargetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationTargetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationTargetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationTargetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTargetExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTargetExportData", NotificationTargetExportData.class); + JSON.registerDiscriminator(NotificationTargetExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java b/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java new file mode 100644 index 00000000..be691034 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationTemplateExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTemplateExportData extends EntityExportData { + public NotificationTemplateExportData() { + } + + @Override + public NotificationTemplateExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationTemplateExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationTemplateExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationTemplateExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationTemplateExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationTemplateExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTemplateExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateExportData", NotificationTemplateExportData.class); + JSON.registerDiscriminator(NotificationTemplateExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index 5329b7df..4cfb2e01 100644 --- a/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -248,12 +248,6 @@ public PdfReportTemplateConfig filters(@javax.annotation.Nullable List f return this; } - @Override - public PdfReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.setTimeDataPattern(timeDataPattern); - return this; - } - @Override public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { this.setNamePattern(namePattern); @@ -266,6 +260,12 @@ public PdfReportTemplateConfig components(@javax.annotation.Nonnull List entityAliases) { this.setEntityAliases(entityAliases); @@ -371,11 +371,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - // add `namePattern` to the URL query string if (getNamePattern() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); @@ -391,6 +386,11 @@ public String toUrlQueryString(String prefix) { } } + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `entityAliases` to the URL query string if (getEntityAliases() != null) { for (int i = 0; i < getEntityAliases().size(); i++) { diff --git a/paas/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java index a5469145..e52858c5 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setApis(@javax.annotation.Nullable Set apis) { } + @Override + public RateLimitsNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RateLimitsNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java new file mode 100644 index 00000000..ddd4e212 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RateLimitsRecipientsConfig + */ +@JsonPropertyOrder({ + RateLimitsRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RateLimitsRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RateLimitsRecipientsConfig() { + } + + public RateLimitsRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RateLimitsRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RateLimitsRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RateLimitsRecipientsConfig rateLimitsRecipientsConfig = (RateLimitsRecipientsConfig) o; + return Objects.equals(this.targets, rateLimitsRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RateLimitsRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RateLimitsRecipientsConfig", RateLimitsRecipientsConfig.class); + JSON.registerDiscriminator(RateLimitsRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java index fad2c67d..4a60a202 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java @@ -47,9 +47,9 @@ @JsonPropertyOrder({ ReportTemplateConfig.JSON_PROPERTY_FORMAT, ReportTemplateConfig.JSON_PROPERTY_FILTERS, - ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN, ReportTemplateConfig.JSON_PROPERTY_NAME_PATTERN, ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, + ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN, ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -72,10 +72,6 @@ public class ReportTemplateConfig { @javax.annotation.Nullable private List filters = new ArrayList<>(); - public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; - @javax.annotation.Nullable - private String timeDataPattern; - public static final String JSON_PROPERTY_NAME_PATTERN = "namePattern"; @javax.annotation.Nullable private String namePattern; @@ -84,6 +80,10 @@ public class ReportTemplateConfig { @javax.annotation.Nullable private List components = new ArrayList<>(); + public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; + @javax.annotation.Nullable + private String timeDataPattern; + public static final String JSON_PROPERTY_ENTITY_ALIASES = "entityAliases"; @javax.annotation.Nullable private List entityAliases = new ArrayList<>(); @@ -147,30 +147,6 @@ public void setFilters(@javax.annotation.Nullable List filters) { } - public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.timeDataPattern = timeDataPattern; - return this; - } - - /** - * Get timeDataPattern - * @return timeDataPattern - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimeDataPattern() { - return timeDataPattern; - } - - - @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern) { - this.timeDataPattern = timeDataPattern; - } - - public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { this.namePattern = namePattern; return this; @@ -227,6 +203,30 @@ public void setComponents(@javax.annotation.Nullable List compo } + public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.timeDataPattern = timeDataPattern; + return this; + } + + /** + * Get timeDataPattern + * @return timeDataPattern + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimeDataPattern() { + return timeDataPattern; + } + + + @JsonProperty(value = JSON_PROPERTY_TIME_DATA_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTimeDataPattern(@javax.annotation.Nullable String timeDataPattern) { + this.timeDataPattern = timeDataPattern; + } + + public ReportTemplateConfig entityAliases(@javax.annotation.Nullable List entityAliases) { this.entityAliases = entityAliases; return this; @@ -273,15 +273,15 @@ public boolean equals(Object o) { ReportTemplateConfig reportTemplateConfig = (ReportTemplateConfig) o; return Objects.equals(this.format, reportTemplateConfig.format) && Objects.equals(this.filters, reportTemplateConfig.filters) && - Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern) && Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && Objects.equals(this.components, reportTemplateConfig.components) && + Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern) && Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases); } @Override public int hashCode() { - return Objects.hash(format, filters, timeDataPattern, namePattern, components, entityAliases); + return Objects.hash(format, filters, namePattern, components, timeDataPattern, entityAliases); } @Override @@ -290,9 +290,9 @@ public String toString() { sb.append("class ReportTemplateConfig {\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); sb.append("}"); return sb.toString(); @@ -356,11 +356,6 @@ public String toUrlQueryString(String prefix) { } } - // add `timeDataPattern` to the URL query string - if (getTimeDataPattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); - } - // add `namePattern` to the URL query string if (getNamePattern() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); @@ -376,6 +371,11 @@ public String toUrlQueryString(String prefix) { } } + // add `timeDataPattern` to the URL query string + if (getTimeDataPattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); + } + // add `entityAliases` to the URL query string if (getEntityAliases() != null) { for (int i = 0; i < getEntityAliases().size(); i++) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java new file mode 100644 index 00000000..24649549 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ReportTemplateExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ReportTemplateExportData extends EntityExportData { + public ReportTemplateExportData() { + } + + @Override + public ReportTemplateExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public ReportTemplateExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public ReportTemplateExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public ReportTemplateExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public ReportTemplateExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this ReportTemplateExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportTemplateExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReportTemplateExportData", ReportTemplateExportData.class); + JSON.registerDiscriminator(ReportTemplateExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java new file mode 100644 index 00000000..fec24a83 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ResourceShortageRecipientsConfig + */ +@JsonPropertyOrder({ + ResourceShortageRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ResourceShortageRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ResourceShortageRecipientsConfig() { + } + + public ResourceShortageRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ResourceShortageRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ResourceShortageRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceShortageRecipientsConfig resourceShortageRecipientsConfig = (ResourceShortageRecipientsConfig) o; + return Objects.equals(this.targets, resourceShortageRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceShortageRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ResourceShortageRecipientsConfig", ResourceShortageRecipientsConfig.class); + JSON.registerDiscriminator(ResourceShortageRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java index 0519c2bf..95d50463 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java @@ -143,6 +143,12 @@ public void setStorageThreshold(@javax.annotation.Nullable Float storageThreshol } + @Override + public ResourcesShortageNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this ResourcesShortageNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/RoleExportData.java b/paas/src/main/java/org/thingsboard/client/model/RoleExportData.java new file mode 100644 index 00000000..cb7577d4 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/RoleExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RoleExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class RoleExportData extends EntityExportData { + public RoleExportData() { + } + + @Override + public RoleExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public RoleExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public RoleExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public RoleExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public RoleExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this RoleExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoleExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RoleExportData", RoleExportData.class); + JSON.registerDiscriminator(RoleExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java index 3c22091f..c42a67e4 100644 --- a/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java @@ -259,6 +259,12 @@ public void setOnlyRuleNodeLifecycleFailures(@javax.annotation.Nullable Boolean } + @Override + public RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java new file mode 100644 index 00000000..ba2ded17 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RuleEngineComponentLifecycleEventRecipientsConfig + */ +@JsonPropertyOrder({ + RuleEngineComponentLifecycleEventRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RuleEngineComponentLifecycleEventRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RuleEngineComponentLifecycleEventRecipientsConfig() { + } + + public RuleEngineComponentLifecycleEventRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RuleEngineComponentLifecycleEventRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RuleEngineComponentLifecycleEventRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuleEngineComponentLifecycleEventRecipientsConfig ruleEngineComponentLifecycleEventRecipientsConfig = (RuleEngineComponentLifecycleEventRecipientsConfig) o; + return Objects.equals(this.targets, ruleEngineComponentLifecycleEventRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuleEngineComponentLifecycleEventRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleEngineComponentLifecycleEventRecipientsConfig", RuleEngineComponentLifecycleEventRecipientsConfig.class); + JSON.registerDiscriminator(RuleEngineComponentLifecycleEventRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java b/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java index 464e1cb0..ca2153f1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java +++ b/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class TaskProcessingFailureNotificationRuleTriggerConfig extends Notifica public TaskProcessingFailureNotificationRuleTriggerConfig() { } + @Override + public TaskProcessingFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this TaskProcessingFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java new file mode 100644 index 00000000..b6f7856b --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TaskProcessingFailureRecipientsConfig + */ +@JsonPropertyOrder({ + TaskProcessingFailureRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class TaskProcessingFailureRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public TaskProcessingFailureRecipientsConfig() { + } + + public TaskProcessingFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public TaskProcessingFailureRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this TaskProcessingFailureRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaskProcessingFailureRecipientsConfig taskProcessingFailureRecipientsConfig = (TaskProcessingFailureRecipientsConfig) o; + return Objects.equals(this.targets, taskProcessingFailureRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaskProcessingFailureRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TaskProcessingFailureRecipientsConfig", TaskProcessingFailureRecipientsConfig.class); + JSON.registerDiscriminator(TaskProcessingFailureRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/TbResourceExportData.java b/paas/src/main/java/org/thingsboard/client/model/TbResourceExportData.java new file mode 100644 index 00000000..90e90f36 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/TbResourceExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TbResourceExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TbResourceExportData extends EntityExportData { + public TbResourceExportData() { + } + + @Override + public TbResourceExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public TbResourceExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public TbResourceExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public TbResourceExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public TbResourceExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this TbResourceExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TbResourceExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceExportData", TbResourceExportData.class); + JSON.registerDiscriminator(TbResourceExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java b/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java index 6bacc92c..3fefdd94 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java +++ b/paas/src/main/java/org/thingsboard/client/model/TsKvEntry.java @@ -47,9 +47,9 @@ TsKvEntry.JSON_PROPERTY_LONG_VALUE, TsKvEntry.JSON_PROPERTY_BOOLEAN_VALUE, TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, - TsKvEntry.JSON_PROPERTY_STR_VALUE, TsKvEntry.JSON_PROPERTY_DATA_TYPE, TsKvEntry.JSON_PROPERTY_JSON_VALUE, + TsKvEntry.JSON_PROPERTY_STR_VALUE, TsKvEntry.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -81,10 +81,6 @@ public class TsKvEntry { @javax.annotation.Nullable private String valueAsString; - public static final String JSON_PROPERTY_STR_VALUE = "strValue"; - @javax.annotation.Nullable - private String strValue; - public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; @javax.annotation.Nullable private DataType dataType; @@ -93,6 +89,10 @@ public class TsKvEntry { @javax.annotation.Nullable private String jsonValue; + public static final String JSON_PROPERTY_STR_VALUE = "strValue"; + @javax.annotation.Nullable + private String strValue; + public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -276,30 +276,6 @@ public void setValueAsString(@javax.annotation.Nullable String valueAsString) { } - public TsKvEntry strValue(@javax.annotation.Nullable String strValue) { - this.strValue = strValue; - return this; - } - - /** - * Get strValue - * @return strValue - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_STR_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStrValue() { - return strValue; - } - - - @JsonProperty(value = JSON_PROPERTY_STR_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStrValue(@javax.annotation.Nullable String strValue) { - this.strValue = strValue; - } - - public TsKvEntry dataType(@javax.annotation.Nullable DataType dataType) { this.dataType = dataType; return this; @@ -348,6 +324,30 @@ public void setJsonValue(@javax.annotation.Nullable String jsonValue) { } + public TsKvEntry strValue(@javax.annotation.Nullable String strValue) { + this.strValue = strValue; + return this; + } + + /** + * Get strValue + * @return strValue + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_STR_VALUE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStrValue() { + return strValue; + } + + + @JsonProperty(value = JSON_PROPERTY_STR_VALUE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStrValue(@javax.annotation.Nullable String strValue) { + this.strValue = strValue; + } + + public TsKvEntry version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -391,9 +391,9 @@ public boolean equals(Object o) { Objects.equals(this.longValue, tsKvEntry.longValue) && Objects.equals(this.booleanValue, tsKvEntry.booleanValue) && Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && - Objects.equals(this.strValue, tsKvEntry.strValue) && Objects.equals(this.dataType, tsKvEntry.dataType) && Objects.equals(this.jsonValue, tsKvEntry.jsonValue) && + Objects.equals(this.strValue, tsKvEntry.strValue) && Objects.equals(this.version, tsKvEntry.version); } @@ -403,7 +403,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, valueAsString, strValue, dataType, jsonValue, version); + return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, valueAsString, dataType, jsonValue, strValue, version); } private static int hashCodeNullable(JsonNullable a) { @@ -424,9 +424,9 @@ public String toString() { sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); sb.append(" booleanValue: ").append(toIndentedString(booleanValue)).append("\n"); sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); - sb.append(" strValue: ").append(toIndentedString(strValue)).append("\n"); sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); sb.append(" jsonValue: ").append(toIndentedString(jsonValue)).append("\n"); + sb.append(" strValue: ").append(toIndentedString(strValue)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -510,11 +510,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); } - // add `strValue` to the URL query string - if (getStrValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sstrValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrValue())))); - } - // add `dataType` to the URL query string if (getDataType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sdataType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); @@ -525,6 +520,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sjsonValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getJsonValue())))); } + // add `strValue` to the URL query string + if (getStrValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sstrValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrValue())))); + } + // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); diff --git a/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java b/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java index 950a2648..fc1149a1 100644 --- a/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java @@ -17,8 +17,15 @@ import org.junit.jupiter.api.Test; import org.thingsboard.client.ApiException; +import org.thingsboard.client.model.AlarmCalculatedFieldConfiguration; +import org.thingsboard.client.model.AlarmConditionValueAlarmRuleSchedule; +import org.thingsboard.client.model.AlarmRuleDefinition; +import org.thingsboard.client.model.AlarmRuleSimpleCondition; +import org.thingsboard.client.model.AlarmRuleSpecificTimeSchedule; +import org.thingsboard.client.model.AlarmSeverity; import org.thingsboard.client.model.Argument; import org.thingsboard.client.model.ArgumentType; +import org.thingsboard.client.model.AttributeScope; import org.thingsboard.client.model.CalculatedField; import org.thingsboard.client.model.CalculatedFieldType; import org.thingsboard.client.model.Device; @@ -27,14 +34,18 @@ import org.thingsboard.client.model.PageDataCalculatedField; import org.thingsboard.client.model.ReferencedEntityKey; import org.thingsboard.client.model.SimpleCalculatedFieldConfiguration; +import org.thingsboard.client.model.TbelAlarmConditionExpression; import org.thingsboard.client.model.TimeSeriesOutput; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; public class CalculatedFieldApiTest extends AbstractApiTest { @@ -126,14 +137,14 @@ void testCalculatedFieldLifecycle() throws ApiException { } // get calculated fields by entity id for device1 - PageDataCalculatedField device1Fields = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device1Fields = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice1.getId().getId().toString(), 100, 0, CalculatedFieldType.SIMPLE, null, null, null); assertNotNull(device1Fields); assertEquals(5, device1Fields.getData().size()); // get calculated fields by entity id for device2 - PageDataCalculatedField device2Fields = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device2Fields = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice2.getId().getId().toString(), 100, 0, CalculatedFieldType.SIMPLE, null, null, null); assertEquals(3, device2Fields.getData().size()); @@ -166,10 +177,122 @@ void testCalculatedFieldLifecycle() throws ApiException { client.getCalculatedFieldById(fieldToDeleteId.toString()) ); - PageDataCalculatedField device1FieldsAfterDelete = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device1FieldsAfterDelete = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice1.getId().getId().toString(), 100, 0, null, null, null, null); assertEquals(4, device1FieldsAfterDelete.getData().size()); } + @Test + void testAlarmCalculatedFieldLifecycle() throws ApiException { + long timestamp = System.currentTimeMillis(); + + // create a device to attach the alarm calculated field to + Device device = new Device(); + device.setName("AlarmCalcFieldDevice_" + timestamp); + device.setType("default"); + Device createdDevice = client.saveDevice(device, null, null, null, null, null, null); + + // build the alarm calculated field configuration + AlarmCalculatedFieldConfiguration config = new AlarmCalculatedFieldConfiguration(); + + // argument: temperature time-series + Argument tempArg = new Argument(); + ReferencedEntityKey refKey = new ReferencedEntityKey(); + refKey.setKey("temperature"); + refKey.setType(ArgumentType.TS_LATEST); + tempArg.setRefEntityKey(refKey); + config.putArgumentsItem("temp", tempArg); + + // create rule: HIGH_TEMPERATURE when temp > 50 (TBEL expression) + TbelAlarmConditionExpression createExpression = new TbelAlarmConditionExpression(); + createExpression.setExpression("return temp > 50;"); + AlarmRuleSimpleCondition createCondition = new AlarmRuleSimpleCondition(); + createCondition.setExpression(createExpression); + AlarmRuleSpecificTimeSchedule specificTimeSchedule = new AlarmRuleSpecificTimeSchedule().addDaysOfWeekItem(3); + AlarmConditionValueAlarmRuleSchedule schedule = new AlarmConditionValueAlarmRuleSchedule().staticValue(specificTimeSchedule); + createCondition.setSchedule(schedule); + AlarmRuleDefinition createRule = new AlarmRuleDefinition(); + createRule.setCondition(createCondition); + createRule.setAlarmDetails("Temperature is too high: ${temp}"); + config.setCreateRules(Map.of( + AlarmSeverity.CRITICAL.name(), createRule + )); + + // clear rule: when temp drops below 30 + TbelAlarmConditionExpression clearExpression = new TbelAlarmConditionExpression(); + clearExpression.setExpression("return temp < 30;"); + AlarmRuleSimpleCondition clearCondition = new AlarmRuleSimpleCondition(); + clearCondition.setExpression(clearExpression); + AlarmRuleDefinition clearRule = new AlarmRuleDefinition(); + clearRule.setCondition(clearCondition); + config.setClearRule(clearRule); + + config.setPropagate(true); + config.setPropagateToOwner(false); + + // create calculated field + CalculatedField cf = new CalculatedField(); + cf.setName(TEST_PREFIX + "AlarmCalcField_" + timestamp); + cf.setType(CalculatedFieldType.ALARM); + + EntityId entityId = new EntityId(); + entityId.setEntityType(EntityType.DEVICE); + entityId.setId(createdDevice.getId().getId()); + cf.setEntityId(entityId); + cf.setConfiguration(config); + + CalculatedField created = client.saveCalculatedField(cf); + assertNotNull(created); + assertNotNull(created.getId()); + assertEquals(cf.getName(), created.getName()); + assertEquals(CalculatedFieldType.ALARM, created.getType()); + AlarmCalculatedFieldConfiguration configuration = (AlarmCalculatedFieldConfiguration) created.getConfiguration(); + AlarmConditionValueAlarmRuleSchedule createdSchedule = configuration.getCreateRules().get(AlarmSeverity.CRITICAL.name()).getCondition().getSchedule(); + AlarmRuleSpecificTimeSchedule staticSchedule = (AlarmRuleSpecificTimeSchedule)createdSchedule.getStaticValue(); + assertEquals(Set.of(3), staticSchedule.getDaysOfWeek()); + + // get by id and verify configuration + CalculatedField fetched = client.getCalculatedFieldById(created.getId().getId().toString()); + assertNotNull(fetched); + assertEquals(created.getName(), fetched.getName()); + assertEquals(CalculatedFieldType.ALARM, fetched.getType()); + assertNotNull(fetched.getConfiguration()); + AlarmCalculatedFieldConfiguration fetchedConfig = + (AlarmCalculatedFieldConfiguration) fetched.getConfiguration(); + assertNotNull(fetchedConfig.getCreateRules()); + assertEquals(1, fetchedConfig.getCreateRules().size()); + assertTrue(fetchedConfig.getCreateRules().containsKey("CRITICAL")); + assertNotNull(fetchedConfig.getClearRule()); + assertEquals(Boolean.TRUE, fetchedConfig.getPropagate()); + + // update: add a second create rule for CRITICAL_TEMPERATURE + TbelAlarmConditionExpression criticalExpression = new TbelAlarmConditionExpression(); + criticalExpression.setExpression("return temp > 80;"); + AlarmRuleSimpleCondition criticalCondition = new AlarmRuleSimpleCondition(); + criticalCondition.setExpression(criticalExpression); + AlarmRuleDefinition criticalRule = new AlarmRuleDefinition(); + criticalRule.setCondition(criticalCondition); + fetchedConfig.putCreateRulesItem(AlarmSeverity.INDETERMINATE.name(), criticalRule); + fetched.setConfiguration(fetchedConfig); + + CalculatedField updated = client.saveCalculatedField(fetched); + AlarmCalculatedFieldConfiguration updatedConfig = + (AlarmCalculatedFieldConfiguration) updated.getConfiguration(); + assertEquals(2, updatedConfig.getCreateRules().size()); + assertTrue(updatedConfig.getCreateRules().containsKey("INDETERMINATE")); + + // filter by entity and ALARM type + PageDataCalculatedField deviceFields = client.getCalculatedFieldsByEntityId( + EntityType.DEVICE.toString(), createdDevice.getId().getId().toString(), + 100, 0, CalculatedFieldType.ALARM, null, null, null); + assertNotNull(deviceFields); + assertEquals(1, deviceFields.getData().size()); + + // delete and verify + UUID fieldId = created.getId().getId(); + client.deleteCalculatedField(fieldId.toString()); + assertReturns404(() -> client.getCalculatedFieldById(fieldId.toString())); + } + } diff --git a/paas/src/test/java/org/thingsboard/client/api/ConverterApiTest.java b/paas/src/test/java/org/thingsboard/client/api/ConverterApiTest.java index c36e2b5c..fc8e69d3 100644 --- a/paas/src/test/java/org/thingsboard/client/api/ConverterApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/ConverterApiTest.java @@ -126,7 +126,7 @@ void testGetConvertersByIdsV2() throws ApiException { String id1 = c1.getId().getId().toString(); String id2 = c2.getId().getId().toString(); - List result = client.getConvertersByIdsV2(List.of(id1, id2)); + List result = client.getConvertersByIds(List.of(id1, id2)); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.stream().anyMatch(c -> c.getId().getId().toString().equals(id1))); diff --git a/paas/src/test/java/org/thingsboard/client/api/CustomerApiTest.java b/paas/src/test/java/org/thingsboard/client/api/CustomerApiTest.java index 3976d6e7..6b5dbefc 100644 --- a/paas/src/test/java/org/thingsboard/client/api/CustomerApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/CustomerApiTest.java @@ -115,7 +115,7 @@ void testGetCustomerCustomerInfos() throws ApiException { void testGetCustomersByIdsV2() throws ApiException { String customerId = savedCustomer.getId().getId().toString(); - List result = client.getCustomersByIdsV2(List.of(customerId)); + List result = client.getCustomersByIds(List.of(customerId)); assertNotNull(result); assertEquals(1, result.size(), "Expected exactly one customer returned"); diff --git a/paas/src/test/java/org/thingsboard/client/api/DashboardApiTest.java b/paas/src/test/java/org/thingsboard/client/api/DashboardApiTest.java index 98ee95f1..c0eab272 100644 --- a/paas/src/test/java/org/thingsboard/client/api/DashboardApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/DashboardApiTest.java @@ -50,7 +50,7 @@ void testDashboardLifecycle() throws ApiException { } // find all, check count - PageDataDashboardInfo allDashboards = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo allDashboards = client.getTenantDashboards(100, 0, null, null, null, null); assertNotNull(allDashboards); assertNotNull(allDashboards.getData()); int initialSize = allDashboards.getData().size(); @@ -59,7 +59,7 @@ void testDashboardLifecycle() throws ApiException { List createdDashboards = allDashboards.getData(); // find all with search text, check count - PageDataDashboardInfo filteredDashboards = client.getTenantDashboards1(100, 0, null, TEST_PREFIX_2, null, null); + PageDataDashboardInfo filteredDashboards = client.getTenantDashboards(100, 0, null, TEST_PREFIX_2, null, null); assertEquals(10, filteredDashboards.getData().size(), "Expected exactly 10 dashboards matching prefix"); // find by id @@ -97,7 +97,7 @@ void testGetTenantDashboards() throws Exception { client.saveDashboard(dashboard, null, null, null); // tenant admin variant - PageDataDashboardInfo tenantAdminResult = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo tenantAdminResult = client.getTenantDashboards(100, 0, null, null, null, null); assertNotNull(tenantAdminResult); assertEquals(1, tenantAdminResult.getData().size()); @@ -111,7 +111,7 @@ void testGetTenantDashboards() throws Exception { // system administrator variant (requires tenantId) client.login("sysadmin@thingsboard.org", "sysadmin"); - PageDataDashboardInfo sysAdminResult = client.getTenantDashboards( + PageDataDashboardInfo sysAdminResult = client.getTenantDashboardsByTenantId( savedTenant.getId().getId().toString(), 100, 0, null, null, null); assertNotNull(sysAdminResult); assertEquals(1, sysAdminResult.getData().size(), "Expected at least one dashboard from sysadmin query"); @@ -135,7 +135,7 @@ void testGetDashboardsByIds() throws ApiException { client.saveDashboard(dashboard, null, null, null); // saveDashboard returns void, so fetch the ID via getTenantDashboards1 - PageDataDashboardInfo all = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo all = client.getTenantDashboards(100, 0, null, null, null, null); assertFalse(all.getData().isEmpty()); DashboardInfo first = all.getData().get(0); @@ -178,7 +178,7 @@ void testTenantHomeDashboard() throws ApiException { dashboard.setTitle(TEST_PREFIX + System.currentTimeMillis()); client.saveDashboard(dashboard, null, null, null); - PageDataDashboardInfo all = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo all = client.getTenantDashboards(100, 0, null, null, null, null); DashboardId dashboardId = all.getData().get(0).getId(); // getTenantHomeDashboardInfo: no home dashboard set for a freshly created tenant diff --git a/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java b/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java index 24cf533b..04057733 100644 --- a/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/DeviceApiTest.java @@ -108,7 +108,7 @@ void testDeviceLifecycle() throws Exception { request.setDevice(deviceWithCreds); request.setCredentials(creds); - Device savedDeviceWithCreds = client.saveDeviceWithCredentials1(request, null, null, null, null, null); + Device savedDeviceWithCreds = client.saveDeviceWithCredentials(request, null, null, null, null, null); assertEquals("device-with-creds", savedDeviceWithCreds.getName()); // find credentials by device id @@ -194,7 +194,7 @@ void testFindByQuery() throws ApiException { buildingToDevice.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); buildingToDevice.setType("Contains"); buildingToDevice.setTypeGroup(RelationTypeGroup.COMMON); - EntityRelation savedRelation = client.saveRelationV2(buildingToDevice); + EntityRelation savedRelation = client.saveRelation(buildingToDevice); RelationsSearchParameters params = new RelationsSearchParameters(); params.setRootId(device.getId().getId()); @@ -206,7 +206,7 @@ void testFindByQuery() throws ApiException { query.setParameters(params); // device has no outgoing relations; result is an empty list, not null - List result = client.findByQuery(query); + List result = client.findEntityRelationsByQuery(query); assertEquals(1, result.size()); } diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java index e69945ea..e2c64e0d 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java @@ -251,7 +251,7 @@ void testGetEntityGroupsByIds() throws ApiException { String id2 = g2.getId().getId().toString(); // getEntityGroupsByIdsV2 - List byIds = client.getEntityGroupsByIdsV2(List.of(id1, id2)); + List byIds = client.getEntityGroupsByIds(List.of(id1, id2)); assertNotNull(byIds); assertEquals(2, byIds.size()); assertTrue(byIds.stream().anyMatch(g -> g.getId().getId().toString().equals(id1))); diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java index a2b42bfa..aa787e62 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java @@ -320,7 +320,7 @@ void testFindByAssetSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(child.getId().getId()).entityType(EntityType.ASSET)); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -353,7 +353,7 @@ void testFindByDeviceSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -423,7 +423,7 @@ void testFindByEdgeSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(edge.getId().getId()).entityType(EntityType.EDGE)); rel.setType("Manages"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -486,7 +486,7 @@ void testFindByEntityViewSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(ev.getId().getId()).entityType(EntityType.ENTITY_VIEW)); rel.setType("HasView"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -518,7 +518,7 @@ void testFindByRelationsQueryFilter() throws Exception { rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() diff --git a/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java b/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java index ab2eaab1..54d3b567 100644 --- a/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java @@ -82,20 +82,20 @@ void testEntityRelationLifecycle() throws ApiException { buildingToFloor.setTo(entityId(floor)); buildingToFloor.setType("Contains"); buildingToFloor.setTypeGroup(RelationTypeGroup.COMMON); - EntityRelation savedRelation = client.saveRelationV2(buildingToFloor); + EntityRelation savedRelation = client.saveRelation(buildingToFloor); assertNotNull(savedRelation); assertEquals("Contains", savedRelation.getType()); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device1)) .type("Contains") .typeGroup(RelationTypeGroup.COMMON)); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device2)) .type("Contains").typeGroup(RelationTypeGroup.COMMON)); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device3)) .type("Manages") @@ -111,28 +111,28 @@ void testEntityRelationLifecycle() throws ApiException { assertEquals("Contains", fetched.getType()); // find all relations from floor - List fromFloor = client.findByFromV2("ASSET", + List fromFloor = client.findEntityRelationsByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(3, fromFloor.size()); // find relations from floor with type filter "Contains" - List containsFromFloor = client.findByFromAndRelationType("ASSET", + List containsFromFloor = client.findEntityRelationsByFromAndRelationType("ASSET", floor.getId().getId().toString(), "Contains", RelationTypeGroup.COMMON.getValue()); assertEquals(2, containsFromFloor.size()); // find relations to device1 - List toDevice1 = client.findByToV2("DEVICE", + List toDevice1 = client.findEntityRelationsByTo("DEVICE", device1.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(1, toDevice1.size()); assertEquals("Contains", toDevice1.get(0).getType()); // find relations to device3 with type filter "Manages" - List managesToDevice3 = client.findByToAndRelationType("DEVICE", + List managesToDevice3 = client.findEntityRelationsByToAndRelationType("DEVICE", device3.getId().getId().toString(), "Manages", RelationTypeGroup.COMMON.getValue()); assertEquals(1, managesToDevice3.size()); // find info by from (includes entity names) - List infoFromFloor = client.findInfoByFromV2("ASSET", + List infoFromFloor = client.findEntityRelationInfosByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(3, infoFromFloor.size()); Device finalDevice = device1; @@ -140,7 +140,7 @@ void testEntityRelationLifecycle() throws ApiException { finalDevice.getName().equals(info.getToName()))); // find info by to - List infoToDevice2 = client.findInfoByToV2("DEVICE", + List infoToDevice2 = client.findEntityRelationInfosByTo("DEVICE", device2.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(1, infoToDevice2.size()); assertEquals(floor.getName(), infoToDevice2.get(0).getFromName()); @@ -161,11 +161,11 @@ void testEntityRelationLifecycle() throws ApiException { query.setParameters(params); query.setFilters(List.of(filter)); - List queryResult = client.findByQuery(query); + List queryResult = client.findEntityRelationsByQuery(query); assertTrue(queryResult.size() >= 3); // find info by query - List infoQueryResult = client.findInfoByQuery(query); + List infoQueryResult = client.findEntityRelationInfosByQuery(query); assertTrue(infoQueryResult.size() >= 3); // delete single relation @@ -176,14 +176,14 @@ void testEntityRelationLifecycle() throws ApiException { RelationTypeGroup.COMMON.getValue()); // verify deletion - List afterDelete = client.findByFromV2("ASSET", + List afterDelete = client.findEntityRelationsByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(2, afterDelete.size()); // delete all relations for building client.deleteRelations(building.getId().getId().toString(), "ASSET"); - List afterDeleteAll = client.findByFromV2("ASSET", + List afterDeleteAll = client.findEntityRelationsByFrom("ASSET", building.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(0, afterDeleteAll.size()); } diff --git a/paas/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java b/paas/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java index 0c8ea585..9ae44f8a 100644 --- a/paas/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java @@ -170,7 +170,7 @@ void testGetIntegrationsByIds() throws ApiException { String id2 = i2.getId().getId().toString(); // getIntegrationsByIdsV2 (covers both getIntegrationsByIds and getIntegrationsByIdsV2) - List result = client.getIntegrationsByIdsV2(List.of(id1, id2)); + List result = client.getIntegrationsByIds(List.of(id1, id2)); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.stream().anyMatch(i -> i.getId().getId().toString().equals(id1))); diff --git a/paas/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java b/paas/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java index 11c015a7..51eaf75b 100644 --- a/paas/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java @@ -108,7 +108,7 @@ void testOAuth2ClientLifecycle() throws ApiException { createdClients.get(0).getId().getId().toString(), createdClients.get(1).getId().getId().toString() ); - List fetchedInfos = client.findTenantOAuth2ClientInfosByIdsV2(idsToFetch); + List fetchedInfos = client.findTenantOAuth2ClientInfosByIds(idsToFetch); assertEquals(2, fetchedInfos.size()); // update OAuth2 client diff --git a/paas/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java b/paas/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java index ad3a3a72..d90370db 100644 --- a/paas/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java @@ -206,7 +206,7 @@ void testGetOtaPackagesByDeviceProfileAndType() throws Exception { createFirmwareWithUrl("byprofile_" + ts + "_0"); createFirmwareWithUrl("byprofile_" + ts + "_1"); - PageDataOtaPackageInfo page = client.getOtaPackages1( + PageDataOtaPackageInfo page = client.getOtaPackagesByDeviceProfileIdAndType( profileId.getId().toString(), "FIRMWARE", 100, 0, OTA_PREFIX + "byprofile_" + ts, null, null); assertNotNull(page); diff --git a/paas/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java b/paas/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java index 82d6c848..ddc0cb8d 100644 --- a/paas/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java @@ -52,7 +52,7 @@ void testHandleOneWayDeviceRPCRequest() throws ApiException { // String as the return type and fails to deserialize the JSON object, // wrapping the IOException in ApiException with code 0. try { - client.handleOneWayDeviceRPCRequest(deviceId, ONE_WAY_BODY); + client.handleOneWayDeviceRPCRequestV1(deviceId, ONE_WAY_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleOneWayDeviceRPCRequest got an unexpected HTTP error: " + e.getCode()); @@ -74,7 +74,7 @@ void testHandleTwoWayDeviceRPCRequest() throws ApiException { // Same behaviour as one-way: persistent=true returns {"rpcId":"..."} // immediately; client type mismatch produces ApiException(code=0). try { - client.handleTwoWayDeviceRPCRequest(deviceId, TWO_WAY_BODY); + client.handleTwoWayDeviceRPCRequestV1(deviceId, TWO_WAY_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleTwoWayDeviceRPCRequest got an unexpected HTTP error: " + e.getCode()); diff --git a/paas/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java b/paas/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java index 9f3a0d6a..18a15d81 100644 --- a/paas/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java @@ -72,7 +72,7 @@ void testHandleOneWayDeviceRPCRequest() throws ApiException { // which the generated client (return type String) cannot deserialise → // IOException wrapped in ApiException with code 0. try { - client.handleOneWayDeviceRPCRequest1(deviceId, PERSISTENT_BODY); + client.handleOneWayDeviceRPCRequestV2(deviceId, PERSISTENT_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleOneWayDeviceRPCRequest1 got an unexpected HTTP error: " + e.getCode()); @@ -93,7 +93,7 @@ void testHandleTwoWayDeviceRPCRequest() throws ApiException { // Same behaviour as one-way with persistent=true. try { - client.handleTwoWayDeviceRPCRequest1(deviceId, PERSISTENT_BODY); + client.handleTwoWayDeviceRPCRequestV2(deviceId, PERSISTENT_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleTwoWayDeviceRPCRequest1 got an unexpected HTTP error: " + e.getCode()); diff --git a/paas/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java b/paas/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java index 632f66ee..a163525b 100644 --- a/paas/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java @@ -123,13 +123,13 @@ void testGetAllSchedulerEventsV2() throws ApiException { String id2 = e2.getId().getId().toString(); // getAllSchedulerEventsV2 – no type filter - List all = client.getAllSchedulerEventsV2(null); + List all = client.getAllSchedulerEvents(null); assertNotNull(all); assertTrue(all.stream().anyMatch(e -> e.getId().getId().toString().equals(id1))); assertTrue(all.stream().anyMatch(e -> e.getId().getId().toString().equals(id2))); // getAllSchedulerEventsV2 – with type filter - List filtered = client.getAllSchedulerEventsV2(EVENT_TYPE); + List filtered = client.getAllSchedulerEvents(EVENT_TYPE); assertNotNull(filtered); assertTrue(filtered.stream().anyMatch(e -> e.getId().getId().toString().equals(id1))); @@ -211,7 +211,7 @@ void testGetSchedulerEventsByIdsV2() throws ApiException { String id1 = e1.getId().getId().toString(); String id2 = e2.getId().getId().toString(); - List result = client.getSchedulerEventsByIdsV2(List.of(id1, id2)); + List result = client.getSchedulerEventsByIds(List.of(id1, id2)); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.stream().anyMatch(e -> e.getId().getId().toString().equals(id1))); diff --git a/paas/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java b/paas/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java index 231c6245..4afa2627 100644 --- a/paas/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java @@ -100,7 +100,7 @@ void testResourceLifecycle() throws ApiException { createdResources.get(0).getId().getId().toString(), createdResources.get(1).getId().getId().toString() ); - List resourceList = client.getSystemOrTenantResourcesByIdsV2(idsToFetch); + List resourceList = client.getSystemOrTenantResourcesByIds(idsToFetch); assertEquals(2, resourceList.size()); // update resource diff --git a/paas/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java b/paas/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java index 5b29e905..ca9e02cb 100644 --- a/paas/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java @@ -59,7 +59,7 @@ void testTwoFactorAuthLifecycle() throws ApiException, IOException, InterruptedE assertEquals(300, savedSettings.getTotalAllowedTimeForVerification()); // get available 2FA providers (should include TOTP) - List providerTypes = client.getAvailableTwoFaProviders1(); + List providerTypes = client.getAvailableTwoFaProviderTypes(); assertNotNull(providerTypes); assertTrue(providerTypes.contains(TwoFaProviderType.TOTP)); diff --git a/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java b/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java index 57e84d6e..d78fefb6 100644 --- a/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java +++ b/paas/src/test/java/org/thingsboard/client/api/UserApiTest.java @@ -214,7 +214,7 @@ void testGetUsersByIdsV2() throws Exception { user.setEmail("byids_" + ts + "@test.com"); User created = client.saveUser(user, "false", null, null); - List result = client.getUsersByIdsV2(List.of(created.getId().getId().toString())); + List result = client.getUsersByIds(List.of(created.getId().getId().toString())); assertNotNull(result); assertEquals(1, result.size()); assertEquals(created.getId().getId(), result.get(0).getId().getId()); @@ -294,7 +294,7 @@ void testUserSettings() throws Exception { assertEquals("2", typed.get("y").asText()); // deleteUserSettings removes a specific key from a typed settings section - client.deleteUserSettings("x", settingsType); + client.deleteUserSettingsByType("x", settingsType); JsonNode afterDelete = client.getUserSettings(settingsType); assertNotNull(afterDelete); assertFalse(afterDelete.has("x")); diff --git a/pe/docs/AdminControllerApi.md b/pe/docs/AdminControllerApi.md index a5dc6fe2..fe8f7ed4 100644 --- a/pe/docs/AdminControllerApi.md +++ b/pe/docs/AdminControllerApi.md @@ -5,20 +5,20 @@ | [**autoCommitSettingsExists**](#autoCommitSettingsExists) | **GET** /api/admin/autoCommitSettings/exists | Check auto commit settings exists (autoCommitSettingsExists) | | [**checkRepositoryAccess**](#checkRepositoryAccess) | **POST** /api/admin/repositorySettings/checkAccess | Check repository access (checkRepositoryAccess) | | [**checkUpdates**](#checkUpdates) | **GET** /api/admin/updates | Check for new Platform Releases (checkUpdates) | -| [**codeProcessingUrl**](#codeProcessingUrl) | **GET** /api/admin/mail/oauth2/code | codeProcessingUrl | | [**deleteAutoCommitSettings**](#deleteAutoCommitSettings) | **DELETE** /api/admin/autoCommitSettings | Delete auto commit settings (deleteAutoCommitSettings) | | [**deleteRepositorySettings**](#deleteRepositorySettings) | **DELETE** /api/admin/repositorySettings | Delete repository settings (deleteRepositorySettings) | | [**getAdminSettings**](#getAdminSettings) | **GET** /api/admin/settings/{key} | Get the Administration Settings object using key (getAdminSettings) | -| [**getAuthorizationUrl**](#getAuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getAutoCommitSettings**](#getAutoCommitSettings) | **GET** /api/admin/autoCommitSettings | Get auto commit settings (getAutoCommitSettings) | | [**getFeaturesInfo**](#getFeaturesInfo) | **GET** /api/admin/featuresInfo | Get features info (getFeaturesInfo) | | [**getJwtSettings**](#getJwtSettings) | **GET** /api/admin/jwtSettings | Get the JWT Settings object (getJwtSettings) | | [**getLicenseUsageInfo**](#getLicenseUsageInfo) | **GET** /api/admin/licenseUsageInfo | Get license usage info (getLicenseUsageInfo) | +| [**getMailOAuth2AuthorizationUrl**](#getMailOAuth2AuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getMailProcessingUrl**](#getMailProcessingUrl) | **GET** /api/admin/mail/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getMailProcessingUrl) | | [**getRepositorySettings**](#getRepositorySettings) | **GET** /api/admin/repositorySettings | Get repository settings (getRepositorySettings) | | [**getRepositorySettingsInfo**](#getRepositorySettingsInfo) | **GET** /api/admin/repositorySettings/info | getRepositorySettingsInfo | | [**getSecuritySettings**](#getSecuritySettings) | **GET** /api/admin/securitySettings | Get the Security Settings object (getSecuritySettings) | | [**getSystemInfo**](#getSystemInfo) | **GET** /api/admin/systemInfo | Get system info (getSystemInfo) | +| [**handleMailOAuth2Callback**](#handleMailOAuth2Callback) | **GET** /api/admin/mail/oauth2/code | handleMailOAuth2Callback | | [**repositorySettingsExists**](#repositorySettingsExists) | **GET** /api/admin/repositorySettings/exists | Check repository settings exists (repositorySettingsExists) | | [**saveAdminSettings**](#saveAdminSettings) | **POST** /api/admin/settings | Creates or Updates the Administration Settings (saveAdminSettings) | | [**saveAutoCommitSettings**](#saveAutoCommitSettings) | **POST** /api/admin/autoCommitSettings | Creates or Updates the auto commit settings (saveAutoCommitSettings) | @@ -76,25 +76,6 @@ Check notifications about new platform releases. Available for users with 'SYS **UpdateMessage** -## codeProcessingUrl - -> codeProcessingUrl(code, state) - -codeProcessingUrl - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String** | | | -| **state** | **String** | | | - -### Return type - -null (empty response body) - - ## deleteAutoCommitSettings > deleteAutoCommitSettings() @@ -142,19 +123,6 @@ Get the Administration Settings object using specified string key. Referencing n **AdminSettings** -## getAuthorizationUrl - -> String getAuthorizationUrl() - -Redirect user to mail provider login page. - -After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - -### Return type - -**String** - - ## getAutoCommitSettings > Map getAutoCommitSettings() @@ -207,6 +175,19 @@ Get license usage info. Available for users with 'SYS_ADMIN' authority. **LicenseUsageInfo** +## getMailOAuth2AuthorizationUrl + +> String getMailOAuth2AuthorizationUrl() + +Redirect user to mail provider login page. + +After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + +### Return type + +**String** + + ## getMailProcessingUrl > String getMailProcessingUrl() @@ -270,6 +251,25 @@ Get main information about system. Available for users with 'SYS_ADMIN' author **SystemInfo** +## handleMailOAuth2Callback + +> handleMailOAuth2Callback(code, state) + +handleMailOAuth2Callback + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **code** | **String** | | | +| **state** | **String** | | | + +### Return type + +null (empty response body) + + ## repositorySettingsExists > Boolean repositorySettingsExists() diff --git a/pe/docs/AiModelExportData.md b/pe/docs/AiModelExportData.md new file mode 100644 index 00000000..4b2f43c7 --- /dev/null +++ b/pe/docs/AiModelExportData.md @@ -0,0 +1,23 @@ + +# AiModelExportData + +`org.thingsboard.client.model.AiModelExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/AlarmAssignmentRecipientsConfig.md b/pe/docs/AlarmAssignmentRecipientsConfig.md new file mode 100644 index 00000000..c394d83e --- /dev/null +++ b/pe/docs/AlarmAssignmentRecipientsConfig.md @@ -0,0 +1,24 @@ + +# AlarmAssignmentRecipientsConfig + +`org.thingsboard.client.model.AlarmAssignmentRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/AlarmCommentRecipientsConfig.md b/pe/docs/AlarmCommentRecipientsConfig.md new file mode 100644 index 00000000..863bb32d --- /dev/null +++ b/pe/docs/AlarmCommentRecipientsConfig.md @@ -0,0 +1,24 @@ + +# AlarmCommentRecipientsConfig + +`org.thingsboard.client.model.AlarmCommentRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/AlarmControllerApi.md b/pe/docs/AlarmControllerApi.md index 36dd13c9..7291da24 100644 --- a/pe/docs/AlarmControllerApi.md +++ b/pe/docs/AlarmControllerApi.md @@ -9,7 +9,7 @@ | [**getAlarmById**](#getAlarmById) | **GET** /api/alarm/{alarmId} | Get Alarm (getAlarmById) | | [**getAlarmInfoById**](#getAlarmInfoById) | **GET** /api/alarm/info/{alarmId} | Get Alarm Info (getAlarmInfoById) | | [**getAlarmTypes**](#getAlarmTypes) | **GET** /api/alarm/types | Get Alarm Types (getAlarmTypes) | -| [**getAlarms**](#getAlarms) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarms) | +| [**getAlarmsByEntity**](#getAlarmsByEntity) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsByEntity) | | [**getAlarmsV2**](#getAlarmsV2) | **GET** /api/v2/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsV2) | | [**getAllAlarms**](#getAllAlarms) | **GET** /api/alarms | Get All Alarms (getAllAlarms) | | [**getAllAlarmsV2**](#getAllAlarmsV2) | **GET** /api/v2/alarms | Get All Alarms (getAllAlarmsV2) | @@ -163,11 +163,11 @@ Returns a set of unique alarm types based on alarms that are either owned by the **PageDataEntitySubtype** -## getAlarms +## getAlarmsByEntity -> PageDataAlarmInfo getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) +> PageDataAlarmInfo getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) -Get Alarms (getAlarms) +Get Alarms (getAlarmsByEntity) Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/ApiUsageLimitRecipientsConfig.md b/pe/docs/ApiUsageLimitRecipientsConfig.md new file mode 100644 index 00000000..6a24d1e0 --- /dev/null +++ b/pe/docs/ApiUsageLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ApiUsageLimitRecipientsConfig + +`org.thingsboard.client.model.ApiUsageLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/AssetControllerApi.md b/pe/docs/AssetControllerApi.md index 3f37cbf8..f6719606 100644 --- a/pe/docs/AssetControllerApi.md +++ b/pe/docs/AssetControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteAsset**](#deleteAsset) | **DELETE** /api/asset/{assetId} | Delete asset (deleteAsset) | -| [**findByQuery4**](#findByQuery4) | **POST** /api/assets | Find related assets (findByQuery) | +| [**findAssetsByQuery**](#findAssetsByQuery) | **POST** /api/assets | Find related assets (findAssetsByQuery) | | [**getAllAssetInfos**](#getAllAssetInfos) | **GET** /api/assetInfos/all | Get All Asset Infos for current user (getAllAssetInfos) | | [**getAssetById**](#getAssetById) | **GET** /api/asset/{assetId} | Get Asset (getAssetById) | | [**getAssetInfoById**](#getAssetInfoById) | **GET** /api/asset/info/{assetId} | Get Asset Info (getAssetInfoById) | @@ -12,7 +12,7 @@ | [**getAssetsByIds**](#getAssetsByIds) | **GET** /api/assets | Get Assets By Ids (getAssetsByIds) | | [**getCustomerAssetInfos**](#getCustomerAssetInfos) | **GET** /api/customer/{customerId}/assetInfos | Get Customer Asset Infos (getCustomerAssetInfos) | | [**getCustomerAssets**](#getCustomerAssets) | **GET** /api/customer/{customerId}/assets | Get Customer Assets (getCustomerAssets) | -| [**getTenantAssetByName**](#getTenantAssetByName) | **GET** /api/tenant/asset | Get Tenant Asset (getTenantAsset) | +| [**getTenantAssetByName**](#getTenantAssetByName) | **GET** /api/tenant/asset | Get Tenant Asset (getTenantAssetByName) | | [**getTenantAssets**](#getTenantAssets) | **GET** /api/tenant/assets | Get Tenant Assets (getTenantAssets) | | [**getUserAssets**](#getUserAssets) | **GET** /api/user/assets | Get Assets (getUserAssets) | | [**processAssetBulkImport**](#processAssetBulkImport) | **POST** /api/asset/bulk_import | Import the bulk of assets (processAssetsBulkImport) | @@ -40,11 +40,11 @@ Deletes the asset and all the relations (from and to the asset). Referencing non null (empty response body) -## findByQuery4 +## findAssetsByQuery -> List findByQuery4(assetSearchQuery) +> List findAssetsByQuery(assetSearchQuery) -Find related assets (findByQuery) +Find related assets (findAssetsByQuery) Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -241,7 +241,7 @@ Returns a page of assets objects owned by customer. You can specify parameters t > Asset getTenantAssetByName(assetName) -Get Tenant Asset (getTenantAsset) +Get Tenant Asset (getTenantAssetByName) 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/AssetExportData.md b/pe/docs/AssetExportData.md new file mode 100644 index 00000000..3985a421 --- /dev/null +++ b/pe/docs/AssetExportData.md @@ -0,0 +1,23 @@ + +# AssetExportData + +`org.thingsboard.client.model.AssetExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/AssetProfileControllerApi.md b/pe/docs/AssetProfileControllerApi.md index 09978e55..4c513da5 100644 --- a/pe/docs/AssetProfileControllerApi.md +++ b/pe/docs/AssetProfileControllerApi.md @@ -8,7 +8,7 @@ | [**getAssetProfileInfos**](#getAssetProfileInfos) | **GET** /api/assetProfileInfos | Get Asset Profile infos (getAssetProfileInfos) | | [**getAssetProfileNames**](#getAssetProfileNames) | **GET** /api/assetProfile/names | Get Asset Profile names (getAssetProfileNames) | | [**getAssetProfiles**](#getAssetProfiles) | **GET** /api/assetProfiles | Get Asset Profiles (getAssetProfiles) | -| [**getAssetProfilesByIdsV2**](#getAssetProfilesByIdsV2) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIdsV2) | +| [**getAssetProfilesByIds**](#getAssetProfilesByIds) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIds) | | [**getDefaultAssetProfileInfo**](#getDefaultAssetProfileInfo) | **GET** /api/assetProfileInfo/default | Get Default Asset Profile (getDefaultAssetProfileInfo) | | [**saveAssetProfile**](#saveAssetProfile) | **POST** /api/assetProfile | Create Or Update Asset Profile (saveAssetProfile) | | [**setDefaultAssetProfile**](#setDefaultAssetProfile) | **POST** /api/assetProfile/{assetProfileId}/default | Make Asset Profile Default (setDefaultAssetProfile) | @@ -144,11 +144,11 @@ Returns a page of asset profile objects owned by tenant. You can specify paramet **PageDataAssetProfile** -## getAssetProfilesByIdsV2 +## getAssetProfilesByIds -> List getAssetProfilesByIdsV2(assetProfileIds) +> List getAssetProfilesByIds(assetProfileIds) -Get Asset Profiles By Ids (getAssetProfilesByIdsV2) +Get Asset Profiles By Ids (getAssetProfilesByIds) Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/AssetProfileExportData.md b/pe/docs/AssetProfileExportData.md new file mode 100644 index 00000000..8507f2a9 --- /dev/null +++ b/pe/docs/AssetProfileExportData.md @@ -0,0 +1,23 @@ + +# AssetProfileExportData + +`org.thingsboard.client.model.AssetProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/BlobEntityControllerApi.md b/pe/docs/BlobEntityControllerApi.md index 2b4c340e..13b0f3e5 100644 --- a/pe/docs/BlobEntityControllerApi.md +++ b/pe/docs/BlobEntityControllerApi.md @@ -5,7 +5,7 @@ | [**deleteBlobEntity**](#deleteBlobEntity) | **DELETE** /api/blobEntity/{blobEntityId} | Delete Blob Entity (deleteBlobEntity) | | [**downloadBlobEntity**](#downloadBlobEntity) | **GET** /api/blobEntity/{blobEntityId}/download | Download Blob Entity By Id (downloadBlobEntity) | | [**getBlobEntities**](#getBlobEntities) | **GET** /api/blobEntities | Get Blob Entities (getBlobEntities) | -| [**getBlobEntitiesByIdsV2**](#getBlobEntitiesByIdsV2) | **GET** /api/blobEntities/list | Get Blob Entities By Ids (getBlobEntitiesByIdsV2) | +| [**getBlobEntitiesByIds**](#getBlobEntitiesByIds) | **GET** /api/blobEntities/list | Get Blob Entities By Ids (getBlobEntitiesByIds) | | [**getBlobEntityInfoById**](#getBlobEntityInfoById) | **GET** /api/blobEntity/info/{blobEntityId} | Get Blob Entity With Customer Info (getBlobEntityInfoById) | @@ -77,11 +77,11 @@ Returns a page of BlobEntityWithCustomerInfo object that are available for the c **PageDataBlobEntityWithCustomerInfo** -## getBlobEntitiesByIdsV2 +## getBlobEntitiesByIds -> List getBlobEntitiesByIdsV2(blobEntityIds) +> List getBlobEntitiesByIds(blobEntityIds) -Get Blob Entities By Ids (getBlobEntitiesByIdsV2) +Get Blob Entities By Ids (getBlobEntitiesByIds) Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/BulkImportResultAsset.md b/pe/docs/BulkImportResultAsset.md index 49d23019..67309837 100644 --- a/pe/docs/BulkImportResultAsset.md +++ b/pe/docs/BulkImportResultAsset.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/pe/docs/BulkImportResultDevice.md b/pe/docs/BulkImportResultDevice.md index e1532d49..be195ee7 100644 --- a/pe/docs/BulkImportResultDevice.md +++ b/pe/docs/BulkImportResultDevice.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/pe/docs/BulkImportResultEdge.md b/pe/docs/BulkImportResultEdge.md index bdf755a6..91d73829 100644 --- a/pe/docs/BulkImportResultEdge.md +++ b/pe/docs/BulkImportResultEdge.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/pe/docs/CalculatedFieldControllerApi.md b/pe/docs/CalculatedFieldControllerApi.md index b4fe5a59..c6de01e2 100644 --- a/pe/docs/CalculatedFieldControllerApi.md +++ b/pe/docs/CalculatedFieldControllerApi.md @@ -6,13 +6,13 @@ | [**getCalculatedFieldById**](#getCalculatedFieldById) | **GET** /api/calculatedField/{calculatedFieldId} | Get Calculated Field (getCalculatedFieldById) | | [**getCalculatedFieldNames**](#getCalculatedFieldNames) | **GET** /api/calculatedFields/names | Get calculated field names (getCalculatedFieldNames) | | [**getCalculatedFields**](#getCalculatedFields) | **GET** /api/calculatedFields | Get calculated fields (getCalculatedFields) | -| [**getCalculatedFieldsByEntityIdV2**](#getCalculatedFieldsByEntityIdV2) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) | +| [**getCalculatedFieldsByEntityId**](#getCalculatedFieldsByEntityId) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) | | [**getLastCalculatedFieldReprocessingJob**](#getLastCalculatedFieldReprocessingJob) | **GET** /api/calculatedField/{calculatedFieldId}/reprocess/job | getLastCalculatedFieldReprocessingJob | | [**getLatestCalculatedFieldDebugEvent**](#getLatestCalculatedFieldDebugEvent) | **GET** /api/calculatedField/{calculatedFieldId}/debug | Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent) | | [**reprocessCalculatedField**](#reprocessCalculatedField) | **GET** /api/calculatedField/{calculatedFieldId}/reprocess | Reprocess Calculated Field (reprocessCalculatedField) | | [**reprocessCalculatedFieldAndWait**](#reprocessCalculatedFieldAndWait) | **GET** /api/calculatedField/{calculatedFieldId}/reprocessAndWait | Reprocess Calculated Field and wait for completion (reprocessCalculatedFieldAndWait) | | [**saveCalculatedField**](#saveCalculatedField) | **POST** /api/calculatedField | Create Or Update Calculated Field (saveCalculatedField) | -| [**testScript1**](#testScript1) | **POST** /api/calculatedField/testScript | Test Script expression | +| [**testCalculatedFieldScript**](#testCalculatedFieldScript) | **POST** /api/calculatedField/testScript | Test Script expression | | [**validateCalculatedFieldReprocessing**](#validateCalculatedFieldReprocessing) | **GET** /api/calculatedField/{calculatedFieldId}/reprocess/validate | Validate reprocessing capability of a calculated field (validateCalculatedFieldReprocessing) | @@ -109,11 +109,11 @@ Fetch tenant calculated fields based on the filter. **PageDataCalculatedFieldInfo** -## getCalculatedFieldsByEntityIdV2 +## getCalculatedFieldsByEntityId -> PageDataCalculatedField getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) +> PageDataCalculatedField getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) -Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) +Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) Fetch the Calculated Fields based on the provided Entity Id. @@ -238,9 +238,9 @@ Creates or Updates the Calculated Field. When creating calculated field, platfor **CalculatedField** -## testScript1 +## testCalculatedFieldScript -> com.fasterxml.jackson.databind.JsonNode testScript1(body) +> com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(body) Test Script expression diff --git a/pe/docs/ConverterControllerApi.md b/pe/docs/ConverterControllerApi.md index db8e82c4..5a941f28 100644 --- a/pe/docs/ConverterControllerApi.md +++ b/pe/docs/ConverterControllerApi.md @@ -5,7 +5,7 @@ | [**deleteConverter**](#deleteConverter) | **DELETE** /api/converter/{converterId} | Delete converter (deleteConverter) | | [**getConverterById**](#getConverterById) | **GET** /api/converter/{converterId} | Get Converter (getConverterById) | | [**getConverters**](#getConverters) | **GET** /api/converters | Get Converters (getConverters) | -| [**getConvertersByIdsV2**](#getConvertersByIdsV2) | **GET** /api/converters/list | Get Converters By Ids (getConvertersByIdsV2) | +| [**getConvertersByIds**](#getConvertersByIds) | **GET** /api/converters/list | Get Converters By Ids (getConvertersByIds) | | [**getLatestConverterDebugInput**](#getLatestConverterDebugInput) | **GET** /api/converter/{converterId}/debugIn | Get latest debug input event (getLatestConverterDebugInput) | | [**saveConverter**](#saveConverter) | **POST** /api/converter | Create Or Update Converter (saveConverter) | | [**testDownLinkConverter**](#testDownLinkConverter) | **POST** /api/converter/testDownLink | Test converter function (testDownLinkConverter) | @@ -80,11 +80,11 @@ Returns a page of converters owned by tenant. You can specify parameters to filt **PageDataConverter** -## getConvertersByIdsV2 +## getConvertersByIds -> List getConvertersByIdsV2(converterIds) +> List getConvertersByIds(converterIds) -Get Converters By Ids (getConvertersByIdsV2) +Get Converters By Ids (getConvertersByIds) Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/ConverterExportData.md b/pe/docs/ConverterExportData.md new file mode 100644 index 00000000..85c6ad6c --- /dev/null +++ b/pe/docs/ConverterExportData.md @@ -0,0 +1,23 @@ + +# ConverterExportData + +`org.thingsboard.client.model.ConverterExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/CustomerControllerApi.md b/pe/docs/CustomerControllerApi.md index ab75077d..5cd80e62 100644 --- a/pe/docs/CustomerControllerApi.md +++ b/pe/docs/CustomerControllerApi.md @@ -10,7 +10,7 @@ | [**getCustomerTitleById**](#getCustomerTitleById) | **GET** /api/customer/{customerId}/title | Get Customer Title (getCustomerTitleById) | | [**getCustomers**](#getCustomers) | **GET** /api/customers | Get Tenant Customers (getCustomers) | | [**getCustomersByEntityGroupId**](#getCustomersByEntityGroupId) | **GET** /api/entityGroup/{entityGroupId}/customers | Get customers by Entity Group Id (getCustomersByEntityGroupId) | -| [**getCustomersByIdsV2**](#getCustomersByIdsV2) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIdsV2) | +| [**getCustomersByIds**](#getCustomersByIds) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIds) | | [**getShortCustomerInfoById**](#getShortCustomerInfoById) | **GET** /api/customer/{customerId}/shortInfo | Get short Customer info (getShortCustomerInfoById) | | [**getTenantCustomer**](#getTenantCustomer) | **GET** /api/tenant/customers | Get Tenant Customer by Customer title (getTenantCustomer) | | [**getUserCustomers**](#getUserCustomers) | **GET** /api/user/customers | Get Customers (getUserCustomers) | @@ -198,11 +198,11 @@ Returns a page of Customer objects that belongs to specified Entity Group Id. Yo **PageDataCustomer** -## getCustomersByIdsV2 +## getCustomersByIds -> List getCustomersByIdsV2(customerIds) +> List getCustomersByIds(customerIds) -Get customers by Customer Ids (getCustomersByIdsV2) +Get customers by Customer Ids (getCustomersByIds) Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/pe/docs/CustomerExportData.md b/pe/docs/CustomerExportData.md new file mode 100644 index 00000000..c5c441b9 --- /dev/null +++ b/pe/docs/CustomerExportData.md @@ -0,0 +1,23 @@ + +# CustomerExportData + +`org.thingsboard.client.model.CustomerExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/DashboardControllerApi.md b/pe/docs/DashboardControllerApi.md index 4ade9180..20bae1c8 100644 --- a/pe/docs/DashboardControllerApi.md +++ b/pe/docs/DashboardControllerApi.md @@ -15,8 +15,8 @@ | [**getHomeDashboardInfo**](#getHomeDashboardInfo) | **GET** /api/dashboard/home/info | Get Home Dashboard Info (getHomeDashboardInfo) | | [**getMaxDatapointsLimit**](#getMaxDatapointsLimit) | **GET** /api/dashboard/maxDatapointsLimit | Get max data points limit (getMaxDatapointsLimit) | | [**getServerTime**](#getServerTime) | **GET** /api/dashboard/serverTime | Get server time (getServerTime) | -| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboards) | -| [**getTenantDashboards1**](#getTenantDashboards1) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboardsByTenantId**](#getTenantDashboardsByTenantId) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) | | [**getTenantHomeDashboardInfo**](#getTenantHomeDashboardInfo) | **GET** /api/tenant/dashboard/home/info | Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo) | | [**getUserDashboards**](#getUserDashboards) | **GET** /api/user/dashboards | Get Dashboards (getUserDashboards) | | [**importGroupDashboards**](#importGroupDashboards) | **POST** /api/entityGroup/{entityGroupId}/dashboards/import | Import Dashboards (importGroupDashboards) | @@ -280,20 +280,20 @@ Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust vie ## getTenantDashboards -> PageDataDashboardInfo getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards by System Administrator (getTenantDashboards) +Get Tenant Dashboards (getTenantDashboards) -Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. +Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | +| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -303,22 +303,22 @@ Returns a page of dashboard info objects owned by tenant. The Dashboard Info obj **PageDataDashboardInfo** -## getTenantDashboards1 +## getTenantDashboardsByTenantId -> PageDataDashboardInfo getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards (getTenantDashboards) +Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) -Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/pe/docs/DashboardExportData.md b/pe/docs/DashboardExportData.md new file mode 100644 index 00000000..2356ec28 --- /dev/null +++ b/pe/docs/DashboardExportData.md @@ -0,0 +1,23 @@ + +# DashboardExportData + +`org.thingsboard.client.model.DashboardExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/DeviceActivityRecipientsConfig.md b/pe/docs/DeviceActivityRecipientsConfig.md new file mode 100644 index 00000000..1b3164d4 --- /dev/null +++ b/pe/docs/DeviceActivityRecipientsConfig.md @@ -0,0 +1,24 @@ + +# DeviceActivityRecipientsConfig + +`org.thingsboard.client.model.DeviceActivityRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/DeviceApiControllerApi.md b/pe/docs/DeviceApiControllerApi.md index 43fe8257..278e2342 100644 --- a/pe/docs/DeviceApiControllerApi.md +++ b/pe/docs/DeviceApiControllerApi.md @@ -2,7 +2,6 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**claimDevice**](#claimDevice) | **POST** /api/v1/{deviceToken}/claim | Save claiming information (claimDevice) | | [**getDeviceAttributes**](#getDeviceAttributes) | **GET** /api/v1/{deviceToken}/attributes | Get attributes (getDeviceAttributes) | | [**getFirmware**](#getFirmware) | **GET** /api/v1/{deviceToken}/firmware | Get Device Firmware (getFirmware) | | [**getSoftware**](#getSoftware) | **GET** /api/v1/{deviceToken}/software | Get Device Software (getSoftware) | @@ -11,32 +10,12 @@ | [**postTelemetry**](#postTelemetry) | **POST** /api/v1/{deviceToken}/telemetry | Post time series data (postTelemetry) | | [**provisionDevice**](#provisionDevice) | **POST** /api/v1/provision | Provision new device (provisionDevice) | | [**replyToCommand**](#replyToCommand) | **POST** /api/v1/{deviceToken}/rpc/{requestId} | Reply to RPC commands (replyToCommand) | +| [**saveClaimingInfo**](#saveClaimingInfo) | **POST** /api/v1/{deviceToken}/claim | Save claiming information (saveClaimingInfo) | | [**subscribeToAttributes**](#subscribeToAttributes) | **GET** /api/v1/{deviceToken}/attributes/updates | Subscribe to attribute updates (subscribeToAttributes) (Deprecated) | | [**subscribeToCommands**](#subscribeToCommands) | **GET** /api/v1/{deviceToken}/rpc | Subscribe to RPC commands (subscribeToCommands) (Deprecated) | -## claimDevice - -> String claimDevice(deviceToken, body) - -Save claiming information (claimDevice) - -Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **deviceToken** | **String** | Your device access token. | | -| **body** | **String** | | [optional] | - -### Return type - -**String** - - ## getDeviceAttributes > String getDeviceAttributes(deviceToken, clientKeys, sharedKeys) @@ -212,6 +191,27 @@ Replies to server originated RPC command identified by 'requestId' parameter. Th **String** +## saveClaimingInfo + +> String saveClaimingInfo(deviceToken, body) + +Save claiming information (saveClaimingInfo) + +Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceToken** | **String** | Your device access token. | | +| **body** | **String** | | [optional] | + +### Return type + +**String** + + ## subscribeToAttributes > String subscribeToAttributes(deviceToken, timeout) diff --git a/pe/docs/DeviceControllerApi.md b/pe/docs/DeviceControllerApi.md index fc80f2a6..94697b28 100644 --- a/pe/docs/DeviceControllerApi.md +++ b/pe/docs/DeviceControllerApi.md @@ -3,11 +3,11 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**assignDeviceToTenant**](#assignDeviceToTenant) | **POST** /api/tenant/{tenantId}/device/{deviceId} | Assign device to tenant (assignDeviceToTenant) | -| [**claimDevice1**](#claimDevice1) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | +| [**claimDevice**](#claimDevice) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | | [**countByDeviceGroupAndEmptyOtaPackage**](#countByDeviceGroupAndEmptyOtaPackage) | **GET** /api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId} | Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) | | [**countByDeviceProfileAndEmptyOtaPackage**](#countByDeviceProfileAndEmptyOtaPackage) | **GET** /api/devices/count/{otaPackageType}/{deviceProfileId} | Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) | | [**deleteDevice**](#deleteDevice) | **DELETE** /api/device/{deviceId} | Delete device (deleteDevice) | -| [**findByQuery3**](#findByQuery3) | **POST** /api/devices | Find related devices (findByQuery) | +| [**findDevicesByQuery**](#findDevicesByQuery) | **POST** /api/devices | Find related devices (findDevicesByQuery) | | [**getAllDeviceInfos**](#getAllDeviceInfos) | **GET** /api/deviceInfos/all | Get All Device Infos for current user (getAllDeviceInfos) | | [**getCustomerDeviceInfos**](#getCustomerDeviceInfos) | **GET** /api/customer/{customerId}/deviceInfos | Get Customer Device Infos (getCustomerDeviceInfos) | | [**getCustomerDevices**](#getCustomerDevices) | **GET** /api/customer/{customerId}/devices | Get Customer Devices (getCustomerDevices) | @@ -23,7 +23,7 @@ | [**processDevicesBulkImport**](#processDevicesBulkImport) | **POST** /api/device/bulk_import | Import the bulk of devices (processDevicesBulkImport) | | [**reClaimDevice**](#reClaimDevice) | **DELETE** /api/customer/device/{deviceName}/claim | Reclaim device (reClaimDevice) | | [**saveDevice**](#saveDevice) | **POST** /api/device | Create Or Update Device (saveDevice) | -| [**saveDeviceWithCredentials1**](#saveDeviceWithCredentials1) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | +| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | | [**updateDeviceCredentials**](#updateDeviceCredentials) | **POST** /api/device/credentials | Update device credentials (updateDeviceCredentials) | @@ -49,9 +49,9 @@ Creates assignment of the device to tenant. Thereafter tenant will be able to re **Device** -## claimDevice1 +## claimDevice -> String claimDevice1(deviceName, subCustomerId, claimRequest) +> String claimDevice(deviceName, subCustomerId, claimRequest) Claim device (claimDevice) @@ -134,11 +134,11 @@ Deletes the device, it's credentials and all the relations (from and to the devi null (empty response body) -## findByQuery3 +## findDevicesByQuery -> List findByQuery3(deviceSearchQuery) +> List findDevicesByQuery(deviceSearchQuery) -Find related devices (findByQuery) +Find related devices (findDevicesByQuery) Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -489,9 +489,9 @@ Create or update the Device. When creating device, platform generates Device Id **Device** -## saveDeviceWithCredentials1 +## saveDeviceWithCredentials -> Device saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) +> Device saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) Create Device (saveDevice) with credentials diff --git a/pe/docs/DeviceProfileControllerApi.md b/pe/docs/DeviceProfileControllerApi.md index 521aecd0..e2beae69 100644 --- a/pe/docs/DeviceProfileControllerApi.md +++ b/pe/docs/DeviceProfileControllerApi.md @@ -8,10 +8,10 @@ | [**getDeviceProfileById**](#getDeviceProfileById) | **GET** /api/deviceProfile/{deviceProfileId} | Get Device Profile (getDeviceProfileById) | | [**getDeviceProfileInfoById**](#getDeviceProfileInfoById) | **GET** /api/deviceProfileInfo/{deviceProfileId} | Get Device Profile Info (getDeviceProfileInfoById) | | [**getDeviceProfileInfos**](#getDeviceProfileInfos) | **GET** /api/deviceProfileInfos | Get Device Profiles for transport type (getDeviceProfileInfos) | -| [**getDeviceProfileInfosByIdsV2**](#getDeviceProfileInfosByIdsV2) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) | +| [**getDeviceProfileInfosByIds**](#getDeviceProfileInfosByIds) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) | | [**getDeviceProfileNames**](#getDeviceProfileNames) | **GET** /api/deviceProfile/names | Get Device Profile names (getDeviceProfileNames) | +| [**getDeviceProfileTimeseriesKeys**](#getDeviceProfileTimeseriesKeys) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getDeviceProfileTimeseriesKeys) | | [**getDeviceProfiles**](#getDeviceProfiles) | **GET** /api/deviceProfiles | Get Device Profiles (getDeviceProfiles) | -| [**getTimeseriesKeys1**](#getTimeseriesKeys1) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getTimeseriesKeys) | | [**saveDeviceProfile**](#saveDeviceProfile) | **POST** /api/deviceProfile | Create Or Update Device Profile (saveDeviceProfile) | | [**setDefaultDeviceProfile**](#setDefaultDeviceProfile) | **POST** /api/deviceProfile/{deviceProfileId}/default | Make Device Profile Default (setDefaultDeviceProfile) | @@ -136,11 +136,11 @@ Returns a page of devices profile info objects owned by tenant. You can specify **PageDataDeviceProfileInfo** -## getDeviceProfileInfosByIdsV2 +## getDeviceProfileInfosByIds -> List getDeviceProfileInfosByIdsV2(deviceProfileIds) +> List getDeviceProfileInfosByIds(deviceProfileIds) -Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) +Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -176,48 +176,48 @@ Returns a set of unique device profile names owned by the tenant. Available for **List** -## getDeviceProfiles +## getDeviceProfileTimeseriesKeys -> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) +> List getDeviceProfileTimeseriesKeys(deviceProfileId) -Get Device Profiles (getDeviceProfiles) +Get time series keys (getDeviceProfileTimeseriesKeys) -Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | +| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | ### Return type -**PageDataDeviceProfile** +**List** -## getTimeseriesKeys1 +## getDeviceProfiles -> List getTimeseriesKeys1(deviceProfileId) +> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) -Get time series keys (getTimeseriesKeys) +Get Device Profiles (getDeviceProfiles) -Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. +Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | ### Return type -**List** +**PageDataDeviceProfile** ## saveDeviceProfile diff --git a/pe/docs/DeviceProfileExportData.md b/pe/docs/DeviceProfileExportData.md new file mode 100644 index 00000000..505aa2ee --- /dev/null +++ b/pe/docs/DeviceProfileExportData.md @@ -0,0 +1,23 @@ + +# DeviceProfileExportData + +`org.thingsboard.client.model.DeviceProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/DomainControllerApi.md b/pe/docs/DomainControllerApi.md index 77384bb1..7fb81b0b 100644 --- a/pe/docs/DomainControllerApi.md +++ b/pe/docs/DomainControllerApi.md @@ -6,7 +6,7 @@ | [**getDomainInfoById**](#getDomainInfoById) | **GET** /api/domain/info/{id} | Get Domain info by Id (getDomainInfoById) | | [**getDomainInfos**](#getDomainInfos) | **GET** /api/domain/infos | Get Domain infos (getDomainInfos) | | [**saveDomain**](#saveDomain) | **POST** /api/domain | Save or Update Domain (saveDomain) | -| [**updateOauth2Clients1**](#updateOauth2Clients1) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateOauth2Clients**](#updateOauth2Clients) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | @@ -95,9 +95,9 @@ Create or update the Domain. When creating domain, platform generates Domain Id **Domain** -## updateOauth2Clients1 +## updateOauth2Clients -> updateOauth2Clients1(id, UUID) +> updateOauth2Clients(id, UUID) Update oauth2 clients (updateOauth2Clients) diff --git a/pe/docs/EdgeCommunicationFailureRecipientsConfig.md b/pe/docs/EdgeCommunicationFailureRecipientsConfig.md new file mode 100644 index 00000000..6ae93da1 --- /dev/null +++ b/pe/docs/EdgeCommunicationFailureRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EdgeCommunicationFailureRecipientsConfig + +`org.thingsboard.client.model.EdgeCommunicationFailureRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/EdgeConnectionRecipientsConfig.md b/pe/docs/EdgeConnectionRecipientsConfig.md new file mode 100644 index 00000000..0c69a5e5 --- /dev/null +++ b/pe/docs/EdgeConnectionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EdgeConnectionRecipientsConfig + +`org.thingsboard.client.model.EdgeConnectionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/EdgeControllerApi.md b/pe/docs/EdgeControllerApi.md index 50a2c180..9e773083 100644 --- a/pe/docs/EdgeControllerApi.md +++ b/pe/docs/EdgeControllerApi.md @@ -5,7 +5,7 @@ | [**activateInstance**](#activateInstance) | **POST** /api/license/activateInstance | Activate edge instance (activateInstance) | | [**checkInstance**](#checkInstance) | **POST** /api/license/checkInstance | Check edge license (checkInstance) | | [**deleteEdge**](#deleteEdge) | **DELETE** /api/edge/{edgeId} | Delete edge (deleteEdge) | -| [**findByQuery2**](#findByQuery2) | **POST** /api/edges | Find related edges (findByQuery) | +| [**findEdgesByQuery**](#findEdgesByQuery) | **POST** /api/edges | Find related edges (findEdgesByQuery) | | [**findMissingToRelatedRuleChains**](#findMissingToRelatedRuleChains) | **GET** /api/edge/missingToRelatedRuleChains/{edgeId} | Find missing rule chains (findMissingToRelatedRuleChains) | | [**getAllEdgeInfos**](#getAllEdgeInfos) | **GET** /api/edgeInfos/all | Get All Edge Infos for current user (getAllEdgeInfos) | | [**getCustomerEdgeInfos**](#getCustomerEdgeInfos) | **GET** /api/customer/{customerId}/edgeInfos | Get Customer Edge Infos (getCustomerEdgeInfos) | @@ -91,11 +91,11 @@ Deletes the edge. Referencing non-existing edge Id will cause an error. Availab null (empty response body) -## findByQuery2 +## findEdgesByQuery -> List findByQuery2(edgeSearchQuery) +> List findEdgesByQuery(edgeSearchQuery) -Find related edges (findByQuery) +Find related edges (findEdgesByQuery) Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/pe/docs/EntitiesLimitRecipientsConfig.md b/pe/docs/EntitiesLimitRecipientsConfig.md new file mode 100644 index 00000000..521fb923 --- /dev/null +++ b/pe/docs/EntitiesLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntitiesLimitRecipientsConfig + +`org.thingsboard.client.model.EntitiesLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/EntityActionRecipientsConfig.md b/pe/docs/EntityActionRecipientsConfig.md new file mode 100644 index 00000000..d1f26540 --- /dev/null +++ b/pe/docs/EntityActionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntityActionRecipientsConfig + +`org.thingsboard.client.model.EntityActionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/EntityGroupControllerApi.md b/pe/docs/EntityGroupControllerApi.md index 0dba921e..2bc16546 100644 --- a/pe/docs/EntityGroupControllerApi.md +++ b/pe/docs/EntityGroupControllerApi.md @@ -6,7 +6,7 @@ | [**assignEntityGroupToEdge**](#assignEntityGroupToEdge) | **POST** /api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType} | Assign entity group to edge (assignEntityGroupToEdge) | | [**deleteEntityGroup**](#deleteEntityGroup) | **DELETE** /api/entityGroup/{entityGroupId} | Delete Entity Group (deleteEntityGroup) | | [**getAllEdgeEntityGroups**](#getAllEdgeEntityGroups) | **GET** /api/allEntityGroups/edge/{edgeId}/{groupType} | Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups) | -| [**getAllEntityGroupsByOwnerAndType**](#getAllEntityGroupsByOwnerAndType) | **GET** /api/entityGroups/{ownerType}/{ownerId}/{groupType}/all | Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) | +| [**getAllEntityGroupsByOwnerAndType**](#getAllEntityGroupsByOwnerAndType) | **GET** /api/entityGroups/{ownerType}/{ownerId}/{groupType}/all | Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) | | [**getAllEntityGroupsByType**](#getAllEntityGroupsByType) | **GET** /api/entityGroups/{groupType}/all | Get Entity Groups by entity type (getAllEntityGroupsByType) | | [**getAllSharedEntityGroups**](#getAllSharedEntityGroups) | **GET** /api/entityGroups/{groupType}/shared/all | Get Shared Entity Groups by entity type (getAllSharedEntityGroups) | | [**getEdgeEntityGroups**](#getEdgeEntityGroups) | **GET** /api/entityGroups/edge/{edgeId}/{groupType} | Get Edge Entity Groups by entity type (getEdgeEntityGroups) | @@ -19,7 +19,7 @@ | [**getEntityGroupEntityInfosByOwnerAndTypeAndPageLink**](#getEntityGroupEntityInfosByOwnerAndTypeAndPageLink) | **GET** /api/entityGroupInfos/{ownerType}/{ownerId}/{groupType} | Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink) | | [**getEntityGroupEntityInfosByTypeAndPageLink**](#getEntityGroupEntityInfosByTypeAndPageLink) | **GET** /api/entityGroupInfos/{groupType} | Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink) | | [**getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink**](#getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink) | **GET** /api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType} | Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink) | -| [**getEntityGroupsByIdsV2**](#getEntityGroupsByIdsV2) | **GET** /api/entityGroups/list | Get Entity Groups by Ids (getEntityGroupsByIdsV2) | +| [**getEntityGroupsByIds**](#getEntityGroupsByIds) | **GET** /api/entityGroups/list | Get Entity Groups by Ids (getEntityGroupsByIds) | | [**getEntityGroupsByOwnerAndTypeAndPageLink**](#getEntityGroupsByOwnerAndTypeAndPageLink) | **GET** /api/entityGroups/{ownerType}/{ownerId}/{groupType} | Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink) | | [**getEntityGroupsByTypeAndPageLink**](#getEntityGroupsByTypeAndPageLink) | **GET** /api/entityGroups/{groupType} | Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink) | | [**getEntityGroupsForEntity**](#getEntityGroupsForEntity) | **GET** /api/entityGroups/{entityType}/{entityId} | Get Entity Groups by Entity Id (getEntityGroupsForEntity) | @@ -128,7 +128,7 @@ Fetch the list of Entity Group Info objects based on the provided Entity Type an > List getAllEntityGroupsByOwnerAndType(ownerType, ownerId, groupType) -Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) +Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. @@ -423,11 +423,11 @@ Returns a page of Entity Group Entity Info objects based on the provided Owner I **PageDataEntityInfo** -## getEntityGroupsByIdsV2 +## getEntityGroupsByIds -> List getEntityGroupsByIdsV2(entityGroupIds) +> List getEntityGroupsByIds(entityGroupIds) -Get Entity Groups by Ids (getEntityGroupsByIdsV2) +Get Entity Groups by Ids (getEntityGroupsByIds) Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. diff --git a/pe/docs/EntityRelationControllerApi.md b/pe/docs/EntityRelationControllerApi.md index 42321be0..7c55d128 100644 --- a/pe/docs/EntityRelationControllerApi.md +++ b/pe/docs/EntityRelationControllerApi.md @@ -2,57 +2,30 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**deleteRelation**](#deleteRelation) | **DELETE** /api/relation | Delete Relation (deleteRelation) | -| [**deleteRelationV2**](#deleteRelationV2) | **DELETE** /api/v2/relation | Delete Relation (deleteRelationV2) | -| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteCommonRelations) | -| [**findByFromAndRelationType**](#findByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findByFromAndRelationType) | -| [**findByFromV2**](#findByFromV2) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findByFromV2) | -| [**findByQuery**](#findByQuery) | **POST** /api/relations | Find related entities (findByQuery) | -| [**findByToAndRelationType**](#findByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findByToAndRelationType) | -| [**findByToV2**](#findByToV2) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findByToV2) | -| [**findInfoByFromV2**](#findInfoByFromV2) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findInfoByFromV2) | -| [**findInfoByQuery**](#findInfoByQuery) | **POST** /api/relations/info | Find related entity infos (findInfoByQuery) | -| [**findInfoByToV2**](#findInfoByToV2) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findInfoByToV2) | +| [**deleteRelation**](#deleteRelation) | **DELETE** /api/v2/relation | Delete Relation (deleteRelation) | +| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteRelations) | +| [**findEntityRelationInfosByFrom**](#findEntityRelationInfosByFrom) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findEntityRelationInfosByFrom) | +| [**findEntityRelationInfosByQuery**](#findEntityRelationInfosByQuery) | **POST** /api/relations/info | Find related entity infos (findEntityRelationInfosByQuery) | +| [**findEntityRelationInfosByTo**](#findEntityRelationInfosByTo) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findEntityRelationInfosByTo) | +| [**findEntityRelationsByFrom**](#findEntityRelationsByFrom) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findEntityRelationsByFrom) | +| [**findEntityRelationsByFromAndRelationType**](#findEntityRelationsByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findEntityRelationsByFromAndRelationType) | +| [**findEntityRelationsByQuery**](#findEntityRelationsByQuery) | **POST** /api/relations | Find related entities (findEntityRelationsByQuery) | +| [**findEntityRelationsByTo**](#findEntityRelationsByTo) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findEntityRelationsByTo) | +| [**findEntityRelationsByToAndRelationType**](#findEntityRelationsByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findEntityRelationsByToAndRelationType) | | [**getRelation**](#getRelation) | **GET** /api/relation | Get Relation (getRelation) | -| [**saveRelation**](#saveRelation) | **POST** /api/relation | Create Relation (saveRelation) | -| [**saveRelationV2**](#saveRelationV2) | **POST** /api/v2/relation | Create Relation (saveRelationV2) | +| [**saveRelation**](#saveRelation) | **POST** /api/v2/relation | Create Relation (saveRelation) | ## deleteRelation -> deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) +> EntityRelation deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) Delete Relation (deleteRelation) Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | - -### Return type - -null (empty response body) - - -## deleteRelationV2 - -> EntityRelation deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup) - -Delete Relation (deleteRelationV2) - -Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | @@ -73,7 +46,7 @@ Deletes a relation between two entities in the platform. If the user has the a > deleteRelations(entityId, entityType) -Delete common relations (deleteCommonRelations) +Delete common relations (deleteRelations) Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. @@ -90,13 +63,13 @@ Deletes all the relations ('from' and 'to' direction) for the specified entity a null (empty response body) -## findByFromAndRelationType +## findEntityRelationInfosByFrom -> List findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) +> List findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByFromAndRelationType) +Get List of Relation Infos (findEntityRelationInfosByFrom) -Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters @@ -105,72 +78,70 @@ Returns list of relation objects for the specified entity by the 'from' directio |------------- | ------------- | ------------- | -------------| | **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByFromV2 +## findEntityRelationInfosByQuery -> List findByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationInfosByQuery(entityRelationsQuery) -Get List of Relations (findByFromV2) +Find related entity infos (findEntityRelationInfosByQuery) -Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findByQuery +## findEntityRelationInfosByTo -> List findByQuery(entityRelationsQuery) +> List findEntityRelationInfosByTo(toType, toId, relationTypeGroup) -Find related entities (findByQuery) +Get List of Relation Infos (findEntityRelationInfosByTo) -Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. +Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByToAndRelationType +## findEntityRelationsByFrom -> List findByToAndRelationType(toType, toId, relationType, relationTypeGroup) +> List findEntityRelationsByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByToAndRelationType) +Get List of Relations (findEntityRelationsByFrom) -Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -178,21 +149,22 @@ Returns list of relation objects for the specified entity by the 'to' direction **List** -## findByToV2 +## findEntityRelationsByFromAndRelationType -> List findByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) -Get List of Relations (findByToV2) +Get List of Relations (findEntityRelationsByFromAndRelationType) -Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -200,55 +172,55 @@ Returns list of relation objects for the specified entity by the 'to' direction. **List** -## findInfoByFromV2 +## findEntityRelationsByQuery -> List findInfoByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationsByQuery(entityRelationsQuery) -Get List of Relation Infos (findInfoByFromV2) +Find related entities (findEntityRelationsByQuery) -Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findInfoByQuery +## findEntityRelationsByTo -> List findInfoByQuery(entityRelationsQuery) +> List findEntityRelationsByTo(toType, toId, relationTypeGroup) -Find related entity infos (findInfoByQuery) +Get List of Relations (findEntityRelationsByTo) -Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findInfoByToV2 +## findEntityRelationsByToAndRelationType -> List findInfoByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup) -Get List of Relation Infos (findInfoByToV2) +Get List of Relations (findEntityRelationsByToAndRelationType) -Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters @@ -257,11 +229,12 @@ Returns list of relation info objects for the specified entity by the 'to' direc |------------- | ------------- | ------------- | -------------| | **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** ## getRelation @@ -291,33 +264,13 @@ Returns relation object between two specified entities if present. Otherwise thr ## saveRelation -> saveRelation(entityRelation) +> EntityRelation saveRelation(entityRelation) Create Relation (saveRelation) Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityRelation** | **EntityRelation** | | | - -### Return type - -null (empty response body) - - -## saveRelationV2 - -> EntityRelation saveRelationV2(entityRelation) - -Create Relation (saveRelationV2) - -Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | diff --git a/pe/docs/EntityViewControllerApi.md b/pe/docs/EntityViewControllerApi.md index 99e4c2ab..8ec35b29 100644 --- a/pe/docs/EntityViewControllerApi.md +++ b/pe/docs/EntityViewControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteEntityView**](#deleteEntityView) | **DELETE** /api/entityView/{entityViewId} | Delete entity view (deleteEntityView) | -| [**findByQuery1**](#findByQuery1) | **POST** /api/entityViews | Find related entity views (findByQuery) | +| [**findEntityViewsByQuery**](#findEntityViewsByQuery) | **POST** /api/entityViews | Find related entity views (findEntityViewsByQuery) | | [**getAllEntityViewInfos**](#getAllEntityViewInfos) | **GET** /api/entityViewInfos/all | Get All Entity View Infos for current user (getAllEntityViewInfos) | | [**getCustomerEntityViewInfos**](#getCustomerEntityViewInfos) | **GET** /api/customer/{customerId}/entityViewInfos | Get Customer Entity View Infos (getCustomerEntityViewInfos) | | [**getCustomerEntityViews**](#getCustomerEntityViews) | **GET** /api/customer/{customerId}/entityViews | Get Customer Entity Views (getCustomerEntityViews) | @@ -11,7 +11,7 @@ | [**getEntityViewInfoById**](#getEntityViewInfoById) | **GET** /api/entityView/info/{entityViewId} | Get entity view info (getEntityViewInfoById) | | [**getEntityViewTypes**](#getEntityViewTypes) | **GET** /api/entityView/types | Get Entity View Types (getEntityViewTypes) | | [**getEntityViewsByEntityGroupId**](#getEntityViewsByEntityGroupId) | **GET** /api/entityGroup/{entityGroupId}/entityViews | Get entity views by Entity Group Id (getEntityViewsByEntityGroupId) | -| [**getEntityViewsByIdsV2**](#getEntityViewsByIdsV2) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIds) | +| [**getEntityViewsByIds**](#getEntityViewsByIds) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIds) | | [**getTenantEntityViewByName**](#getTenantEntityViewByName) | **GET** /api/tenant/entityView | Get Entity View by name (getTenantEntityViewByName) | | [**getTenantEntityViews**](#getTenantEntityViews) | **GET** /api/tenant/entityViews | Get Tenant Entity Views (getTenantEntityViews) | | [**getUserEntityViews**](#getUserEntityViews) | **GET** /api/user/entityViews | Get Entity Views (getUserEntityViews) | @@ -39,11 +39,11 @@ Delete the EntityView object based on the provided entity view id. Available f null (empty response body) -## findByQuery1 +## findEntityViewsByQuery -> List findByQuery1(entityViewSearchQuery) +> List findEntityViewsByQuery(entityViewSearchQuery) -Find related entity views (findByQuery) +Find related entity views (findEntityViewsByQuery) Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -216,9 +216,9 @@ Returns a page of Entity View objects that belongs to specified Entity View Id. **PageDataEntityView** -## getEntityViewsByIdsV2 +## getEntityViewsByIds -> List getEntityViewsByIdsV2(entityViewIds) +> List getEntityViewsByIds(entityViewIds) Get Entity Views By Ids (getEntityViewsByIds) diff --git a/pe/docs/EntityViewExportData.md b/pe/docs/EntityViewExportData.md new file mode 100644 index 00000000..bc849104 --- /dev/null +++ b/pe/docs/EntityViewExportData.md @@ -0,0 +1,23 @@ + +# EntityViewExportData + +`org.thingsboard.client.model.EntityViewExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/EventControllerApi.md b/pe/docs/EventControllerApi.md index 7e496e49..396c47ef 100644 --- a/pe/docs/EventControllerApi.md +++ b/pe/docs/EventControllerApi.md @@ -3,9 +3,8 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**clearEvents**](#clearEvents) | **POST** /api/events/{entityType}/{entityId}/clear | Clear Events (clearEvents) | -| [**getEvents**](#getEvents) | **GET** /api/events/{entityType}/{entityId} | Get Events (Deprecated) | -| [**getEvents1**](#getEvents1) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEvents) | -| [**getEvents2**](#getEvents2) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEvents) | +| [**getEventsByFilter**](#getEventsByFilter) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEventsByFilter) | +| [**getEventsByType**](#getEventsByType) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEventsByType) | @@ -33,40 +32,11 @@ Clears events by filter for specified entity. null (empty response body) -## getEvents +## getEventsByFilter -> PageDataEventInfo getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events (Deprecated) - -Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The value is not used in searching. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: ts, id] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | -| **startTime** | **Long** | Timestamp. Events with creation time before it won't be queried. | [optional] | -| **endTime** | **Long** | Timestamp. Events with creation time after it won't be queried. | [optional] | - -### Return type - -**PageDataEventInfo** - - -## getEvents1 - -> PageDataEventInfo getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) - -Get Events by event filter (getEvents) +Get Events by event filter (getEventsByFilter) Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. @@ -92,11 +62,11 @@ Returns a page of events for the chosen entity by specifying the event filter. Y **PageDataEventInfo** -## getEvents2 +## getEventsByType -> PageDataEventInfo getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events by type (getEvents) +Get Events by type (getEventsByType) Returns a page of events for specified entity by specifying event type. 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 response schema for more details. diff --git a/pe/docs/IntegrationControllerApi.md b/pe/docs/IntegrationControllerApi.md index dd0c5982..cc37c1a7 100644 --- a/pe/docs/IntegrationControllerApi.md +++ b/pe/docs/IntegrationControllerApi.md @@ -13,7 +13,7 @@ | [**getIntegrationByRoutingKey**](#getIntegrationByRoutingKey) | **GET** /api/integration/routingKey/{routingKey} | Get Integration by Routing Key (getIntegrationByRoutingKey) | | [**getIntegrationInfos**](#getIntegrationInfos) | **GET** /api/integrationInfos | Get Integration Infos (getIntegrationInfos) | | [**getIntegrations**](#getIntegrations) | **GET** /api/integrations | Get Integrations (getIntegrations) | -| [**getIntegrationsByIdsV2**](#getIntegrationsByIdsV2) | **GET** /api/integrations/list | Get Integrations By Ids (getIntegrationsByIdsV2) | +| [**getIntegrationsByIds**](#getIntegrationsByIds) | **GET** /api/integrations/list | Get Integrations By Ids (getIntegrationsByIds) | | [**getIntegrationsConvertersInfo**](#getIntegrationsConvertersInfo) | **GET** /api/integrations/converters/info | Get Integrations Converters info (getIntegrationsConvertersInfo) | | [**saveIntegration**](#saveIntegration) | **POST** /api/integration | Create Or Update Integration (saveIntegration) | | [**unassignIntegrationFromEdge**](#unassignIntegrationFromEdge) | **DELETE** /api/edge/{edgeId}/integration/{integrationId} | Unassign integration from edge (unassignIntegrationFromEdge) | @@ -262,11 +262,11 @@ Returns a page of integrations owned by tenant. You can specify parameters to fi **PageDataIntegration** -## getIntegrationsByIdsV2 +## getIntegrationsByIds -> List getIntegrationsByIdsV2(integrationIds) +> List getIntegrationsByIds(integrationIds) -Get Integrations By Ids (getIntegrationsByIdsV2) +Get Integrations By Ids (getIntegrationsByIds) Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/IntegrationExportData.md b/pe/docs/IntegrationExportData.md new file mode 100644 index 00000000..6a36f485 --- /dev/null +++ b/pe/docs/IntegrationExportData.md @@ -0,0 +1,23 @@ + +# IntegrationExportData + +`org.thingsboard.client.model.IntegrationExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/IntegrationLifecycleEventRecipientsConfig.md b/pe/docs/IntegrationLifecycleEventRecipientsConfig.md new file mode 100644 index 00000000..a888a281 --- /dev/null +++ b/pe/docs/IntegrationLifecycleEventRecipientsConfig.md @@ -0,0 +1,24 @@ + +# IntegrationLifecycleEventRecipientsConfig + +`org.thingsboard.client.model.IntegrationLifecycleEventRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/Lwm2mControllerApi.md b/pe/docs/Lwm2mControllerApi.md index 781e4e15..a39bdfda 100644 --- a/pe/docs/Lwm2mControllerApi.md +++ b/pe/docs/Lwm2mControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getLwm2mBootstrapSecurityInfo**](#getLwm2mBootstrapSecurityInfo) | **GET** /api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer} | Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo) | -| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save device with credentials (Deprecated) | +| [**saveLwm2mDeviceWithCredentials**](#saveLwm2mDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) | @@ -27,11 +27,13 @@ Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the **LwM2MServerSecurityConfigDefault** -## saveDeviceWithCredentials +## saveLwm2mDeviceWithCredentials -> Device saveDeviceWithCredentials(requestBody, entityGroupId) +> Device saveLwm2mDeviceWithCredentials(requestBody, entityGroupId) -Save device with credentials (Deprecated) +Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + +Deprecated. ### Parameters diff --git a/pe/docs/MailConfigTemplateControllerApi.md b/pe/docs/MailConfigTemplateControllerApi.md index 16e82199..8aa9fd90 100644 --- a/pe/docs/MailConfigTemplateControllerApi.md +++ b/pe/docs/MailConfigTemplateControllerApi.md @@ -2,13 +2,13 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getClientRegistrationTemplates1**](#getClientRegistrationTemplates1) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getClientRegistrationTemplates**](#getClientRegistrationTemplates) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | -## getClientRegistrationTemplates1 +## getClientRegistrationTemplates -> com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() +> com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates() Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/pe/docs/MobileAppBundleControllerApi.md b/pe/docs/MobileAppBundleControllerApi.md index abcd08eb..40de3c73 100644 --- a/pe/docs/MobileAppBundleControllerApi.md +++ b/pe/docs/MobileAppBundleControllerApi.md @@ -6,7 +6,7 @@ | [**getMobileAppBundleInfoById**](#getMobileAppBundleInfoById) | **GET** /api/mobile/bundle/info/{id} | Get mobile app bundle info by id (getMobileAppBundleInfoById) | | [**getTenantMobileAppBundleInfos**](#getTenantMobileAppBundleInfos) | **GET** /api/mobile/bundle/infos | Get mobile app bundle infos (getTenantMobileAppBundleInfos) | | [**saveMobileAppBundle**](#saveMobileAppBundle) | **POST** /api/mobile/bundle | Save Or update Mobile app bundle (saveMobileAppBundle) | -| [**updateOauth2Clients**](#updateOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateMobileAppBundleOauth2Clients**](#updateMobileAppBundleOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateMobileAppBundleOauth2Clients) | @@ -95,11 +95,11 @@ Create or update the Mobile app bundle that represents tha pair of ANDROID and I **MobileAppBundle** -## updateOauth2Clients +## updateMobileAppBundleOauth2Clients -> updateOauth2Clients(id, UUID) +> updateMobileAppBundleOauth2Clients(id, UUID) -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateMobileAppBundleOauth2Clients) Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/pe/docs/MobileAppControllerApi.md b/pe/docs/MobileAppControllerApi.md index 08f713ba..4aad90c2 100644 --- a/pe/docs/MobileAppControllerApi.md +++ b/pe/docs/MobileAppControllerApi.md @@ -4,8 +4,8 @@ |------------- | ------------- | -------------| | [**deleteMobileApp**](#deleteMobileApp) | **DELETE** /api/mobile/app/{id} | Delete Mobile App by ID (deleteMobileApp) | | [**getLoginMobileInfo**](#getLoginMobileInfo) | **GET** /api/noauth/mobile | Get mobile app login info (getLoginMobileInfo) | -| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppInfoById) | -| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileAppInfos) | +| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppById) | +| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileApps) | | [**getUserMobileInfo**](#getUserMobileInfo) | **GET** /api/mobile | Get user mobile app basic info (getUserMobileInfo) | | [**saveMobileApp**](#saveMobileApp) | **POST** /api/mobile/app | Save Or update Mobile app (saveMobileApp) | @@ -54,7 +54,7 @@ Get mobile app login info (getLoginMobileInfo) > MobileApp getMobileAppById(id) -Get mobile info by id (getMobileAppInfoById) +Get mobile info by id (getMobileAppById) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -74,7 +74,7 @@ Get mobile info by id (getMobileAppInfoById) > PageDataMobileApp getTenantMobileApps(pageSize, page, platformType, textSearch, sortProperty, sortOrder) -Get mobile app infos (getTenantMobileAppInfos) +Get mobile app infos (getTenantMobileApps) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/pe/docs/NewPlatformVersionRecipientsConfig.md b/pe/docs/NewPlatformVersionRecipientsConfig.md new file mode 100644 index 00000000..07ba72bb --- /dev/null +++ b/pe/docs/NewPlatformVersionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# NewPlatformVersionRecipientsConfig + +`org.thingsboard.client.model.NewPlatformVersionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/NotificationRequestStats.md b/pe/docs/NotificationRequestStats.md index 672eb8cd..0a7bb49f 100644 --- a/pe/docs/NotificationRequestStats.md +++ b/pe/docs/NotificationRequestStats.md @@ -9,9 +9,9 @@ Notification request processing statistics | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **sent** | **Map\** | | [optional] | +| **sent** | **Map\** | | [optional] | | **errors** | **Map\\>** | | [optional] | -| **totalErrors** | **Object** | | [optional] | +| **totalErrors** | **Integer** | | [optional] | | **error** | **String** | | [optional] | | **totalSent** | **Integer** | | [optional] | diff --git a/pe/docs/NotificationRuleExportData.md b/pe/docs/NotificationRuleExportData.md new file mode 100644 index 00000000..87087bd9 --- /dev/null +++ b/pe/docs/NotificationRuleExportData.md @@ -0,0 +1,23 @@ + +# NotificationRuleExportData + +`org.thingsboard.client.model.NotificationRuleExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/NotificationTargetControllerApi.md b/pe/docs/NotificationTargetControllerApi.md index 298cfc9e..1fadc492 100644 --- a/pe/docs/NotificationTargetControllerApi.md +++ b/pe/docs/NotificationTargetControllerApi.md @@ -5,8 +5,8 @@ | [**deleteNotificationTargetById**](#deleteNotificationTargetById) | **DELETE** /api/notification/target/{id} | Delete notification target by id (deleteNotificationTargetById) | | [**getNotificationTargetById**](#getNotificationTargetById) | **GET** /api/notification/target/{id} | Get notification target by id (getNotificationTargetById) | | [**getNotificationTargets**](#getNotificationTargets) | **GET** /api/notification/targets | Get notification targets (getNotificationTargets) | -| [**getNotificationTargetsByIdsV2**](#getNotificationTargetsByIdsV2) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIdsV2) | -| [**getNotificationTargetsBySupportedNotificationTypeV2**](#getNotificationTargetsBySupportedNotificationTypeV2) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) | +| [**getNotificationTargetsByIds**](#getNotificationTargetsByIds) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIds) | +| [**getNotificationTargetsBySupportedNotificationType**](#getNotificationTargetsBySupportedNotificationType) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) | | [**getRecipientsForNotificationTargetConfig**](#getRecipientsForNotificationTargetConfig) | **POST** /api/notification/target/recipients | Get recipients for notification target config (getRecipientsForNotificationTargetConfig) | | [**saveNotificationTarget**](#saveNotificationTarget) | **POST** /api/notification/target | Save notification target (saveNotificationTarget) | @@ -76,11 +76,11 @@ Returns the page of notification targets owned by sysadmin or tenant. You can s **PageDataNotificationTarget** -## getNotificationTargetsByIdsV2 +## getNotificationTargetsByIds -> List getNotificationTargetsByIdsV2(ids) +> List getNotificationTargetsByIds(ids) -Get notification targets by ids (getNotificationTargetsByIdsV2) +Get notification targets by ids (getNotificationTargetsByIds) Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -96,11 +96,11 @@ Returns the list of notification targets found by provided ids. Available for u **List** -## getNotificationTargetsBySupportedNotificationTypeV2 +## getNotificationTargetsBySupportedNotificationType -> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) -Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) +Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/pe/docs/NotificationTargetExportData.md b/pe/docs/NotificationTargetExportData.md new file mode 100644 index 00000000..81e2f9d5 --- /dev/null +++ b/pe/docs/NotificationTargetExportData.md @@ -0,0 +1,23 @@ + +# NotificationTargetExportData + +`org.thingsboard.client.model.NotificationTargetExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/NotificationTemplateExportData.md b/pe/docs/NotificationTemplateExportData.md new file mode 100644 index 00000000..8bd15980 --- /dev/null +++ b/pe/docs/NotificationTemplateExportData.md @@ -0,0 +1,23 @@ + +# NotificationTemplateExportData + +`org.thingsboard.client.model.NotificationTemplateExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/OAuth2ConfigTemplateControllerApi.md b/pe/docs/OAuth2ConfigTemplateControllerApi.md index 13ecaa21..ed3c77ad 100644 --- a/pe/docs/OAuth2ConfigTemplateControllerApi.md +++ b/pe/docs/OAuth2ConfigTemplateControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteClientRegistrationTemplate**](#deleteClientRegistrationTemplate) | **DELETE** /api/oauth2/config/template/{clientRegistrationTemplateId} | Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | -| [**getClientRegistrationTemplates**](#getClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getOAuth2ClientRegistrationTemplates**](#getOAuth2ClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | | [**saveClientRegistrationTemplate**](#saveClientRegistrationTemplate) | **POST** /api/oauth2/config/template | Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | @@ -28,11 +28,11 @@ Client registration template is OAuth2 provider configuration template with defa null (empty response body) -## getClientRegistrationTemplates +## getOAuth2ClientRegistrationTemplates -> List getClientRegistrationTemplates() +> List getOAuth2ClientRegistrationTemplates() -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients diff --git a/pe/docs/OAuth2ControllerApi.md b/pe/docs/OAuth2ControllerApi.md index 61e53ae7..815318b0 100644 --- a/pe/docs/OAuth2ControllerApi.md +++ b/pe/docs/OAuth2ControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**deleteOauth2Client**](#deleteOauth2Client) | **DELETE** /api/oauth2/client/{id} | Delete oauth2 client (deleteOauth2Client) | | [**findOAuth2ClientInfos**](#findOAuth2ClientInfos) | **GET** /api/oauth2/client/infos | Get OAuth2 Client infos (findOAuth2ClientInfos) | -| [**findTenantOAuth2ClientInfosByIdsV2**](#findTenantOAuth2ClientInfosByIdsV2) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) | +| [**findTenantOAuth2ClientInfosByIds**](#findTenantOAuth2ClientInfosByIds) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) | | [**getLoginProcessingUrl**](#getLoginProcessingUrl) | **GET** /api/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getLoginProcessingUrl) | | [**getOAuth2ClientById**](#getOAuth2ClientById) | **GET** /api/oauth2/client/{id} | Get OAuth2 Client by id (getOAuth2ClientById) | | [**getOAuth2Clients**](#getOAuth2Clients) | **POST** /api/noauth/oauth2Clients | Get OAuth2 clients (getOAuth2Clients) | @@ -56,11 +56,11 @@ Get OAuth2 Client infos (findOAuth2ClientInfos) **PageDataOAuth2ClientInfo** -## findTenantOAuth2ClientInfosByIdsV2 +## findTenantOAuth2ClientInfosByIds -> List findTenantOAuth2ClientInfosByIdsV2(clientIds) +> List findTenantOAuth2ClientInfosByIds(clientIds) -Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) +Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/pe/docs/OtaPackageControllerApi.md b/pe/docs/OtaPackageControllerApi.md index 3c90329c..0db0720c 100644 --- a/pe/docs/OtaPackageControllerApi.md +++ b/pe/docs/OtaPackageControllerApi.md @@ -8,7 +8,7 @@ | [**getOtaPackageById**](#getOtaPackageById) | **GET** /api/otaPackage/{otaPackageId} | Get OTA Package (getOtaPackageById) | | [**getOtaPackageInfoById**](#getOtaPackageInfoById) | **GET** /api/otaPackage/info/{otaPackageId} | Get OTA Package Info (getOtaPackageInfoById) | | [**getOtaPackages**](#getOtaPackages) | **GET** /api/otaPackages | Get OTA Package Infos (getOtaPackages) | -| [**getOtaPackages1**](#getOtaPackages1) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos (getOtaPackages) | +| [**getOtaPackagesByDeviceProfileIdAndType**](#getOtaPackagesByDeviceProfileIdAndType) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) | | [**saveOtaPackageData**](#saveOtaPackageData) | **POST** /api/otaPackage/{otaPackageId} | Save OTA Package data (saveOtaPackageData) | | [**saveOtaPackageInfo**](#saveOtaPackageInfo) | **POST** /api/otaPackage | Create Or Update OTA Package Info (saveOtaPackageInfo) | @@ -144,11 +144,11 @@ Returns a page of OTA Package Info objects owned by tenant. You can specify para **PageDataOtaPackageInfo** -## getOtaPackages1 +## getOtaPackagesByDeviceProfileIdAndType -> PageDataOtaPackageInfo getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataOtaPackageInfo getOtaPackagesByDeviceProfileIdAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) -Get OTA Package Infos (getOtaPackages) +Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/pe/docs/QrCodeSettingsControllerApi.md b/pe/docs/QrCodeSettingsControllerApi.md index 37824257..60177b22 100644 --- a/pe/docs/QrCodeSettingsControllerApi.md +++ b/pe/docs/QrCodeSettingsControllerApi.md @@ -3,11 +3,11 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getApplicationRedirect**](#getApplicationRedirect) | **GET** /api/noauth/qr | getApplicationRedirect | -| [**getMergedMobileAppSettings**](#getMergedMobileAppSettings) | **GET** /api/mobile/qr/merged | Get QR code configuration for home page (getMobileAppQrCodeConfig) | +| [**getMergedMobileAppSettings**](#getMergedMobileAppSettings) | **GET** /api/mobile/qr/merged | Get QR code configuration for home page (getMergedMobileAppSettings) | | [**getMobileAppDeepLink**](#getMobileAppDeepLink) | **GET** /api/mobile/qr/deepLink | Get the deep link to the associated mobile application (getMobileAppDeepLink) | -| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getMobileAppSettings) | +| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getQrCodeSettings) | | [**getUserTokenByMobileSecret**](#getUserTokenByMobileSecret) | **GET** /api/noauth/qr/{secret} | Get User Token (getUserTokenByMobileSecret) | -| [**saveQrCodeSettings**](#saveQrCodeSettings) | **POST** /api/mobile/qr/settings | Create Or Update the Mobile application settings (saveMobileAppSettings) | +| [**saveQrCodeSettings**](#saveQrCodeSettings) | **POST** /api/mobile/qr/settings | Create Or Update the Mobile application settings (saveQrCodeSettings) | @@ -33,7 +33,7 @@ getApplicationRedirect > QrCodeSettings getMergedMobileAppSettings() -Get QR code configuration for home page (getMobileAppQrCodeConfig) +Get QR code configuration for home page (getMergedMobileAppSettings) The response payload contains ui configuration of qr code Available for any authorized user. @@ -59,7 +59,7 @@ Fetch the url that takes user to linked mobile application Available for any a > QrCodeSettings getQrCodeSettings() -Get Mobile application settings (getMobileAppSettings) +Get Mobile application settings (getQrCodeSettings) The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. @@ -92,7 +92,7 @@ Returns the token of the User based on the provided secret key. > QrCodeSettings saveQrCodeSettings(qrCodeSettings) -Create Or Update the Mobile application settings (saveMobileAppSettings) +Create Or Update the Mobile application settings (saveQrCodeSettings) The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/pe/docs/QueueStatsControllerApi.md b/pe/docs/QueueStatsControllerApi.md index 4877e79d..f9316c00 100644 --- a/pe/docs/QueueStatsControllerApi.md +++ b/pe/docs/QueueStatsControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getQueueStatsById**](#getQueueStatsById) | **GET** /api/queueStats/{queueStatsId} | Get Queue stats entity by id (getQueueStatsById) | -| [**getQueueStatsByIdsV2**](#getQueueStatsByIdsV2) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIdsV2) | +| [**getQueueStatsByIds**](#getQueueStatsByIds) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIds) | | [**getTenantQueueStats**](#getTenantQueueStats) | **GET** /api/queueStats | Get Queue Stats entities (getTenantQueueStats) | @@ -28,11 +28,11 @@ Fetch the Queue stats object based on the provided Queue stats id. Available f **QueueStats** -## getQueueStatsByIdsV2 +## getQueueStatsByIds -> List getQueueStatsByIdsV2(queueStatsIds) +> List getQueueStatsByIds(queueStatsIds) -Get QueueStats By Ids (getQueueStatsByIdsV2) +Get QueueStats By Ids (getQueueStatsByIds) Fetch the Queue stats objects based on the provided ids. diff --git a/pe/docs/RateLimitsRecipientsConfig.md b/pe/docs/RateLimitsRecipientsConfig.md new file mode 100644 index 00000000..ccfdc7a9 --- /dev/null +++ b/pe/docs/RateLimitsRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RateLimitsRecipientsConfig + +`org.thingsboard.client.model.RateLimitsRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/ReportControllerApi.md b/pe/docs/ReportControllerApi.md index b1826d90..1e5987dd 100644 --- a/pe/docs/ReportControllerApi.md +++ b/pe/docs/ReportControllerApi.md @@ -7,10 +7,10 @@ | [**downloadReport**](#downloadReport) | **GET** /api/v2/report/{reportId}/download | downloadReport | | [**getReportById**](#getReportById) | **GET** /api/v2/report/{reportId} | Get Report (getReportById) | | [**getReportInfos**](#getReportInfos) | **GET** /api/v2/reportInfos/all | getReportInfos | +| [**getReportInfosByIds**](#getReportInfosByIds) | **GET** /api/v2/reportInfos | getReportInfosByIds | | [**getReports**](#getReports) | **GET** /api/v2/reports | getReports | -| [**getReports1**](#getReports1) | **GET** /api/v2/reportInfos | getReports | | [**requestReport**](#requestReport) | **POST** /api/v2/report/request | requestReport | -| [**testReportAndDownload**](#testReportAndDownload) | **POST** /api/v2/report/test | Download test report (downloadTestReport) | +| [**testReportAndDownload**](#testReportAndDownload) | **POST** /api/v2/report/test | Download test report (testReportAndDownload) | @@ -115,31 +115,27 @@ getReportInfos **PageDataReportInfo** -## getReports +## getReportInfosByIds -> PageDataReport getReports(pageSize, page, textSearch, sortProperty, sortOrder) +> List getReportInfosByIds(strReportIds) -getReports +getReportInfosByIds ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | Case-insensitive 'substring' filter based on report's name or customer title | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] | +| **strReportIds** | **List** | A list of report ids, separated by comma ',' | | ### Return type -**PageDataReport** +**List** -## getReports1 +## getReports -> List getReports1(strReportIds) +> PageDataReport getReports(pageSize, page, textSearch, sortProperty, sortOrder) getReports @@ -148,11 +144,15 @@ getReports | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **strReportIds** | **List** | A list of report ids, separated by comma ',' | | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | Case-insensitive 'substring' filter based on report's name or customer title | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] | ### Return type -**List** +**PageDataReport** ## requestReport @@ -177,7 +177,7 @@ requestReport > File testReportAndDownload(reportRequest) -Download test report (downloadTestReport) +Download test report (testReportAndDownload) Generate and download test report. Available for users with 'TENANT_ADMIN' authority. diff --git a/pe/docs/ReportTemplateConfig.md b/pe/docs/ReportTemplateConfig.md index 2be68cd5..53571dfc 100644 --- a/pe/docs/ReportTemplateConfig.md +++ b/pe/docs/ReportTemplateConfig.md @@ -10,8 +10,8 @@ | **format** | **TbReportFormat** | Report format | | | **entityAliases** | **List\** | | [optional] | | **filters** | **List\** | | [optional] | -| **components** | **List\** | | [optional] | | **namePattern** | **String** | | [optional] | +| **components** | **List\** | | [optional] | | **timeDataPattern** | **String** | | [optional] | diff --git a/pe/docs/ReportTemplateExportData.md b/pe/docs/ReportTemplateExportData.md new file mode 100644 index 00000000..02e9324a --- /dev/null +++ b/pe/docs/ReportTemplateExportData.md @@ -0,0 +1,23 @@ + +# ReportTemplateExportData + +`org.thingsboard.client.model.ReportTemplateExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/ResourceShortageRecipientsConfig.md b/pe/docs/ResourceShortageRecipientsConfig.md new file mode 100644 index 00000000..b5749bba --- /dev/null +++ b/pe/docs/ResourceShortageRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ResourceShortageRecipientsConfig + +`org.thingsboard.client.model.ResourceShortageRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/RoleControllerApi.md b/pe/docs/RoleControllerApi.md index faeca91a..3d198385 100644 --- a/pe/docs/RoleControllerApi.md +++ b/pe/docs/RoleControllerApi.md @@ -5,7 +5,7 @@ | [**deleteRole**](#deleteRole) | **DELETE** /api/role/{roleId} | Delete role (deleteRole) | | [**getRoleById**](#getRoleById) | **GET** /api/role/{roleId} | Get Role by Id (getRoleById) | | [**getRoles**](#getRoles) | **GET** /api/roles | Get Roles (getRoles) | -| [**getRolesByIdsV2**](#getRolesByIdsV2) | **GET** /api/roles/list | Get Roles By Ids (getRolesByIdsV2) | +| [**getRolesByIds**](#getRolesByIds) | **GET** /api/roles/list | Get Roles By Ids (getRolesByIds) | | [**saveRole**](#saveRole) | **POST** /api/role | Create Or Update Role (saveRole) | @@ -75,11 +75,11 @@ Returns a page of roles that are available for the current user. Role Contains a **PageDataRole** -## getRolesByIdsV2 +## getRolesByIds -> List getRolesByIdsV2(roleIds) +> List getRolesByIds(roleIds) -Get Roles By Ids (getRolesByIdsV2) +Get Roles By Ids (getRolesByIds) Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/RoleExportData.md b/pe/docs/RoleExportData.md new file mode 100644 index 00000000..3b1ab121 --- /dev/null +++ b/pe/docs/RoleExportData.md @@ -0,0 +1,23 @@ + +# RoleExportData + +`org.thingsboard.client.model.RoleExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/RpcV1ControllerApi.md b/pe/docs/RpcV1ControllerApi.md index 9763fabd..f9983683 100644 --- a/pe/docs/RpcV1ControllerApi.md +++ b/pe/docs/RpcV1ControllerApi.md @@ -2,16 +2,16 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleOneWayDeviceRPCRequest1**](#handleOneWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequest) | -| [**handleTwoWayDeviceRPCRequest1**](#handleTwoWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequest) | +| [**handleOneWayDeviceRPCRequestV1**](#handleOneWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV1) | +| [**handleTwoWayDeviceRPCRequestV1**](#handleTwoWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) | -## handleOneWayDeviceRPCRequest1 +## handleOneWayDeviceRPCRequestV1 -> String handleOneWayDeviceRPCRequest1(deviceId, body) +> String handleOneWayDeviceRPCRequestV1(deviceId, body) -Send one-way RPC request (handleOneWayDeviceRPCRequest) +Send one-way RPC request (handleOneWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -28,11 +28,11 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ **String** -## handleTwoWayDeviceRPCRequest1 +## handleTwoWayDeviceRPCRequestV1 -> String handleTwoWayDeviceRPCRequest1(deviceId, body) +> String handleTwoWayDeviceRPCRequestV1(deviceId, body) -Send two-way RPC request (handleTwoWayDeviceRPCRequest) +Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/pe/docs/RpcV2ControllerApi.md b/pe/docs/RpcV2ControllerApi.md index 577833cf..55de9d16 100644 --- a/pe/docs/RpcV2ControllerApi.md +++ b/pe/docs/RpcV2ControllerApi.md @@ -5,8 +5,8 @@ | [**deleteRpc**](#deleteRpc) | **DELETE** /api/rpc/persistent/{rpcId} | Delete persistent RPC | | [**getPersistedRpc**](#getPersistedRpc) | **GET** /api/rpc/persistent/{rpcId} | Get persistent RPC request | | [**getPersistedRpcByDevice**](#getPersistedRpcByDevice) | **GET** /api/rpc/persistent/device/{deviceId} | Get persistent RPC requests | -| [**handleOneWayDeviceRPCRequest**](#handleOneWayDeviceRPCRequest) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request | -| [**handleTwoWayDeviceRPCRequest**](#handleTwoWayDeviceRPCRequest) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request | +| [**handleOneWayDeviceRPCRequestV2**](#handleOneWayDeviceRPCRequestV2) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV2) | +| [**handleTwoWayDeviceRPCRequestV2**](#handleTwoWayDeviceRPCRequestV2) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) | @@ -76,11 +76,11 @@ Allows to query RPC calls for specific device using pagination. Available for u **String** -## handleOneWayDeviceRPCRequest +## handleOneWayDeviceRPCRequestV2 -> String handleOneWayDeviceRPCRequest(deviceId, body) +> String handleOneWayDeviceRPCRequestV2(deviceId, body) -Send one-way RPC request +Send one-way RPC request (handleOneWayDeviceRPCRequestV2) Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -97,11 +97,11 @@ Sends the one-way remote-procedure call (RPC) request to device. Sends the one-w **String** -## handleTwoWayDeviceRPCRequest +## handleTwoWayDeviceRPCRequestV2 -> String handleTwoWayDeviceRPCRequest(deviceId, body) +> String handleTwoWayDeviceRPCRequestV2(deviceId, body) -Send two-way RPC request +Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/pe/docs/RuleChainControllerApi.md b/pe/docs/RuleChainControllerApi.md index ae23304a..4300dac4 100644 --- a/pe/docs/RuleChainControllerApi.md +++ b/pe/docs/RuleChainControllerApi.md @@ -13,16 +13,16 @@ | [**getRuleChainOutputLabels**](#getRuleChainOutputLabels) | **GET** /api/ruleChain/{ruleChainId}/output/labels | Get Rule Chain output labels (getRuleChainOutputLabels) | | [**getRuleChainOutputLabelsUsage**](#getRuleChainOutputLabelsUsage) | **GET** /api/ruleChain/{ruleChainId}/output/labels/usage | Get output labels usage (getRuleChainOutputLabelsUsage) | | [**getRuleChains**](#getRuleChains) | **GET** /api/ruleChains | Get Rule Chains (getRuleChains) | -| [**getRuleChainsByIdsV2**](#getRuleChainsByIdsV2) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIdsV2) | +| [**getRuleChainsByIds**](#getRuleChainsByIds) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIds) | | [**importRuleChains**](#importRuleChains) | **POST** /api/ruleChains/import | Import Rule Chains | | [**isTbelEnabled**](#isTbelEnabled) | **GET** /api/ruleChain/tbelEnabled | Is TBEL script executor enabled | | [**saveRuleChain**](#saveRuleChain) | **POST** /api/ruleChain | Create Or Update Rule Chain (saveRuleChain) | -| [**saveRuleChain1**](#saveRuleChain1) | **POST** /api/ruleChain/device/default | Create Default Rule Chain | | [**saveRuleChainMetaData**](#saveRuleChainMetaData) | **POST** /api/ruleChain/metadata | Update Rule Chain Metadata | | [**setAutoAssignToEdgeRuleChain**](#setAutoAssignToEdgeRuleChain) | **POST** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) | +| [**setDeviceDefaultRuleChain**](#setDeviceDefaultRuleChain) | **POST** /api/ruleChain/device/default | Create Default Rule Chain (setDeviceDefaultRuleChain) | | [**setEdgeTemplateRootRuleChain**](#setEdgeTemplateRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/edgeTemplateRoot | Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain) | | [**setRootRuleChain**](#setRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/root | Set Root Rule Chain (setRootRuleChain) | -| [**testScript**](#testScript) | **POST** /api/ruleChain/testScript | Test Script function | +| [**testRuleChainScript**](#testRuleChainScript) | **POST** /api/ruleChain/testScript | Test Script function | | [**unassignRuleChainFromEdge**](#unassignRuleChainFromEdge) | **DELETE** /api/edge/{edgeId}/ruleChain/{ruleChainId} | Unassign rule chain from edge (unassignRuleChainFromEdge) | | [**unsetAutoAssignToEdgeRuleChain**](#unsetAutoAssignToEdgeRuleChain) | **DELETE** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain) | @@ -252,11 +252,11 @@ Returns a page of Rule Chains owned by tenant. The rule chain object is lightwei **PageDataRuleChain** -## getRuleChainsByIdsV2 +## getRuleChainsByIds -> List getRuleChainsByIdsV2(ruleChainIds) +> List getRuleChainsByIds(ruleChainIds) -Get Rule Chains By Ids (getRuleChainsByIdsV2) +Get Rule Chains By Ids (getRuleChainsByIds) Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -326,61 +326,61 @@ Create or update the Rule Chain. When creating Rule Chain, platform generates Ru **RuleChain** -## saveRuleChain1 +## saveRuleChainMetaData -> RuleChain saveRuleChain1(defaultRuleChainCreateRequest) +> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) -Create Default Rule Chain +Update Rule Chain Metadata -Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. +Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | +| **ruleChainMetaData** | **RuleChainMetaData** | | | +| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | ### Return type -**RuleChain** +**RuleChainMetaData** -## saveRuleChainMetaData +## setAutoAssignToEdgeRuleChain -> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) +> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) -Update Rule Chain Metadata +Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) -Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. +Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainMetaData** | **RuleChainMetaData** | | | -| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | +| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type -**RuleChainMetaData** +**RuleChain** -## setAutoAssignToEdgeRuleChain +## setDeviceDefaultRuleChain -> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) +> RuleChain setDeviceDefaultRuleChain(defaultRuleChainCreateRequest) -Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) +Create Default Rule Chain (setDeviceDefaultRuleChain) -Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. +Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | ### Return type @@ -427,9 +427,9 @@ Makes the rule chain to be root rule chain. Updates previous root rule chain as **RuleChain** -## testScript +## testRuleChainScript -> com.fasterxml.jackson.databind.JsonNode testScript(body, scriptLang) +> com.fasterxml.jackson.databind.JsonNode testRuleChainScript(body, scriptLang) Test Script function diff --git a/pe/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md b/pe/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md new file mode 100644 index 00000000..47641ea3 --- /dev/null +++ b/pe/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RuleEngineComponentLifecycleEventRecipientsConfig + +`org.thingsboard.client.model.RuleEngineComponentLifecycleEventRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/RuleEngineControllerApi.md b/pe/docs/RuleEngineControllerApi.md index b5997660..68f52a68 100644 --- a/pe/docs/RuleEngineControllerApi.md +++ b/pe/docs/RuleEngineControllerApi.md @@ -2,18 +2,18 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleRuleEngineRequest**](#handleRuleEngineRequest) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest1**](#handleRuleEngineRequest1) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest2**](#handleRuleEngineRequest2) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest3**](#handleRuleEngineRequest3) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequest) | +| [**handleRuleEngineRequestForEntity**](#handleRuleEngineRequestForEntity) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequestForEntity) | +| [**handleRuleEngineRequestForEntityWithQueueAndTimeout**](#handleRuleEngineRequestForEntityWithQueueAndTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) | +| [**handleRuleEngineRequestForEntityWithTimeout**](#handleRuleEngineRequestForEntityWithTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) | +| [**handleRuleEngineRequestForUser**](#handleRuleEngineRequestForUser) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequestForUser) | -## handleRuleEngineRequest +## handleRuleEngineRequestForEntity -> String handleRuleEngineRequest(entityType, entityId, body) +> String handleRuleEngineRequestForEntity(entityType, entityId, body) -Push entity message to the rule engine (handleRuleEngineRequest) +Push entity message to the rule engine (handleRuleEngineRequestForEntity) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -31,13 +31,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest1 +## handleRuleEngineRequestForEntityWithQueueAndTimeout -> String handleRuleEngineRequest1(entityType, entityId, timeout, body) +> String handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body) -Push entity message with timeout to the rule engine (handleRuleEngineRequest) +Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -46,6 +46,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -54,13 +55,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest2 +## handleRuleEngineRequestForEntityWithTimeout -> String handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body) +> String handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body) -Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) +Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -69,7 +70,6 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -78,11 +78,11 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest3 +## handleRuleEngineRequestForUser -> String handleRuleEngineRequest3(body) +> String handleRuleEngineRequestForUser(body) -Push user message to the rule engine (handleRuleEngineRequest) +Push user message to the rule engine (handleRuleEngineRequestForUser) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). diff --git a/pe/docs/SchedulerEventControllerApi.md b/pe/docs/SchedulerEventControllerApi.md index 1e8ce70d..43f52799 100644 --- a/pe/docs/SchedulerEventControllerApi.md +++ b/pe/docs/SchedulerEventControllerApi.md @@ -6,13 +6,13 @@ | [**deleteSchedulerEvent**](#deleteSchedulerEvent) | **DELETE** /api/schedulerEvent/{schedulerEventId} | Delete Scheduler Event (deleteSchedulerEvent) | | [**enableSchedulerEvent**](#enableSchedulerEvent) | **PUT** /api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue} | Enable or disable Scheduler Event (enableSchedulerEvent) | | [**getAllEdgeSchedulerEvents**](#getAllEdgeSchedulerEvents) | **GET** /api/edge/{edgeId}/allSchedulerEvents | Get All Edge Scheduler Events (getAllEdgeSchedulerEvents) | -| [**getAllSchedulerEventsV2**](#getAllSchedulerEventsV2) | **GET** /api/schedulerEvents/all | Get all scheduler events (getAllSchedulerEventsV2) | +| [**getAllSchedulerEvents**](#getAllSchedulerEvents) | **GET** /api/schedulerEvents/all | Get all scheduler events (getAllSchedulerEvents) | | [**getEdgeSchedulerEvents**](#getEdgeSchedulerEvents) | **GET** /api/edge/{edgeId}/schedulerEvents | Get Edge Scheduler Events (getEdgeSchedulerEvents) | | [**getScheduledReportEvents**](#getScheduledReportEvents) | **GET** /api/scheduledReports | Get Scheduled Report Events (getScheduledReportEvents) | | [**getSchedulerEventById**](#getSchedulerEventById) | **GET** /api/schedulerEvent/{schedulerEventId} | Get Scheduler Event (getSchedulerEventById) | | [**getSchedulerEventInfoById**](#getSchedulerEventInfoById) | **GET** /api/schedulerEvent/info/{schedulerEventId} | Get Scheduler Event With Customer Info (getSchedulerEventInfoById) | | [**getSchedulerEvents**](#getSchedulerEvents) | **GET** /api/schedulerEvents | Get scheduler events (getSchedulerEvents) | -| [**getSchedulerEventsByIdsV2**](#getSchedulerEventsByIdsV2) | **GET** /api/schedulerEvents/list | Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) | +| [**getSchedulerEventsByIds**](#getSchedulerEventsByIds) | **GET** /api/schedulerEvents/list | Get Scheduler Events By Ids (getSchedulerEventsByIds) | | [**getSchedulerEventsByRange**](#getSchedulerEventsByRange) | **GET** /api/schedulerEvents/startTime/{startTime}/endTime/{endTime} | Get scheduler events (getSchedulerEventsByRange) | | [**saveSchedulerEvent**](#saveSchedulerEvent) | **POST** /api/schedulerEvent | Save Scheduler Event (saveSchedulerEvent) | | [**unassignSchedulerEventFromEdge**](#unassignSchedulerEventFromEdge) | **DELETE** /api/edge/{edgeId}/schedulerEvent/{schedulerEventId} | Unassign scheduler event from edge (unassignSchedulerEventFromEdge) | @@ -101,11 +101,11 @@ Fetch the list of Scheduler Event Info objects based on the provided Edge entity **List** -## getAllSchedulerEventsV2 +## getAllSchedulerEvents -> List getAllSchedulerEventsV2(type) +> List getAllSchedulerEvents(type) -Get all scheduler events (getAllSchedulerEventsV2) +Get all scheduler events (getAllSchedulerEvents) Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -239,11 +239,11 @@ Requested scheduler events must be owned by tenant or assigned to customer which **PageDataSchedulerEventWithCustomerInfo** -## getSchedulerEventsByIdsV2 +## getSchedulerEventsByIds -> List getSchedulerEventsByIdsV2(schedulerEventIds) +> List getSchedulerEventsByIds(schedulerEventIds) -Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) +Get Scheduler Events By Ids (getSchedulerEventsByIds) Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). diff --git a/pe/docs/SelfRegistrationParams.md b/pe/docs/SelfRegistrationParams.md index 428e946b..a67a0180 100644 --- a/pe/docs/SelfRegistrationParams.md +++ b/pe/docs/SelfRegistrationParams.md @@ -14,13 +14,13 @@ | **title** | **String** | | [optional] | | **enabled** | **Boolean** | | [optional] | | **homeDashboard** | **HomeDashboardParams** | | [optional] | +| **notificationRecipient** | **NotificationTargetId** | | [optional] | +| **captcha** | **CaptchaParams** | | [optional] | | **signUpFields** | **List\** | | [optional] | | **defaultDashboard** | **DefaultDashboardParams** | | [optional] | | **customerTitlePrefix** | **String** | | [optional] | | **customMenuId** | **CustomMenuId** | | [optional] | | **customerGroupId** | **EntityGroupId** | | [optional] | -| **notificationRecipient** | **NotificationTargetId** | | [optional] | -| **captcha** | **CaptchaParams** | | [optional] | diff --git a/pe/docs/TaskProcessingFailureRecipientsConfig.md b/pe/docs/TaskProcessingFailureRecipientsConfig.md new file mode 100644 index 00000000..adf0cf8e --- /dev/null +++ b/pe/docs/TaskProcessingFailureRecipientsConfig.md @@ -0,0 +1,24 @@ + +# TaskProcessingFailureRecipientsConfig + +`org.thingsboard.client.model.TaskProcessingFailureRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/TbResourceControllerApi.md b/pe/docs/TbResourceControllerApi.md index 075c8088..6c43de22 100644 --- a/pe/docs/TbResourceControllerApi.md +++ b/pe/docs/TbResourceControllerApi.md @@ -8,15 +8,15 @@ | [**downloadLwm2mResourceIfChanged**](#downloadLwm2mResourceIfChanged) | **GET** /api/resource/lwm2m/{resourceId}/download | Download LWM2M Resource (downloadLwm2mResourceIfChanged) | | [**downloadPkcs12ResourceIfChanged**](#downloadPkcs12ResourceIfChanged) | **GET** /api/resource/pkcs12/{resourceId}/download | Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged) | | [**downloadResource**](#downloadResource) | **GET** /api/resource/{resourceId}/download | Download Resource (downloadResource) | -| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResource) | +| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResourceIfChanged) | | [**getLwm2mListObjects**](#getLwm2mListObjects) | **GET** /api/resource/lwm2m | Get LwM2M Objects (getLwm2mListObjects) | | [**getLwm2mListObjectsPage**](#getLwm2mListObjectsPage) | **GET** /api/resource/lwm2m/page | Get LwM2M Objects (getLwm2mListObjectsPage) | | [**getResourceById**](#getResourceById) | **GET** /api/resource/{resourceId} | Get Resource (getResourceById) | | [**getResourceInfo**](#getResourceInfo) | **GET** /api/resource/{resourceType}/{scope}/{key}/info | Get resource info (getResourceInfo) | | [**getResourceInfoById**](#getResourceInfoById) | **GET** /api/resource/info/{resourceId} | Get Resource Info (getResourceInfoById) | | [**getResources**](#getResources) | **GET** /api/resource | Get Resource Infos (getResources) | -| [**getSystemOrTenantResourcesByIdsV2**](#getSystemOrTenantResourcesByIdsV2) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) | -| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getAllResources) | +| [**getSystemOrTenantResourcesByIds**](#getSystemOrTenantResourcesByIds) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIds) | +| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getTenantResources) | | [**saveResource**](#saveResource) | **POST** /api/resource | Create Or Update Resource (saveResource) | | [**updateResourceData**](#updateResourceData) | **PUT** /api/resource/{id}/data | updateResourceData | | [**updateResourceInfo**](#updateResourceInfo) | **PUT** /api/resource/{id}/info | updateResourceInfo | @@ -153,7 +153,7 @@ Download Resource based on the provided Resource Id. Available for users with ' > File downloadResourceIfChanged(resourceType, scope, key, ifNoneMatch) -Download resource (downloadResource) +Download resource (downloadResourceIfChanged) Download resource with a given type and key for the given scope Available for any authorized user. @@ -306,11 +306,11 @@ Returns a page of Resource Info objects owned by tenant or sysadmin. You can spe **PageDataTbResourceInfo** -## getSystemOrTenantResourcesByIdsV2 +## getSystemOrTenantResourcesByIds -> List getSystemOrTenantResourcesByIdsV2(resourceIds) +> List getSystemOrTenantResourcesByIds(resourceIds) -Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) +Get Resource Infos by ids (getSystemOrTenantResourcesByIds) ### Parameters @@ -328,7 +328,7 @@ Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) > PageDataTbResourceInfo getTenantResources(pageSize, page, textSearch, sortProperty, sortOrder) -Get All Resource Infos (getAllResources) +Get All Resource Infos (getTenantResources) Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. diff --git a/pe/docs/TbResourceExportData.md b/pe/docs/TbResourceExportData.md new file mode 100644 index 00000000..22a0bee1 --- /dev/null +++ b/pe/docs/TbResourceExportData.md @@ -0,0 +1,23 @@ + +# TbResourceExportData + +`org.thingsboard.client.model.TbResourceExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/pe/docs/TenantControllerApi.md b/pe/docs/TenantControllerApi.md index b247a445..0039f3b0 100644 --- a/pe/docs/TenantControllerApi.md +++ b/pe/docs/TenantControllerApi.md @@ -7,7 +7,7 @@ | [**getTenantInfoById**](#getTenantInfoById) | **GET** /api/tenant/info/{tenantId} | Get Tenant Info (getTenantInfoById) | | [**getTenantInfos**](#getTenantInfos) | **GET** /api/tenantInfos | Get Tenants Info (getTenants) | | [**getTenants**](#getTenants) | **GET** /api/tenants | Get Tenants (getTenants) | -| [**getTenantsByIdsV2**](#getTenantsByIdsV2) | **GET** /api/tenants/list | Get Tenants By Ids (getTenantsByIdsV2) | +| [**getTenantsByIds**](#getTenantsByIds) | **GET** /api/tenants/list | Get Tenants By Ids (getTenantsByIds) | | [**saveTenant**](#saveTenant) | **POST** /api/tenant | Create Or update Tenant (saveTenant) | @@ -120,11 +120,11 @@ Returns a page of tenants registered in the platform. You can specify parameters **PageDataTenant** -## getTenantsByIdsV2 +## getTenantsByIds -> List getTenantsByIdsV2(tenantIds) +> List getTenantsByIds(tenantIds) -Get Tenants By Ids (getTenantsByIdsV2) +Get Tenants By Ids (getTenantsByIds) Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. diff --git a/pe/docs/TsKvEntry.md b/pe/docs/TsKvEntry.md index bacf579d..89ae6c19 100644 --- a/pe/docs/TsKvEntry.md +++ b/pe/docs/TsKvEntry.md @@ -13,10 +13,10 @@ | **doubleValue** | **Double** | | [optional] | | **longValue** | **Long** | | [optional] | | **booleanValue** | **Boolean** | | [optional] | +| **valueAsString** | **String** | | [optional] | | **dataType** | **DataType** | | [optional] | | **jsonValue** | **String** | | [optional] | | **strValue** | **String** | | [optional] | -| **valueAsString** | **String** | | [optional] | | **version** | **Long** | | [optional] | diff --git a/pe/docs/TwoFactorAuthConfigControllerApi.md b/pe/docs/TwoFactorAuthConfigControllerApi.md index 75ae0146..1400742e 100644 --- a/pe/docs/TwoFactorAuthConfigControllerApi.md +++ b/pe/docs/TwoFactorAuthConfigControllerApi.md @@ -5,7 +5,7 @@ | [**deleteTwoFaAccountConfig**](#deleteTwoFaAccountConfig) | **DELETE** /api/2fa/account/config | Delete 2FA account config (deleteTwoFaAccountConfig) | | [**generateTwoFaAccountConfig**](#generateTwoFaAccountConfig) | **POST** /api/2fa/account/config/generate | Generate 2FA account config (generateTwoFaAccountConfig) | | [**getAccountTwoFaSettings**](#getAccountTwoFaSettings) | **GET** /api/2fa/account/settings | Get account 2FA settings (getAccountTwoFaSettings) | -| [**getAvailableTwoFaProviders1**](#getAvailableTwoFaProviders1) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderTypes**](#getAvailableTwoFaProviderTypes) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderTypes) | | [**getPlatformTwoFaSettings**](#getPlatformTwoFaSettings) | **GET** /api/2fa/settings | Get platform 2FA settings (getPlatformTwoFaSettings) | | [**savePlatformTwoFaSettings**](#savePlatformTwoFaSettings) | **POST** /api/2fa/settings | Save platform 2FA settings (savePlatformTwoFaSettings) | | [**submitTwoFaAccountConfig**](#submitTwoFaAccountConfig) | **POST** /api/2fa/account/config/submit | Submit 2FA account config (submitTwoFaAccountConfig) | @@ -67,11 +67,11 @@ Get user's account 2FA configuration. Configuration contains configs for differe **AccountTwoFaSettings** -## getAvailableTwoFaProviders1 +## getAvailableTwoFaProviderTypes -> List getAvailableTwoFaProviders1() +> List getAvailableTwoFaProviderTypes() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderTypes) Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. diff --git a/pe/docs/TwoFactorAuthControllerApi.md b/pe/docs/TwoFactorAuthControllerApi.md index 2030e77e..c1597f9b 100644 --- a/pe/docs/TwoFactorAuthControllerApi.md +++ b/pe/docs/TwoFactorAuthControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**authenticateByTwoFaConfigurationToken**](#authenticateByTwoFaConfigurationToken) | **POST** /api/auth/2fa/login | Get regular token pair after successfully configuring 2FA | | [**checkTwoFaVerificationCode**](#checkTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/check | Check 2FA verification code (checkTwoFaVerificationCode) | -| [**getAvailableTwoFaProviders**](#getAvailableTwoFaProviders) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderInfos**](#getAvailableTwoFaProviderInfos) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderInfos) | | [**requestTwoFaVerificationCode**](#requestTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/send | Request 2FA verification code (requestTwoFaVerificationCode) | @@ -43,11 +43,11 @@ Checks 2FA verification code, and if it is correct the method returns a regular **JwtPair** -## getAvailableTwoFaProviders +## getAvailableTwoFaProviderInfos -> List getAvailableTwoFaProviders() +> List getAvailableTwoFaProviderInfos() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderInfos) Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` diff --git a/pe/docs/UserControllerApi.md b/pe/docs/UserControllerApi.md index d164fb00..ce773f20 100644 --- a/pe/docs/UserControllerApi.md +++ b/pe/docs/UserControllerApi.md @@ -2,9 +2,9 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**deleteGeneralUserSettings**](#deleteGeneralUserSettings) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteGeneralUserSettings) | | [**deleteUser**](#deleteUser) | **DELETE** /api/user/{userId} | Delete User (deleteUser) | -| [**deleteUserSettings**](#deleteUserSettings) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings (deleteUserSettings) | -| [**deleteUserSettings1**](#deleteUserSettings1) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteUserSettings) | +| [**deleteUserSettingsByType**](#deleteUserSettingsByType) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings by type (deleteUserSettingsByType) | | [**findUsersByQuery**](#findUsersByQuery) | **GET** /api/users/info | Find users by query (findUsersByQuery) | | [**getActivationLink**](#getActivationLink) | **GET** /api/user/{userId}/activationLink | Get activation link (getActivationLink) | | [**getActivationLinkInfo**](#getActivationLinkInfo) | **GET** /api/user/{userId}/activationLinkInfo | Get activation link info (getActivationLinkInfo) | @@ -12,7 +12,7 @@ | [**getAllUserInfos**](#getAllUserInfos) | **GET** /api/userInfos/all | Get All User Infos for current user (getAllUserInfos) | | [**getCustomerUserInfos**](#getCustomerUserInfos) | **GET** /api/customer/{customerId}/userInfos | Get Customer user Infos (getCustomerUserInfos) | | [**getCustomerUsers**](#getCustomerUsers) | **GET** /api/customer/{customerId}/users | Get Customer Users (getCustomerUsers) | -| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getUserSettings) | +| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getGeneralUserSettings) | | [**getLastVisitedDashboards**](#getLastVisitedDashboards) | **GET** /api/user/lastVisitedDashboards | Get information about last visited and starred dashboards (getLastVisitedDashboards) | | [**getMobileSession**](#getMobileSession) | **GET** /api/user/mobile/session | getMobileSession | | [**getTenantAdmins**](#getTenantAdmins) | **GET** /api/tenant/{tenantId}/users | Get Tenant Users (getTenantAdmins) | @@ -22,11 +22,11 @@ | [**getUserToken**](#getUserToken) | **GET** /api/user/{userId}/token | Get User Token (getUserToken) | | [**getUserUsers**](#getUserUsers) | **GET** /api/user/users | Get Users (getUsers) | | [**getUsersByEntityGroupId**](#getUsersByEntityGroupId) | **GET** /api/entityGroup/{entityGroupId}/users | Get users by Entity Group Id (getUsersByEntityGroupId) | -| [**getUsersByIdsV2**](#getUsersByIdsV2) | **GET** /api/users/list | Get Users By Ids (getUsersByIdsV2) | +| [**getUsersByIds**](#getUsersByIds) | **GET** /api/users/list | Get Users By Ids (getUsersByIds) | | [**getUsersForAssign**](#getUsersForAssign) | **GET** /api/users/assign/{alarmId} | Get usersForAssign (getUsersForAssign) | | [**isUserTokenAccessEnabled**](#isUserTokenAccessEnabled) | **GET** /api/user/tokenAccessEnabled | Check Token Access Enabled (isUserTokenAccessEnabled) | -| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (saveUserSettings) | -| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (saveUserSettings) | +| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (putGeneralUserSettings) | +| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (putUserSettings) | | [**removeMobileSession**](#removeMobileSession) | **DELETE** /api/user/mobile/session | removeMobileSession | | [**reportUserDashboardAction**](#reportUserDashboardAction) | **GET** /api/user/dashboards/{dashboardId}/{action} | Report action of User over the dashboard (reportUserDashboardAction) | | [**saveMobileSession**](#saveMobileSession) | **POST** /api/user/mobile/session | saveMobileSession | @@ -37,52 +37,51 @@ -## deleteUser +## deleteGeneralUserSettings -> deleteUser(userId) +> deleteGeneralUserSettings(paths) -Delete User (deleteUser) +Delete user settings (deleteGeneralUserSettings) -Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). +Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **paths** | **String** | paths | | ### Return type null (empty response body) -## deleteUserSettings +## deleteUser -> deleteUserSettings(paths, type) +> deleteUser(userId) -Delete user settings (deleteUserSettings) +Delete User (deleteUser) -Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter +Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **paths** | **String** | paths | | -| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | +| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type null (empty response body) -## deleteUserSettings1 +## deleteUserSettingsByType -> deleteUserSettings1(paths) +> deleteUserSettingsByType(paths, type) -Delete user settings (deleteUserSettings) +Delete user settings by type (deleteUserSettingsByType) Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter @@ -92,6 +91,7 @@ Delete user settings by specifying list of json element xpaths. Example: to de | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **paths** | **String** | paths | | +| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | ### Return type @@ -266,7 +266,7 @@ Returns a page of users owned by customer. You can specify parameters to filter > com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() -Get user settings (getUserSettings) +Get user settings (getGeneralUserSettings) Fetch the User settings based on authorized user. @@ -460,11 +460,11 @@ Returns a page of user objects that belongs to specified Entity Group Id. You ca **PageDataUser** -## getUsersByIdsV2 +## getUsersByIds -> List getUsersByIdsV2(userIds) +> List getUsersByIds(userIds) -Get Users By Ids (getUsersByIdsV2) +Get Users By Ids (getUsersByIds) Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -522,7 +522,7 @@ Checks that the system is configured to allow administrators to impersonate them > putGeneralUserSettings(body) -Update user settings (saveUserSettings) +Update user settings (putGeneralUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} @@ -542,7 +542,7 @@ null (empty response body) > putUserSettings(type, body) -Update user settings (saveUserSettings) +Update user settings (putUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} diff --git a/pe/docs/WidgetTypeControllerApi.md b/pe/docs/WidgetTypeControllerApi.md index e707a1cf..9616cc8d 100644 --- a/pe/docs/WidgetTypeControllerApi.md +++ b/pe/docs/WidgetTypeControllerApi.md @@ -4,9 +4,9 @@ |------------- | ------------- | -------------| | [**deleteWidgetType**](#deleteWidgetType) | **DELETE** /api/widgetType/{widgetTypeId} | Delete widget type (deleteWidgetType) | | [**getBundleWidgetTypeFqns**](#getBundleWidgetTypeFqns) | **GET** /api/widgetTypeFqns | Get all Widget type fqns for specified Bundle (getBundleWidgetTypeFqns) | +| [**getBundleWidgetTypes**](#getBundleWidgetTypes) | **GET** /api/widgetsBundle/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getBundleWidgetTypesDetails**](#getBundleWidgetTypesDetails) | **GET** /api/widgetTypesDetails | Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) | | [**getBundleWidgetTypesInfos**](#getBundleWidgetTypesInfos) | **GET** /api/widgetTypesInfos | Get Widget Type Info objects (getBundleWidgetTypesInfos) | -| [**getBundleWidgetTypesV2**](#getBundleWidgetTypesV2) | **GET** /api/widgetsBundles/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getWidgetType**](#getWidgetType) | **GET** /api/widgetType | Get Widget Type (getWidgetType) | | [**getWidgetTypeById**](#getWidgetTypeById) | **GET** /api/widgetType/{widgetTypeId} | Get Widget Type Details (getWidgetTypeById) | | [**getWidgetTypeInfoById**](#getWidgetTypeInfoById) | **GET** /api/widgetTypeInfo/{widgetTypeId} | Get Widget Type Info (getWidgetTypeInfoById) | @@ -55,6 +55,26 @@ Returns an array of Widget Type fqns that belong to specified Widget Bundle. Av **List** +## getBundleWidgetTypes + +> List getBundleWidgetTypes(widgetsBundleId) + +Get all Widget types for specified Bundle (getBundleWidgetTypes) + +Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **widgetsBundleId** | **String** | Widget Bundle Id | | + +### Return type + +**List** + + ## getBundleWidgetTypesDetails > List getBundleWidgetTypesDetails(widgetsBundleId, includeResources) @@ -104,26 +124,6 @@ Get the Widget Type Info objects based on the provided parameters. Widget Type I **PageDataWidgetTypeInfo** -## getBundleWidgetTypesV2 - -> List getBundleWidgetTypesV2(widgetsBundleId) - -Get all Widget types for specified Bundle (getBundleWidgetTypes) - -Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **widgetsBundleId** | **String** | Widget Bundle Id | | - -### Return type - -**List** - - ## getWidgetType > WidgetType getWidgetType(fqn) diff --git a/pe/docs/WidgetsBundleControllerApi.md b/pe/docs/WidgetsBundleControllerApi.md index e6dd8200..b7635c86 100644 --- a/pe/docs/WidgetsBundleControllerApi.md +++ b/pe/docs/WidgetsBundleControllerApi.md @@ -3,10 +3,10 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteWidgetsBundle**](#deleteWidgetsBundle) | **DELETE** /api/widgetsBundle/{widgetsBundleId} | Delete widgets bundle (deleteWidgetsBundle) | +| [**getAllWidgetsBundles**](#getAllWidgetsBundles) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getAllWidgetsBundles) | | [**getWidgetsBundleById**](#getWidgetsBundleById) | **GET** /api/widgetsBundle/{widgetsBundleId} | Get Widget Bundle (getWidgetsBundleById) | | [**getWidgetsBundles**](#getWidgetsBundles) | **GET** /api/widgetsBundles | Get Widget Bundles (getWidgetsBundles) | | [**getWidgetsBundlesList**](#getWidgetsBundlesList) | **GET** /api/widgetsBundles/list | Get Widgets Bundles By Ids (getWidgetsBundlesList) | -| [**getWidgetsBundlesV2**](#getWidgetsBundlesV2) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getWidgetsBundlesV2) | | [**saveWidgetsBundle**](#saveWidgetsBundle) | **POST** /api/widgetsBundle | Create Or Update Widget Bundle (saveWidgetsBundle) | | [**updateWidgetsBundleWidgetFqns**](#updateWidgetsBundleWidgetFqns) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns | Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns) | | [**updateWidgetsBundleWidgetTypes**](#updateWidgetsBundleWidgetTypes) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypes | Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes) | @@ -33,6 +33,19 @@ Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause null (empty response body) +## getAllWidgetsBundles + +> List getAllWidgetsBundles() + +Get all Widget Bundles (getAllWidgetsBundles) + +Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + +### Return type + +**List** + + ## getWidgetsBundleById > WidgetsBundle getWidgetsBundleById(widgetsBundleId, inlineImages) @@ -101,19 +114,6 @@ Requested widgets bundles must be system level or owned by tenant of the user wh **List** -## getWidgetsBundlesV2 - -> List getWidgetsBundlesV2() - -Get all Widget Bundles (getWidgetsBundlesV2) - -Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - -### Return type - -**List** - - ## saveWidgetsBundle > WidgetsBundle saveWidgetsBundle(widgetsBundle) diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index 89ac917a..1b6fc441 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -474,10 +474,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -617,10 +617,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -743,10 +743,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -878,10 +878,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1013,10 +1013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1148,10 +1148,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1291,10 +1291,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1426,10 +1426,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1441,7 +1441,7 @@ ], "summary": "Redirect user to mail provider login page. ", "description": "After user logged in and provided accessprovider sends authorization code to specified redirect uri.)", - "operationId": "getAuthorizationUrl", + "operationId": "getMailOAuth2AuthorizationUrl", "responses": { "200": { "description": "OK", @@ -1561,10 +1561,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1574,8 +1574,8 @@ "tags": [ "admin-controller" ], - "summary": "codeProcessingUrl", - "operationId": "codeProcessingUrl", + "summary": "handleMailOAuth2Callback", + "operationId": "handleMailOAuth2Callback", "parameters": [ { "name": "code", @@ -1706,10 +1706,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1841,10 +1841,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1976,10 +1976,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2119,10 +2119,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2245,10 +2245,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2383,10 +2383,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2518,10 +2518,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2652,10 +2652,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2787,10 +2787,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2930,10 +2930,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3076,10 +3076,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3214,10 +3214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3352,10 +3352,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3508,10 +3508,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3643,10 +3643,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3778,10 +3778,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3972,10 +3972,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4115,10 +4115,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4260,10 +4260,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4408,10 +4408,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4554,10 +4554,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4746,10 +4746,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4901,10 +4901,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5049,10 +5049,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5195,10 +5195,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5390,10 +5390,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5536,10 +5536,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5715,10 +5715,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5861,10 +5861,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -6005,10 +6005,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6151,10 +6151,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6297,10 +6297,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6452,10 +6452,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6598,10 +6598,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6611,9 +6611,9 @@ "tags": [ "alarm-controller" ], - "summary": "Get Alarms (getAlarms)", + "summary": "Get Alarms (getAlarmsByEntity)", "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarms", + "operationId": "getAlarmsByEntity", "parameters": [ { "name": "entityType", @@ -6883,10 +6883,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7150,10 +7150,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7445,10 +7445,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7722,10 +7722,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7867,10 +7867,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8006,10 +8006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8163,10 +8163,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8319,10 +8319,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8522,10 +8522,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8721,10 +8721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8866,10 +8866,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9012,10 +9012,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9151,10 +9151,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9297,10 +9297,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9434,10 +9434,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9647,10 +9647,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9799,10 +9799,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9810,9 +9810,9 @@ "tags": [ "asset-controller" ], - "summary": "Find related assets (findByQuery)", + "summary": "Find related assets (findAssetsByQuery)", "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findByQuery_4", + "operationId": "findAssetsByQuery", "requestBody": { "content": { "application/json": { @@ -9945,10 +9945,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10167,10 +10167,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10380,10 +10380,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10584,10 +10584,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10597,7 +10597,7 @@ "tags": [ "asset-controller" ], - "summary": "Get Tenant Asset (getTenantAsset)", + "summary": "Get Tenant Asset (getTenantAssetByName)", "description": "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.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", "operationId": "getTenantAssetByName", "parameters": [ @@ -10730,10 +10730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10934,10 +10934,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11147,10 +11147,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11292,10 +11292,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11442,10 +11442,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11597,10 +11597,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -11734,10 +11734,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11880,10 +11880,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12015,10 +12015,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12161,10 +12161,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12355,10 +12355,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12368,9 +12368,9 @@ "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profiles By Ids (getAssetProfilesByIdsV2)", + "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetProfilesByIdsV2", + "operationId": "getAssetProfilesByIds", "parameters": [ { "name": "assetProfileIds", @@ -12507,10 +12507,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12701,10 +12701,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12926,10 +12926,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13160,10 +13160,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13403,10 +13403,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13637,10 +13637,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13782,10 +13782,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13910,10 +13910,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14045,10 +14045,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15076,10 +15076,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15089,9 +15089,9 @@ "tags": [ "blob-entity-controller" ], - "summary": "Get Blob Entities By Ids (getBlobEntitiesByIdsV2)", + "summary": "Get Blob Entities By Ids (getBlobEntitiesByIds)", "description": "Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getBlobEntitiesByIdsV2", + "operationId": "getBlobEntitiesByIds", "parameters": [ { "name": "blobEntityIds", @@ -15228,10 +15228,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15374,10 +15374,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15513,10 +15513,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15660,10 +15660,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15806,10 +15806,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15821,7 +15821,7 @@ ], "summary": "Test Script expression", "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript_1", + "operationId": "testCalculatedFieldScript", "requestBody": { "description": "Test calculated field TBEL expression.", "content": { @@ -15952,10 +15952,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16097,10 +16097,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -16233,10 +16233,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16378,10 +16378,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16541,10 +16541,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16686,10 +16686,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16831,10 +16831,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16987,10 +16987,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17000,9 +17000,9 @@ "tags": [ "calculated-field-controller" ], - "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2)", + "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", "description": "Fetch the Calculated Fields based on the provided Entity Id.", - "operationId": "getCalculatedFieldsByEntityIdV2", + "operationId": "getCalculatedFieldsByEntityId", "parameters": [ { "name": "entityType", @@ -17206,10 +17206,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17445,10 +17445,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17633,10 +17633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17779,10 +17779,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17944,10 +17944,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18113,10 +18113,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18259,10 +18259,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18416,10 +18416,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18573,10 +18573,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18730,10 +18730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18876,10 +18876,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -19013,10 +19013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19196,10 +19196,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19409,10 +19409,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19422,9 +19422,9 @@ "tags": [ "converter-controller" ], - "summary": "Get Converters By Ids (getConvertersByIdsV2)", + "summary": "Get Converters By Ids (getConvertersByIds)", "description": "Requested converters must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getConvertersByIdsV2", + "operationId": "getConvertersByIds", "parameters": [ { "name": "converterIds", @@ -19561,10 +19561,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19746,10 +19746,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19939,10 +19939,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20100,10 +20100,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20261,10 +20261,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20422,10 +20422,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20583,10 +20583,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20744,10 +20744,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20905,10 +20905,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21043,10 +21043,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -21209,10 +21209,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21419,10 +21419,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21575,10 +21575,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21725,10 +21725,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21872,10 +21872,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -22027,10 +22027,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22174,10 +22174,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22325,10 +22325,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22493,10 +22493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22639,10 +22639,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22785,10 +22785,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -22932,10 +22932,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -23069,10 +23069,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -23216,10 +23216,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23373,10 +23373,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23521,10 +23521,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23720,10 +23720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23866,10 +23866,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24012,10 +24012,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -24149,10 +24149,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24362,10 +24362,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24508,10 +24508,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24654,10 +24654,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24858,10 +24858,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25053,10 +25053,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25066,9 +25066,9 @@ "tags": [ "customer-controller" ], - "summary": "Get customers by Customer Ids (getCustomersByIdsV2)", + "summary": "Get customers by Customer Ids (getCustomersByIds)", "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomersByIdsV2", + "operationId": "getCustomersByIds", "parameters": [ { "name": "customerIds", @@ -25205,10 +25205,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25409,10 +25409,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25555,10 +25555,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25750,10 +25750,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25885,10 +25885,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -26021,10 +26021,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26231,10 +26231,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26407,10 +26407,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26545,10 +26545,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26680,10 +26680,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26826,10 +26826,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26963,10 +26963,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27100,10 +27100,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27256,10 +27256,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -27393,10 +27393,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27545,10 +27545,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27746,10 +27746,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27947,10 +27947,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28114,10 +28114,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28277,10 +28277,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28412,10 +28412,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -28548,10 +28548,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28563,7 +28563,7 @@ ], "summary": "Get Tenant Dashboards (getTenantDashboards)", "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDashboards_1", + "operationId": "getTenantDashboards", "parameters": [ { "name": "pageSize", @@ -28749,10 +28749,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28762,9 +28762,9 @@ "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboards)", + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDashboards", + "operationId": "getTenantDashboardsByTenantId", "parameters": [ { "name": "tenantId", @@ -28950,10 +28950,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29169,10 +29169,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29339,10 +29339,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29508,10 +29508,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -30111,9 +30111,9 @@ "tags": [ "device-api-controller" ], - "summary": "Save claiming information (claimDevice)", + "summary": "Save claiming information (saveClaimingInfo)", "description": "Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation.\n Example of the request payload: \n\n```json\n{\"secretKey\":\"value\", \"durationMs\":60000}\n```\n\nNote: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\nThe API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead).\n", - "operationId": "claimDevice", + "operationId": "saveClaimingInfo", "parameters": [ { "name": "deviceToken", @@ -31348,10 +31348,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31508,10 +31508,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31655,10 +31655,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -31670,7 +31670,7 @@ ], "summary": "Claim device (claimDevice)", "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "claimDevice_1", + "operationId": "claimDevice", "parameters": [ { "name": "deviceName", @@ -31818,10 +31818,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -31962,10 +31962,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32193,10 +32193,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32406,10 +32406,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32613,10 +32613,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32628,7 +32628,7 @@ ], "summary": "Create Device (saveDevice) with credentials ", "description": "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)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDeviceWithCredentials_1", + "operationId": "saveDeviceWithCredentials", "parameters": [ { "name": "entityGroupId", @@ -32810,10 +32810,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -32955,10 +32955,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33100,10 +33100,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33246,10 +33246,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33385,10 +33385,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33531,10 +33531,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -33668,10 +33668,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -33814,10 +33814,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34036,10 +34036,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34188,10 +34188,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -34199,9 +34199,9 @@ "tags": [ "device-controller" ], - "summary": "Find related devices (findByQuery)", + "summary": "Find related devices (findDevicesByQuery)", "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findByQuery_3", + "operationId": "findDevicesByQuery", "requestBody": { "content": { "application/json": { @@ -34334,10 +34334,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34494,10 +34494,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34661,10 +34661,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -34865,10 +34865,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35011,10 +35011,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35215,10 +35215,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35370,10 +35370,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35574,10 +35574,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35718,10 +35718,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -35870,10 +35870,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36007,10 +36007,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36152,10 +36152,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36301,10 +36301,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36314,9 +36314,9 @@ "tags": [ "device-profile-controller" ], - "summary": "Get time series keys (getTimeseriesKeys)", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTimeseriesKeys_1", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { "name": "deviceProfileId", @@ -36450,10 +36450,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36600,10 +36600,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -36755,10 +36755,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -36892,10 +36892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37038,10 +37038,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37173,10 +37173,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37319,10 +37319,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37531,10 +37531,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37544,9 +37544,9 @@ "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2)", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceProfileInfosByIdsV2", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { "name": "deviceProfileIds", @@ -37683,10 +37683,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -37879,10 +37879,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38038,10 +38038,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38184,10 +38184,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38368,10 +38368,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38507,10 +38507,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38522,7 +38522,7 @@ ], "summary": "Update oauth2 clients (updateOauth2Clients)", "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "updateOauth2Clients_1", + "operationId": "updateOauth2Clients", "parameters": [ { "name": "id", @@ -38660,10 +38660,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -38882,10 +38882,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39095,10 +39095,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39262,10 +39262,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39407,10 +39407,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39553,10 +39553,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39713,10 +39713,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -39873,10 +39873,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40019,10 +40019,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40165,10 +40165,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40303,10 +40303,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40449,10 +40449,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -40586,10 +40586,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40732,10 +40732,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -40887,10 +40887,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41100,10 +41100,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41295,10 +41295,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -41306,9 +41306,9 @@ "tags": [ "edge-controller" ], - "summary": "Find related edges (findByQuery)", + "summary": "Find related edges (findEdgesByQuery)", "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_2", + "operationId": "findEdgesByQuery", "requestBody": { "content": { "application/json": { @@ -41441,10 +41441,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41576,10 +41576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41728,10 +41728,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -41932,10 +41932,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42085,10 +42085,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42230,10 +42230,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42376,10 +42376,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42580,10 +42580,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -42784,10 +42784,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43008,10 +43008,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43146,10 +43146,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43311,10 +43311,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43457,10 +43457,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43615,10 +43615,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43762,10 +43762,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -43911,10 +43911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44086,10 +44086,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44286,10 +44286,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -44430,10 +44430,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44639,10 +44639,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44867,10 +44867,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45014,10 +45014,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45179,10 +45179,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45350,10 +45350,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -45519,10 +45519,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45664,10 +45664,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45842,10 +45842,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45988,10 +45988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -46125,10 +46125,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46278,10 +46278,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46431,10 +46431,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46628,10 +46628,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46767,10 +46767,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46906,10 +46906,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47055,10 +47055,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47210,10 +47210,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47367,10 +47367,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47554,10 +47554,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47700,10 +47700,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47852,10 +47852,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48067,10 +48067,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48273,10 +48273,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48502,10 +48502,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48731,10 +48731,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48944,10 +48944,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48957,9 +48957,9 @@ "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIdsV2)", + "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByIdsV2", + "operationId": "getEntityGroupsByIds", "parameters": [ { "name": "entityGroupIds", @@ -49096,10 +49096,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49263,10 +49263,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49478,10 +49478,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49645,10 +49645,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49851,10 +49851,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50009,10 +50009,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50238,10 +50238,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50251,7 +50251,7 @@ "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList)", + "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", "operationId": "getAllEntityGroupsByOwnerAndType", "parameters": [ @@ -50419,10 +50419,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50648,10 +50648,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50808,10 +50808,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50996,10 +50996,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51184,10 +51184,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51330,10 +51330,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51475,10 +51475,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51609,10 +51609,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51746,10 +51746,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51892,10 +51892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52037,10 +52037,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52217,10 +52217,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52408,10 +52408,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52599,25 +52599,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/relations": { "post": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationsQuery" } } }, @@ -52625,7 +52627,17 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } }, "400": { "description": "Bad Request", @@ -52735,10 +52747,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -52746,48 +52758,12 @@ "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelation)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelation", + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "toId", + "name": "entityId", "in": "query", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -52796,7 +52772,7 @@ } }, { - "name": "toType", + "name": "entityType", "in": "query", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -52917,172 +52893,35 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations": { - "post": { + "/api/relations/from/{fromType}/{fromId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Find related entities (findByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", + "parameters": [ { - "http_login_form": [] + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } }, { - "api_key_form": [] - } - ] - }, - "delete": { - "tags": [ - "entity-relation-controller" - ], - "summary": "Delete common relations (deleteCommonRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", - "parameters": [ - { - "name": "entityId", - "in": "query", + "name": "fromId", + "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { @@ -53090,10 +52929,10 @@ } }, { - "name": "entityType", + "name": "relationTypeGroup", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, "schema": { "type": "string" } @@ -53101,7 +52940,17 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } }, "400": { "description": "Bad Request", @@ -53211,22 +53060,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromV2)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromV2", + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { "name": "fromType", @@ -53246,6 +53095,15 @@ "type": "string" } }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "relationTypeGroup", "in": "query", @@ -53378,60 +53236,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { - "get": { + "/api/relations/info": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromAndRelationType", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -53440,7 +53270,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationInfo" } } } @@ -53458,7 +53288,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -53554,32 +53384,51 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info": { - "post": { + "/api/relations/info/from/{fromType}/{fromId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Find related entity infos (findInfoByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", + "parameters": [ + { + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -53606,7 +53455,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -53702,25 +53551,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { + "/api/relations/info/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByFromV2)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByFromV2", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { - "name": "fromType", + "name": "toType", "in": "path", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -53729,7 +53578,7 @@ } }, { - "name": "fromId", + "name": "toId", "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -53869,22 +53718,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/to/{toType}/{toId}": { + "/api/relations/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByToV2)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByToV2", + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", "parameters": [ { "name": "toType", @@ -53922,7 +53771,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelationInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -54036,22 +53885,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}": { + "/api/relations/to/{toType}/{toId}/{relationType}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToV2)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToV2", + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", "parameters": [ { "name": "toType", @@ -54071,6 +53920,15 @@ "type": "string" } }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "relationTypeGroup", "in": "query", @@ -54203,70 +54061,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}/{relationType}": { - "get": { + "/api/v2/relation": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToAndRelationType", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/EntityRelation" } } } @@ -54283,7 +54110,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -54379,32 +54206,76 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/v2/relation": { - "post": { + }, + "delete": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelationV2)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelationV2", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -54428,7 +54299,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -54524,199 +54395,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] - } - ] - }, - "delete": { - "tags": [ - "entity-relation-controller" - ], - "summary": "Delete Relation (deleteRelationV2)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelationV2", - "parameters": [ - { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] - }, - { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54933,10 +54615,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55144,10 +54826,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55346,10 +55028,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55543,10 +55225,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55689,10 +55371,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55827,10 +55509,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55973,10 +55655,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56110,10 +55792,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56321,10 +56003,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56334,9 +56016,9 @@ "tags": [ "entity-view-controller" ], - "summary": "Find related entity views (findByQuery)", + "summary": "Find related entity views (findEntityViewsByQuery)", "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findByQuery_1", + "operationId": "findEntityViewsByQuery", "requestBody": { "content": { "application/json": { @@ -56469,10 +56151,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56484,7 +56166,7 @@ ], "summary": "Get Entity Views By Ids (getEntityViewsByIds)", "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityViewsByIdsV2", + "operationId": "getEntityViewsByIds", "parameters": [ { "name": "entityViewIds", @@ -56621,10 +56303,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56767,10 +56449,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56969,10 +56651,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57171,22 +56853,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, "/api/events/{entityType}/{entityId}": { - "get": { + "post": { "tags": [ "event-controller" ], - "summary": "Get Events (Deprecated)", - "description": "Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. ", - "operationId": "getEvents", + "summary": "Get Events by event filter (getEventsByFilter)", + "description": "Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", + "operationId": "getEventsByFilter", "parameters": [ { "name": "entityType", @@ -57291,6 +56973,16 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventFilter" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -57314,7 +57006,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -57410,269 +57102,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/events/{entityType}/{entityId}/clear": { "post": { "tags": [ "event-controller" ], - "summary": "Get Events by event filter (getEvents)", - "description": "Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEvents_1", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The value is not used in searching.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ts", - "id" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventFilter" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/api/events/{entityType}/{entityId}/clear": { - "post": { - "tags": [ - "event-controller" - ], - "summary": "Clear Events (clearEvents)", - "description": "Clears events by filter for specified entity.", - "operationId": "clearEvents", + "summary": "Clear Events (clearEvents)", + "description": "Clears events by filter for specified entity.", + "operationId": "clearEvents", "parameters": [ { "name": "entityType", @@ -57835,10 +57280,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57848,9 +57293,9 @@ "tags": [ "event-controller" ], - "summary": "Get Events by type (getEvents)", + "summary": "Get Events by type (getEventsByType)", "description": "Returns a page of events for specified entity by specifying event type. 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 response schema for more details. ", - "operationId": "getEvents_2", + "operationId": "getEventsByType", "parameters": [ { "name": "entityType", @@ -58084,10 +57529,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58233,10 +57678,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58378,10 +57823,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58533,10 +57978,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58679,10 +58124,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -58816,10 +58261,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58968,10 +58413,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59117,10 +58562,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59275,10 +58720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59419,10 +58864,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59634,10 +59079,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59795,10 +59240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59970,10 +59415,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60144,10 +59589,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60308,10 +59753,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60466,10 +59911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60624,10 +60069,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60790,10 +60235,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60965,10 +60410,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61131,10 +60576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61623,10 +61068,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61769,10 +61214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61922,10 +61367,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -62073,10 +61518,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62281,10 +61726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62489,10 +61934,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62634,10 +62079,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62772,10 +62217,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62918,10 +62363,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63064,10 +62509,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -63201,10 +62646,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63410,10 +62855,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63619,10 +63064,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63757,10 +63202,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63770,9 +63215,9 @@ "tags": [ "integration-controller" ], - "summary": "Get Integrations By Ids (getIntegrationsByIdsV2)", + "summary": "Get Integrations By Ids (getIntegrationsByIds)", "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationsByIdsV2", + "operationId": "getIntegrationsByIds", "parameters": [ { "name": "integrationIds", @@ -63909,10 +63354,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64055,10 +63500,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -64191,10 +63636,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64330,10 +63775,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64469,10 +63914,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64709,10 +64154,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64813,7 +64258,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "SZZenhqJPiyw1DSvqR4nIJXGaQzIiK" + "resetToken": "fml6Mln7qUKzTOdd6BoUQs8AFnTVL1" } } } @@ -64923,7 +64368,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "SZZenhqJPiyw1DSvqR4nIJXGaQzIiK" + "resetToken": "fml6Mln7qUKzTOdd6BoUQs8AFnTVL1" } } } @@ -65022,8 +64467,9 @@ "tags": [ "lwm-2m-controller" ], - "summary": "Save device with credentials (Deprecated)", - "operationId": "saveDeviceWithCredentials", + "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials)", + "description": "Deprecated.", + "operationId": "saveLwm2mDeviceWithCredentials", "parameters": [ { "name": "entityGroupId", @@ -65166,10 +64612,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65312,10 +64758,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65327,7 +64773,7 @@ ], "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates_1", + "operationId": "getClientRegistrationTemplates", "responses": { "200": { "description": "OK", @@ -65447,10 +64893,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65606,10 +65052,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65752,10 +65198,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65936,10 +65382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66075,10 +65521,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66088,9 +65534,9 @@ "tags": [ "mobile-app-bundle-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", + "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateOauth2Clients", + "operationId": "updateMobileAppBundleOauth2Clients", "parameters": [ { "name": "id", @@ -66228,10 +65674,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66387,10 +65833,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66400,7 +65846,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile app infos (getTenantMobileAppInfos)", + "summary": "Get mobile app infos (getTenantMobileApps)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getTenantMobileApps", "parameters": [ @@ -66580,10 +66026,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -66723,10 +66169,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66736,7 +66182,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile info by id (getMobileAppInfoById)", + "summary": "Get mobile info by id (getMobileAppById)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getMobileAppById", "parameters": [ @@ -66869,10 +66315,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -67006,10 +66452,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67294,10 +66740,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67445,10 +66891,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67590,10 +67036,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67748,10 +67194,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67894,10 +67340,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68031,10 +67477,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68215,10 +67661,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68359,10 +67805,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68494,10 +67940,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68637,10 +68083,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68771,10 +68217,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68913,10 +68359,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69052,10 +68498,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69191,10 +68637,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69398,10 +68844,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69541,10 +68987,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69692,10 +69138,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69837,10 +69283,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69983,10 +69429,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70120,10 +69566,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70304,10 +69750,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70449,10 +69895,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70616,10 +70062,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70762,10 +70208,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70899,10 +70345,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71083,10 +70529,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71096,9 +70542,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by ids (getNotificationTargetsByIdsV2)", + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsByIdsV2", + "operationId": "getNotificationTargetsByIds", "parameters": [ { "name": "ids", @@ -71235,10 +70681,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71248,9 +70694,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2)", + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou 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 response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsBySupportedNotificationTypeV2", + "operationId": "getNotificationTargetsBySupportedNotificationType", "parameters": [ { "name": "notificationType", @@ -71428,10 +70874,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71585,10 +71031,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71730,10 +71176,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71876,10 +71322,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72013,10 +71459,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72209,10 +71655,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72222,9 +71668,9 @@ "tags": [ "o-auth-2-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "getClientRegistrationTemplates", + "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { "description": "OK", @@ -72347,10 +71793,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72490,10 +71936,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72630,10 +72076,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72930,10 +72376,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73114,10 +72560,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73127,9 +72573,9 @@ "tags": [ "o-auth-2-controller" ], - "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2)", + "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findTenantOAuth2ClientInfosByIdsV2", + "operationId": "findTenantOAuth2ClientInfosByIds", "parameters": [ { "name": "clientIds", @@ -73266,10 +72712,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73412,10 +72858,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73549,10 +72995,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73684,10 +73130,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73829,10 +73275,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73975,10 +73421,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74121,10 +73567,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74311,10 +73757,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74448,10 +73894,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74595,10 +74041,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74794,10 +74240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75015,10 +74461,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75028,9 +74474,9 @@ "tags": [ "ota-package-controller" ], - "summary": "Get OTA Package Infos (getOtaPackages)", + "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", "description": "Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackages_1", + "operationId": "getOtaPackagesByDeviceProfileIdAndType", "parameters": [ { "name": "deviceProfileId", @@ -75236,10 +74682,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75406,10 +74852,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75576,10 +75022,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75711,10 +75157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75724,7 +75170,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Get QR code configuration for home page (getMobileAppQrCodeConfig)", + "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", "operationId": "getMergedMobileAppSettings", "responses": { @@ -75846,10 +75292,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75859,7 +75305,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Get Mobile application settings (getMobileAppSettings)", + "summary": "Get Mobile application settings (getQrCodeSettings)", "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", "operationId": "getQrCodeSettings", "responses": { @@ -75981,10 +75427,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -75992,7 +75438,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Create Or Update the Mobile application settings (saveMobileAppSettings)", + "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "saveQrCodeSettings", "requestBody": { @@ -76124,10 +75570,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76606,10 +76052,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76766,10 +76212,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76912,10 +76358,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77058,10 +76504,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77195,10 +76641,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77386,10 +76832,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77399,9 +76845,9 @@ "tags": [ "queue-stats-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIdsV2)", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIdsV2", + "operationId": "getQueueStatsByIds", "parameters": [ { "name": "queueStatsIds", @@ -77538,10 +76984,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77684,10 +77130,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77840,10 +77286,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77984,10 +77430,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77997,7 +77443,7 @@ "tags": [ "report-controller" ], - "summary": "Download test report (downloadTestReport)", + "summary": "Download test report (testReportAndDownload)", "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "testReportAndDownload", "requestBody": { @@ -78130,10 +77576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78276,10 +77722,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -78413,10 +77859,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78559,10 +78005,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78572,8 +78018,8 @@ "tags": [ "report-controller" ], - "summary": "getReports", - "operationId": "getReports_1", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { "name": "strReportIds", @@ -78710,10 +78156,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78922,10 +78368,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79105,10 +78551,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79250,10 +78696,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79396,10 +78842,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79542,10 +78988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -79679,10 +79125,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79913,10 +79359,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80065,10 +79511,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80210,10 +79656,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80356,10 +79802,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80493,10 +79939,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80700,10 +80146,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80713,9 +80159,9 @@ "tags": [ "role-controller" ], - "summary": "Get Roles By Ids (getRolesByIdsV2)", + "summary": "Get Roles By Ids (getRolesByIds)", "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRolesByIdsV2", + "operationId": "getRolesByIds", "parameters": [ { "name": "roleIds", @@ -80852,10 +80298,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80865,9 +80311,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequest)", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest_1", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -81009,10 +80455,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81022,9 +80468,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequest)", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest_1", + "operationId": "handleTwoWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -81166,10 +80612,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81179,9 +80625,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send one-way RPC request", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest", + "operationId": "handleOneWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -81321,10 +80767,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81542,10 +80988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81688,10 +81134,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -81825,10 +81271,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81838,9 +81284,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send two-way RPC request", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest", + "operationId": "handleTwoWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -81980,10 +81426,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82133,10 +81579,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -82284,10 +81730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82486,10 +81932,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82631,10 +82077,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82769,10 +82215,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82782,9 +82228,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Create Default Rule Chain", + "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain_1", + "operationId": "setDeviceDefaultRuleChain", "requestBody": { "content": { "application/json": { @@ -82914,10 +82360,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83071,10 +82517,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83206,10 +82652,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83221,7 +82667,7 @@ ], "summary": "Test Script function", "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript", + "operationId": "testRuleChainScript", "parameters": [ { "name": "scriptLang", @@ -83363,10 +82809,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83509,10 +82955,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -83646,10 +83092,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83792,10 +83238,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -83936,10 +83382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84082,10 +83528,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84228,10 +83674,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84378,10 +83824,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84527,10 +83973,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84673,10 +84119,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84879,10 +84325,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85026,10 +84472,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85186,10 +84632,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85199,9 +84645,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIdsV2)", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRuleChainsByIdsV2", + "operationId": "getRuleChainsByIds", "parameters": [ { "name": "ruleChainIds", @@ -85338,10 +84784,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85484,10 +84930,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85497,9 +84943,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push user message to the rule engine (handleRuleEngineRequest)", + "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_3", + "operationId": "handleRuleEngineRequestForUser", "requestBody": { "content": { "application/json": { @@ -85630,10 +85076,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85643,9 +85089,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest", + "operationId": "handleRuleEngineRequestForEntity", "parameters": [ { "name": "entityType", @@ -85796,10 +85242,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85809,9 +85255,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_2", + "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { "name": "entityType", @@ -85981,10 +85427,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85994,9 +85440,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_1", + "operationId": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { "name": "entityType", @@ -86157,10 +85603,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86306,10 +85752,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86461,10 +85907,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -86614,10 +86060,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86811,10 +86257,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87028,10 +86474,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87173,10 +86619,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87319,10 +86765,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87465,10 +86911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -87602,10 +87048,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87757,10 +87203,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87960,10 +87406,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87973,9 +87419,9 @@ "tags": [ "scheduler-event-controller" ], - "summary": "Get all scheduler events (getAllSchedulerEventsV2)", + "summary": "Get all scheduler events (getAllSchedulerEvents)", "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllSchedulerEventsV2", + "operationId": "getAllSchedulerEvents", "parameters": [ { "name": "type", @@ -88109,10 +87555,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88122,9 +87568,9 @@ "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIdsV2)", + "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByIdsV2", + "operationId": "getSchedulerEventsByIds", "parameters": [ { "name": "schedulerEventIds", @@ -88261,10 +87707,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88449,10 +87895,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88594,10 +88040,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -88737,10 +88183,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88875,10 +88321,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89021,10 +88467,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89178,10 +88624,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89324,10 +88770,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89482,10 +88928,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89673,10 +89119,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90248,10 +89694,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -90391,10 +89837,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -90516,10 +89962,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91413,10 +90859,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91548,10 +90994,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91683,10 +91129,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91818,10 +91264,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91964,10 +91410,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92102,10 +91548,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92248,10 +91694,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92387,10 +91833,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92533,10 +91979,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92755,10 +92201,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -92899,10 +92345,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93045,10 +92491,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93200,10 +92646,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93355,10 +92801,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93368,8 +92814,8 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2)", - "operationId": "getSystemOrTenantResourcesByIdsV2", + "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", + "operationId": "getSystemOrTenantResourcesByIds", "parameters": [ { "name": "resourceIds", @@ -93506,10 +92952,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93684,10 +93130,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93879,10 +93325,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94034,10 +93480,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94189,10 +93635,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94202,7 +93648,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get All Resource Infos (getAllResources)", + "summary": "Get All Resource Infos (getTenantResources)", "description": "Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "getTenantResources", "parameters": [ @@ -94383,10 +93829,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94554,10 +94000,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94719,10 +94165,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94875,10 +94321,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95022,10 +94468,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -95174,10 +94620,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95321,10 +94767,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95334,7 +94780,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Download resource (downloadResource)", + "summary": "Download resource (downloadResourceIfChanged)", "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", "operationId": "downloadResourceIfChanged", "parameters": [ @@ -95505,10 +94951,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95680,10 +95126,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95838,10 +95284,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -96004,10 +95450,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96171,10 +95617,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96329,10 +95775,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96501,10 +95947,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96659,10 +96105,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96872,10 +96318,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97038,10 +96484,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97214,10 +96660,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97392,10 +96838,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97584,10 +97030,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97775,10 +97221,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -97945,10 +97391,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98231,10 +97677,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98398,10 +97844,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -98573,10 +98019,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98718,10 +98164,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98864,10 +98310,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99010,10 +98456,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -99147,10 +98593,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99349,10 +98795,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99550,10 +98996,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99563,9 +99009,9 @@ "tags": [ "tenant-controller" ], - "summary": "Get Tenants By Ids (getTenantsByIdsV2)", + "summary": "Get Tenants By Ids (getTenantsByIds)", "description": "Fetch Tenant objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantsByIdsV2", + "operationId": "getTenantsByIds", "parameters": [ { "name": "tenantIds", @@ -99702,10 +99148,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99847,10 +99293,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99993,10 +99439,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -100130,10 +99576,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100276,10 +99722,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100411,10 +99857,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100557,10 +100003,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100749,10 +100195,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100943,10 +100389,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101094,10 +100540,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101383,10 +100829,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101518,10 +100964,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101663,10 +101109,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101818,10 +101264,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101965,10 +101411,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102103,10 +101549,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102238,10 +101684,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102373,10 +101819,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102567,10 +102013,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102713,10 +102159,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102848,10 +102294,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -102991,10 +102437,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103126,10 +102572,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103261,10 +102707,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103389,10 +102835,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103524,10 +102970,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103679,10 +103125,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -103832,10 +103278,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -103975,10 +103421,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104121,10 +103567,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104259,10 +103705,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104394,10 +103840,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104407,9 +103853,9 @@ "tags": [ "two-factor-auth-config-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderTypes)", "description": "Get the list of provider types available for user to use (the ones configured by tenant or sysadmin).\nExample of response:\n```\n[\n \"TOTP\",\n \"EMAIL\",\n \"SMS\"\n]\n```\n\nAvailable for any authorized user. ", - "operationId": "getAvailableTwoFaProviders_1", + "operationId": "getAvailableTwoFaProviderTypes", "responses": { "200": { "description": "OK", @@ -104532,10 +103978,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104667,10 +104113,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -104810,10 +104256,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104945,10 +104391,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104958,9 +104404,9 @@ "tags": [ "two-factor-auth-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderInfos)", "description": "Get the list of 2FA provider infos available for user to use. Example:\n```\n[\n {\n \"type\": \"EMAIL\",\n \"default\": true,\n \"contact\": \"ab*****ko@gmail.com\"\n },\n {\n \"type\": \"TOTP\",\n \"default\": false,\n \"contact\": null\n },\n {\n \"type\": \"SMS\",\n \"default\": false,\n \"contact\": \"+38********12\"\n }\n]\n```", - "operationId": "getAvailableTwoFaProviders", + "operationId": "getAvailableTwoFaProviderInfos", "responses": { "200": { "description": "OK", @@ -105083,10 +104529,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105236,10 +104682,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105374,10 +104820,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105509,10 +104955,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105643,10 +105089,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105837,10 +105283,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106049,10 +105495,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106252,10 +105698,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106455,10 +105901,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106658,10 +106104,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106834,10 +106280,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106989,10 +106435,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107135,10 +106581,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107270,10 +106716,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107414,10 +106860,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -107559,10 +107005,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -107694,10 +107140,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107833,10 +107279,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107978,10 +107424,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107991,7 +107437,7 @@ "tags": [ "user-controller" ], - "summary": "Get user settings (getUserSettings)", + "summary": "Get user settings (getGeneralUserSettings)", "description": "Fetch the User settings based on authorized user. ", "operationId": "getGeneralUserSettings", "responses": { @@ -108113,10 +107559,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -108124,7 +107570,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putGeneralUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putGeneralUserSettings", "requestBody": { @@ -108249,10 +107695,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108262,9 +107708,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings (deleteGeneralUserSettings)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings_1", + "operationId": "deleteGeneralUserSettings", "parameters": [ { "name": "paths", @@ -108388,10 +107834,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108534,10 +107980,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -108545,7 +107991,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putUserSettings", "parameters": [ @@ -108681,10 +108127,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108694,9 +108140,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings by type (deleteUserSettingsByType)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings", + "operationId": "deleteUserSettingsByType", "parameters": [ { "name": "paths", @@ -108829,10 +108275,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108964,10 +108410,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109158,10 +108604,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109304,10 +108750,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -109441,10 +108887,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109587,10 +109033,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109733,10 +109179,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109879,10 +109325,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110027,10 +109473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110230,10 +109676,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110433,10 +109879,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110627,10 +110073,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110640,9 +110086,9 @@ "tags": [ "user-controller" ], - "summary": "Get Users By Ids (getUsersByIdsV2)", + "summary": "Get Users By Ids (getUsersByIds)", "description": "Requested users must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUsersByIdsV2", + "operationId": "getUsersByIds", "parameters": [ { "name": "userIds", @@ -110779,10 +110225,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110966,10 +110412,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111101,10 +110547,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111374,10 +110820,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -111511,10 +110957,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111657,10 +111103,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -111794,10 +111240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111929,10 +111375,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112064,10 +111510,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112220,10 +111666,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112367,10 +111813,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -112511,10 +111957,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112656,10 +112102,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112791,10 +112237,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -112945,10 +112391,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113091,10 +112537,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -113245,10 +112691,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113400,10 +112846,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -113537,10 +112983,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113686,10 +113132,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113832,10 +113278,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114085,10 +113531,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114243,10 +113689,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114488,22 +113934,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/widgetsBundles/{widgetsBundleId}/widgetTypes": { + "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { "get": { "tags": [ "widget-type-controller" ], "summary": "Get all Widget types for specified Bundle (getBundleWidgetTypes)", "description": "Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getBundleWidgetTypesV2", + "operationId": "getBundleWidgetTypes", "parameters": [ { "name": "widgetsBundleId", @@ -114637,27 +114083,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle": { + }, "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", - "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. 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.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveWidgetsBundle", + "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", + "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetTypes", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WidgetsBundle" + "type": "array", + "description": "Ordered list of widget type Ids to be included by widgets bundle", + "items": { + "type": "string" + } } } }, @@ -114665,14 +114124,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WidgetsBundle" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -114782,42 +114234,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/widgetsBundle/{widgetsBundleId}": { - "get": { + "/api/widgetsBundle": { + "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Get Widget Bundle (getWidgetsBundleById)", - "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundleById", - "parameters": [ - { - "name": "widgetsBundleId", - "in": "path", - "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", + "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. 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.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveWidgetsBundle", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -114841,7 +114283,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -114937,20 +114379,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/widgetsBundle/{widgetsBundleId}": { + "get": { "tags": [ "widgets-bundle-controller" ], - "summary": "Delete widgets bundle (deleteWidgetsBundle)", - "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "deleteWidgetsBundle", + "summary": "Get Widget Bundle (getWidgetsBundleById)", + "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetsBundleById", "parameters": [ { "name": "widgetsBundleId", @@ -114960,11 +114404,27 @@ "schema": { "type": "string" } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } }, "400": { "description": "Bad Request", @@ -115074,22 +114534,20 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { - "post": { + }, + "delete": { "tags": [ "widgets-bundle-controller" ], - "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", - "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateWidgetsBundleWidgetFqns", + "summary": "Delete widgets bundle (deleteWidgetsBundle)", + "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteWidgetsBundle", "parameters": [ { "name": "widgetsBundleId", @@ -115101,20 +114559,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "Ordered list of widget type FQNs to be included by widgets bundle", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -115131,7 +114575,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -115227,22 +114671,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { + "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { "post": { "tags": [ "widgets-bundle-controller" ], - "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", - "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateWidgetsBundleWidgetTypes", + "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", + "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetFqns", "parameters": [ { "name": "widgetsBundleId", @@ -115259,7 +114703,7 @@ "application/json": { "schema": { "type": "array", - "description": "Ordered list of widget type Ids to be included by widgets bundle", + "description": "Ordered list of widget type FQNs to be included by widgets bundle", "items": { "type": "string" } @@ -115380,10 +114824,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115600,10 +115044,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115613,9 +115057,9 @@ "tags": [ "widgets-bundle-controller" ], - "summary": "Get all Widget Bundles (getWidgetsBundlesV2)", + "summary": "Get all Widget Bundles (getAllWidgetsBundles)", "description": "Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundlesV2", + "operationId": "getAllWidgetsBundles", "responses": { "200": { "description": "OK", @@ -115738,10 +115182,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115890,10 +115334,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116276,6 +115720,16 @@ "provider" ] }, + "AiModelExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AiModelId": { "type": "object", "properties": { @@ -116511,8 +115965,30 @@ "triggerType" ] }, + "AlarmAssignmentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -116716,6 +116192,29 @@ "triggerType" ] }, + "AlarmCommentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCommentType": { "type": "string", "enum": [ @@ -117475,7 +116974,6 @@ ] }, "AlarmRuleBooleanFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -117630,7 +117128,6 @@ ] }, "AlarmRuleDurationCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -117675,7 +117172,6 @@ ] }, "AlarmRuleNoDataFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -117698,7 +117194,6 @@ ] }, "AlarmRuleNumericFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -117721,7 +117216,6 @@ ] }, "AlarmRuleRepeatingCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -117759,7 +117253,6 @@ ] }, "AlarmRuleSimpleCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -117801,7 +117294,6 @@ ] }, "AlarmRuleStringFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -118420,6 +117912,29 @@ "triggerType" ] }, + "ApiUsageLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ApiUsageStateFilter": { "allOf": [ { @@ -118540,6 +118055,16 @@ "name" ] }, + "AssetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetId": { "type": "object", "properties": { @@ -118696,6 +118221,16 @@ } } }, + "AssetProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetProfileId": { "type": "object", "properties": { @@ -119777,12 +119312,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -119797,12 +119335,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -119817,12 +119358,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -120852,6 +120396,16 @@ "type" ] }, + "ConverterExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "ConverterId": { "type": "object", "properties": { @@ -121343,6 +120897,16 @@ "title" ] }, + "CustomerExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "CustomerId": { "type": "object", "properties": { @@ -121631,6 +121195,16 @@ "type" ] }, + "DashboardExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DashboardId": { "type": "object", "properties": { @@ -122140,7 +121714,6 @@ ] }, "DefaultDeviceConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/DeviceConfiguration" @@ -122251,35 +121824,6 @@ "visible" ] }, - "DefaultNotificationRuleRecipientsConfig": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" - }, - { - "type": "object", - "properties": { - "triggerType": { - "$ref": "#/components/schemas/NotificationRuleTriggerType" - }, - "targets": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 1 - } - } - } - ], - "description": "Default notification rule recipients configuration", - "required": [ - "targets", - "triggerType" - ] - }, "DefaultPageId": { "type": "string", "enum": [ @@ -122825,6 +122369,29 @@ "triggerType" ] }, + "DeviceActivityRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "DeviceConfiguration": { "type": "object", "description": "Device configuration", @@ -123272,6 +122839,16 @@ } } }, + "DeviceProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DeviceProfileId": { "type": "object", "properties": { @@ -123694,7 +123271,6 @@ ] }, "DummyJobConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/JobConfiguration" @@ -124009,6 +123585,29 @@ "triggerType" ] }, + "EdgeCommunicationFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectionNotificationRuleTriggerConfig": { "allOf": [ { @@ -124039,6 +123638,29 @@ "triggerType" ] }, + "EdgeConnectionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectivityEvent": { "type": "string", "enum": [ @@ -124599,6 +124221,29 @@ "triggerType" ] }, + "EntitiesLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "Entity": { "type": "object", "properties": { @@ -124646,8 +124291,30 @@ "triggerType" ] }, + "EntityActionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EntityAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -124880,12 +124547,23 @@ "WIDGET_TYPE": "#/components/schemas/WidgetTypeExportData", "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleExportData", "OTA_PACKAGE": "#/components/schemas/OtaPackageExportData", + "CUSTOMER": "#/components/schemas/CustomerExportData", + "TB_RESOURCE": "#/components/schemas/TbResourceExportData", + "DASHBOARD": "#/components/schemas/DashboardExportData", + "ASSET_PROFILE": "#/components/schemas/AssetProfileExportData", + "ASSET": "#/components/schemas/AssetExportData", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileExportData", + "ENTITY_VIEW": "#/components/schemas/EntityViewExportData", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateExportData", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetExportData", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleExportData", + "AI_MODEL": "#/components/schemas/AiModelExportData", "ENTITY_GROUP": "#/components/schemas/EntityGroupExportData", - "ASSET": "#/components/schemas/GroupEntityExportData", - "DASHBOARD": "#/components/schemas/GroupEntityExportData", - "CUSTOMER": "#/components/schemas/GroupEntityExportData", - "ENTITY_VIEW": "#/components/schemas/GroupEntityExportData", - "SCHEDULER_EVENT": "#/components/schemas/SchedulerEventExportData" + "SCHEDULER_EVENT": "#/components/schemas/SchedulerEventExportData", + "CONVERTER": "#/components/schemas/ConverterExportData", + "INTEGRATION": "#/components/schemas/IntegrationExportData", + "ROLE": "#/components/schemas/RoleExportData", + "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateExportData" } }, "properties": { @@ -125799,6 +125477,16 @@ "type" ] }, + "EntityViewExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "EntityViewId": { "type": "object", "properties": { @@ -126179,7 +125867,6 @@ ] }, "EscalatedNotificationRuleRecipientsConfig": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" @@ -126506,7 +126193,6 @@ ] }, "GeofencingCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -126907,16 +126593,6 @@ "serviceAccountKey" ] }, - "GroupEntityExportData": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - } - ], - "required": [ - "entityType" - ] - }, "GroupPermission": { "type": "object", "description": "A JSON value representing the group permission.", @@ -127522,6 +127198,16 @@ } } }, + "IntegrationExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "IntegrationId": { "type": "object", "properties": { @@ -127655,6 +127341,29 @@ "triggerType" ] }, + "IntegrationLifecycleEventRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "IntegrationType": { "type": "string", "enum": [ @@ -129640,6 +129349,29 @@ "triggerType" ] }, + "NewPlatformVersionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "NoSecLwM2MBootstrapServerCredential": { "allOf": [ { @@ -130080,6 +129812,7 @@ "sent": { "type": "object", "additionalProperties": { + "type": "integer", "format": "int32" } }, @@ -130093,6 +129826,7 @@ } }, "totalErrors": { + "type": "integer", "format": "int32" }, "error": { @@ -130167,6 +129901,16 @@ } } }, + "NotificationRuleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationRuleId": { "type": "object", "properties": { @@ -130251,21 +129995,21 @@ "discriminator": { "propertyName": "triggerType", "mapping": { - "ENTITY_ACTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", + "ENTITY_ACTION": "#/components/schemas/EntityActionRecipientsConfig", "ALARM": "#/components/schemas/EscalatedNotificationRuleRecipientsConfig", - "ALARM_COMMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ALARM_ASSIGNMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "DEVICE_ACTIVITY": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_CONNECTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "NEW_PLATFORM_VERSION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ENTITIES_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "API_USAGE_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RATE_LIMITS": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "TASK_PROCESSING_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RESOURCES_SHORTAGE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig" + "ALARM_COMMENT": "#/components/schemas/AlarmCommentRecipientsConfig", + "ALARM_ASSIGNMENT": "#/components/schemas/AlarmAssignmentRecipientsConfig", + "DEVICE_ACTIVITY": "#/components/schemas/DeviceActivityRecipientsConfig", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/RuleEngineComponentLifecycleEventRecipientsConfig", + "EDGE_CONNECTION": "#/components/schemas/EdgeConnectionRecipientsConfig", + "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/EdgeCommunicationFailureRecipientsConfig", + "NEW_PLATFORM_VERSION": "#/components/schemas/NewPlatformVersionRecipientsConfig", + "ENTITIES_LIMIT": "#/components/schemas/EntitiesLimitRecipientsConfig", + "API_USAGE_LIMIT": "#/components/schemas/ApiUsageLimitRecipientsConfig", + "RATE_LIMITS": "#/components/schemas/RateLimitsRecipientsConfig", + "TASK_PROCESSING_FAILURE": "#/components/schemas/TaskProcessingFailureRecipientsConfig", + "RESOURCES_SHORTAGE": "#/components/schemas/ResourceShortageRecipientsConfig", + "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/IntegrationLifecycleEventRecipientsConfig" } }, "properties": { @@ -130401,6 +130145,16 @@ "type" ] }, + "NotificationTargetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTargetId": { "type": "object", "properties": { @@ -130484,6 +130238,16 @@ "deliveryMethodsTemplates" ] }, + "NotificationTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTemplateId": { "type": "object", "properties": { @@ -134118,7 +133882,6 @@ ] }, "PropagationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -134558,6 +134321,29 @@ "triggerType" ] }, + "RateLimitsRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "RawDataEventFilter": { "allOf": [ { @@ -134625,7 +134411,6 @@ } }, "RelatedEntitiesAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -135504,15 +135289,15 @@ "$ref": "#/components/schemas/Filter" } }, + "namePattern": { + "type": "string" + }, "components": { "type": "array", "items": { "$ref": "#/components/schemas/ReportComponent" } }, - "namePattern": { - "type": "string" - }, "timeDataPattern": { "type": "string" } @@ -135521,6 +135306,16 @@ "format" ] }, + "ReportTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "ReportTemplateId": { "type": "object", "properties": { @@ -135906,6 +135701,29 @@ } } }, + "ResourceShortageRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ResourceSubType": { "type": "string", "enum": [ @@ -136060,6 +135878,16 @@ "type" ] }, + "RoleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "RoleId": { "type": "object", "properties": { @@ -136527,6 +136355,29 @@ "triggerType" ] }, + "RuleEngineComponentLifecycleEventRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "RuleNode": { "type": "object", "properties": { @@ -137162,7 +137013,6 @@ } }, "ScriptCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -137390,6 +137240,12 @@ "homeDashboard": { "$ref": "#/components/schemas/HomeDashboardParams" }, + "notificationRecipient": { + "$ref": "#/components/schemas/NotificationTargetId" + }, + "captcha": { + "$ref": "#/components/schemas/CaptchaParams" + }, "signUpFields": { "type": "array", "items": { @@ -137407,12 +137263,6 @@ }, "customerGroupId": { "$ref": "#/components/schemas/EntityGroupId" - }, - "notificationRecipient": { - "$ref": "#/components/schemas/NotificationTargetId" - }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams" } }, "required": [ @@ -137648,7 +137498,6 @@ ] }, "SimpleCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -138575,6 +138424,29 @@ "triggerType" ] }, + "TaskProcessingFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "TaskResult": { "type": "object", "discriminator": { @@ -138797,6 +138669,16 @@ } } }, + "TbResourceExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "TbResourceId": { "type": "object", "properties": { @@ -140630,6 +140512,9 @@ "booleanValue": { "type": "boolean" }, + "valueAsString": { + "type": "string" + }, "dataType": { "$ref": "#/components/schemas/DataType" }, @@ -140639,9 +140524,6 @@ "strValue": { "type": "string" }, - "valueAsString": { - "type": "string" - }, "version": { "type": "integer", "format": "int64" @@ -142423,13 +142305,13 @@ } }, "securitySchemes": { - "http_login_form": { + "HttpLoginForm": { "type": "http", "description": "Enter Username / Password", "scheme": "loginPassword", "bearerFormat": "/api/auth/login|X-Authorization" }, - "api_key_form": { + "ApiKeyForm": { "type": "apiKey", "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey \u003Cyour_api_key_value\u003E**\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n\u003Cbr\u003E**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.\u003Cbr\u003E\n", "name": "X-Authorization", diff --git a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 762bdc8e..5452dbcb 100644 --- a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -3819,129 +3819,6 @@ private HttpRequest.Builder checkUpdatesRequestBuilder(Map heade return localVarRequestBuilder; } - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDevice(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDeviceWithHttpInfo(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceToken, body, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - // verify the required parameter 'deviceToken' is set - if (deviceToken == null) { - throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling claimDevice"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/claim" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Claim device (claimDevice) * Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). @@ -3951,8 +3828,8 @@ private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1(deviceName, subCustomerId, claimRequest, null); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDevice(deviceName, subCustomerId, claimRequest, null); } /** @@ -3965,8 +3842,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDevice1WithHttpInfo(deviceName, subCustomerId, claimRequest, headers); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceName, subCustomerId, claimRequest, headers); return localVarResponse.getData(); } @@ -3979,8 +3856,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1WithHttpInfo(deviceName, subCustomerId, claimRequest, null); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDeviceWithHttpInfo(deviceName, subCustomerId, claimRequest, null); } /** @@ -3993,8 +3870,8 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDevice1RequestBuilder(deviceName, subCustomerId, claimRequest, headers); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceName, subCustomerId, claimRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -4005,7 +3882,7 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice1", localVarResponse); + throw getApiException("claimDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -4041,10 +3918,10 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St } } - private HttpRequest.Builder claimDevice1RequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable String subCustomerId, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { // verify the required parameter 'deviceName' is set if (deviceName == null) { - throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice1"); + throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -4359,134 +4236,6 @@ private HttpRequest.Builder clearEventsRequestBuilder(@javax.annotation.Nonnull return localVarRequestBuilder; } - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @throws ApiException if fails to make API call - */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - codeProcessingUrl(code, state, null); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - codeProcessingUrlWithHttpInfo(code, state, headers); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - return codeProcessingUrlWithHttpInfo(code, state, null); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = codeProcessingUrlRequestBuilder(code, state, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("codeProcessingUrl", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder codeProcessingUrlRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - // verify the required parameter 'code' is set - if (code == null) { - throw new ApiException(400, "Missing the required parameter 'code' when calling codeProcessingUrl"); - } - // verify the required parameter 'state' is set - if (state == null) { - throw new ApiException(400, "Missing the required parameter 'state' when calling codeProcessingUrl"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/admin/mail/oauth2/code"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "code"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); - localVarQueryParameterBaseName = "state"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Compare entity data to version (compareEntityDataToVersion) * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. @@ -8830,6 +8579,110 @@ private HttpRequest.Builder deleteEntityViewRequestBuilder(@javax.annotation.Non return localVarRequestBuilder; } + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths) throws ApiException { + deleteGeneralUserSettings(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + deleteGeneralUserSettingsWithHttpInfo(paths, headers); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { + return deleteGeneralUserSettingsWithHttpInfo(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteGeneralUserSettingsRequestBuilder(paths, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteGeneralUserSettings", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteGeneralUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + // verify the required parameter 'paths' is set + if (paths == null) { + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteGeneralUserSettings"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/user/settings/{paths}" + .replace("{paths}", ApiClient.urlEncode(paths.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Delete group permission (deleteGroupPermission) * Deletes the group permission. Referencing non-existing group permission Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). @@ -10337,10 +10190,11 @@ private HttpRequest.Builder deleteQueueRequestBuilder(@javax.annotation.Nonnull * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } /** @@ -10353,10 +10207,12 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse localVarResponse = deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + return localVarResponse.getData(); } /** @@ -10368,10 +10224,10 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { return deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } @@ -10385,10 +10241,10 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = deleteRelationRequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -10403,173 +10259,6 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St throw getApiException("deleteRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelation"); - } - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelation"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelation"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelation"); - } - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "fromId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromId", fromId)); - localVarQueryParameterBaseName = "fromType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromType", fromType)); - localVarQueryParameterBaseName = "relationType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationType", relationType)); - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - localVarQueryParameterBaseName = "toId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toId", toId)); - localVarQueryParameterBaseName = "toType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toType", toType)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse localVarResponse = deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteRelationV2RequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -10603,26 +10292,26 @@ public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { // verify the required parameter 'fromId' is set if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelation"); } // verify the required parameter 'fromType' is set if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelation"); } // verify the required parameter 'relationType' is set if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelation"); } // verify the required parameter 'toId' is set if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelation"); } // verify the required parameter 'toType' is set if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -10671,7 +10360,7 @@ private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Non } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -10682,7 +10371,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -10694,7 +10383,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -10706,7 +10395,7 @@ public ApiResponse deleteRelationsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -12217,42 +11906,42 @@ private HttpRequest.Builder deleteUserRequestBuilder(@javax.annotation.Nonnull S } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - deleteUserSettings(paths, type, null); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + deleteUserSettingsByType(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - deleteUserSettingsWithHttpInfo(paths, type, headers); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + deleteUserSettingsByTypeWithHttpInfo(paths, type, headers); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - return deleteUserSettingsWithHttpInfo(paths, type, null); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + return deleteUserSettingsByTypeWithHttpInfo(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) @@ -12260,8 +11949,8 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsRequestBuilder(paths, type, headers); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsByTypeRequestBuilder(paths, type, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -12272,7 +11961,7 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings", localVarResponse); + throw getApiException("deleteUserSettingsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -12297,14 +11986,14 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + private HttpRequest.Builder deleteUserSettingsByTypeRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { // verify the required parameter 'paths' is set if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettingsByType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettingsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -12330,47 +12019,43 @@ private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.N } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @throws ApiException if fails to make API call */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths) throws ApiException { - deleteUserSettings1(paths, null); + public void deleteWebSelfRegistrationParams() throws ApiException { + deleteWebSelfRegistrationParams(null); } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - deleteUserSettings1WithHttpInfo(paths, headers); + public void deleteWebSelfRegistrationParams(Map headers) throws ApiException { + deleteWebSelfRegistrationParamsWithHttpInfo(headers); } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { - return deleteUserSettings1WithHttpInfo(paths, null); + public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo() throws ApiException { + return deleteWebSelfRegistrationParamsWithHttpInfo(null); } /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) + * deleteWebSelfRegistrationParams + * * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettings1RequestBuilder(paths, headers); + public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteWebSelfRegistrationParamsRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -12381,7 +12066,7 @@ public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings1", localVarResponse); + throw getApiException("deleteWebSelfRegistrationParams", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -12406,16 +12091,11 @@ public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder deleteUserSettings1RequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - // verify the required parameter 'paths' is set - if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings1"); - } + private HttpRequest.Builder deleteWebSelfRegistrationParamsRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/user/settings/{paths}" - .replace("{paths}", ApiClient.urlEncode(paths.toString())); + String localVarPath = "/api/selfRegistration/selfRegistrationParams"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -12434,43 +12114,47 @@ private HttpRequest.Builder deleteUserSettings1RequestBuilder(@javax.annotation. } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @throws ApiException if fails to make API call */ - public void deleteWebSelfRegistrationParams() throws ApiException { - deleteWebSelfRegistrationParams(null); + public void deleteWidgetType(@javax.annotation.Nonnull String widgetTypeId) throws ApiException { + deleteWidgetType(widgetTypeId, null); } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteWebSelfRegistrationParams(Map headers) throws ApiException { - deleteWebSelfRegistrationParamsWithHttpInfo(headers); + public void deleteWidgetType(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { + deleteWidgetTypeWithHttpInfo(widgetTypeId, headers); } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo() throws ApiException { - return deleteWebSelfRegistrationParamsWithHttpInfo(null); + public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId) throws ApiException { + return deleteWidgetTypeWithHttpInfo(widgetTypeId, null); } /** - * deleteWebSelfRegistrationParams - * + * Delete widget type (deleteWidgetType) + * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteWebSelfRegistrationParamsRequestBuilder(headers); + public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteWidgetTypeRequestBuilder(widgetTypeId, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -12481,7 +12165,7 @@ public ApiResponse deleteWebSelfRegistrationParamsWithHttpInfo(Map deleteWebSelfRegistrationParamsWithHttpInfo(Map headers) throws ApiException { + private HttpRequest.Builder deleteWidgetTypeRequestBuilder(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { + // verify the required parameter 'widgetTypeId' is set + if (widgetTypeId == null) { + throw new ApiException(400, "Missing the required parameter 'widgetTypeId' when calling deleteWidgetType"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/selfRegistration/selfRegistrationParams"; + String localVarPath = "/api/widgetType/{widgetTypeId}" + .replace("{widgetTypeId}", ApiClient.urlEncode(widgetTypeId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -12529,47 +12218,47 @@ private HttpRequest.Builder deleteWebSelfRegistrationParamsRequestBuilder(Map headers) throws ApiException { - deleteWidgetTypeWithHttpInfo(widgetTypeId, headers); + public void deleteWidgetsBundle(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + deleteWidgetsBundleWithHttpInfo(widgetsBundleId, headers); } /** - * Delete widget type (deleteWidgetType) - * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Delete widgets bundle (deleteWidgetsBundle) + * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId) throws ApiException { - return deleteWidgetTypeWithHttpInfo(widgetTypeId, null); + public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return deleteWidgetsBundleWithHttpInfo(widgetsBundleId, null); } /** - * Delete widget type (deleteWidgetType) - * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetTypeId A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Delete widgets bundle (deleteWidgetsBundle) + * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteWidgetTypeRequestBuilder(widgetTypeId, headers); + public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteWidgetsBundleRequestBuilder(widgetsBundleId, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -12580,111 +12269,7 @@ public ApiResponse deleteWidgetTypeWithHttpInfo(@javax.annotation.Nonnull InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteWidgetType", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteWidgetTypeRequestBuilder(@javax.annotation.Nonnull String widgetTypeId, Map headers) throws ApiException { - // verify the required parameter 'widgetTypeId' is set - if (widgetTypeId == null) { - throw new ApiException(400, "Missing the required parameter 'widgetTypeId' when calling deleteWidgetType"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/widgetType/{widgetTypeId}" - .replace("{widgetTypeId}", ApiClient.urlEncode(widgetTypeId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @throws ApiException if fails to make API call - */ - public void deleteWidgetsBundle(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - deleteWidgetsBundle(widgetsBundleId, null); - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void deleteWidgetsBundle(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - deleteWidgetsBundleWithHttpInfo(widgetsBundleId, headers); - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return deleteWidgetsBundleWithHttpInfo(widgetsBundleId, null); - } - - /** - * Delete widgets bundle (deleteWidgetsBundle) - * Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteWidgetsBundleWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteWidgetsBundleRequestBuilder(widgetsBundleId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteWidgetsBundle", localVarResponse); + throw getApiException("deleteWidgetsBundle", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -14757,7 +14342,7 @@ private HttpRequest.Builder downloadResourceRequestBuilder(@javax.annotation.Non } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -14771,7 +14356,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -14787,7 +14372,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -14801,7 +14386,7 @@ public ApiResponse downloadResourceIfChangedWithHttpInfo(@javax.annotation } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -16059,70 +15644,50 @@ private HttpRequest.Builder findAllRelatedEdgesMissingAttributesRequestBuilder(@ } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) - * @return AvailableEntityKeys + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) + * @return List<Asset> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { - return findAvailableEntityKeysByQuery(timeseries, attributes, entityDataQuery, scope, null); + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQuery(assetSearchQuery, null); } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) * @param headers Optional headers to include in the request - * @return AvailableEntityKeys + * @return List<Asset> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { - ApiResponse localVarResponse = findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, headers); + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findAssetsByQueryWithHttpInfo(assetSearchQuery, headers); return localVarResponse.getData(); } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) - * @return ApiResponse<AvailableEntityKeys> + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) + * @return ApiResponse<List<Asset>> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { - return findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, null); + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQueryWithHttpInfo(assetSearchQuery, null); } /** - * Find Available Entity Keys by Query (deprecated) - * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) - * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) - * @param entityDataQuery (required) - * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param assetSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<AvailableEntityKeys> + * @return ApiResponse<List<Asset>> * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryRequestBuilder(timeseries, attributes, entityDataQuery, scope, headers); + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAssetsByQueryRequestBuilder(assetSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16133,11 +15698,11 @@ public ApiResponse findAvailableEntityKeysByQueryWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findAvailableEntityKeysByQuery", localVarResponse); + throw getApiException("findAssetsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -16147,10 +15712,10 @@ public ApiResponse findAvailableEntityKeysByQueryWithHttpIn String responseBody = new String(localVarResponseBody.readAllBytes()); - AvailableEntityKeys responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -16169,50 +15734,23 @@ public ApiResponse findAvailableEntityKeysByQueryWithHttpIn } } - private HttpRequest.Builder findAvailableEntityKeysByQueryRequestBuilder(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { - // verify the required parameter 'timeseries' is set - if (timeseries == null) { - throw new ApiException(400, "Missing the required parameter 'timeseries' when calling findAvailableEntityKeysByQuery"); - } - // verify the required parameter 'attributes' is set - if (attributes == null) { - throw new ApiException(400, "Missing the required parameter 'attributes' when calling findAvailableEntityKeysByQuery"); - } - // verify the required parameter 'entityDataQuery' is set - if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQuery"); + private HttpRequest.Builder findAssetsByQueryRequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'assetSearchQuery' is set + if (assetSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findAssetsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entitiesQuery/find/keys"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "timeseries"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("timeseries", timeseries)); - localVarQueryParameterBaseName = "attributes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("attributes", attributes)); - localVarQueryParameterBaseName = "scope"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); + String localVarPath = "/api/assets"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -16229,66 +15767,70 @@ private HttpRequest.Builder findAvailableEntityKeysByQueryRequestBuilder(@javax. } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) - * @return AvailableEntityKeysV2 + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * @return AvailableEntityKeys * @throws ApiException if fails to make API call + * @deprecated */ - public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { - return findAvailableEntityKeysByQueryV2(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); + @Deprecated + public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { + return findAvailableEntityKeysByQuery(timeseries, attributes, entityDataQuery, scope, null); } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) * @param headers Optional headers to include in the request - * @return AvailableEntityKeysV2 + * @return AvailableEntityKeys * @throws ApiException if fails to make API call + * @deprecated */ - public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { - ApiResponse localVarResponse = findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); + @Deprecated + public AvailableEntityKeys findAvailableEntityKeysByQuery(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { + ApiResponse localVarResponse = findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, headers); return localVarResponse.getData(); } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) - * @return ApiResponse<AvailableEntityKeysV2> + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) + * @return ApiResponse<AvailableEntityKeys> * @throws ApiException if fails to make API call + * @deprecated */ - public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { - return findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); + @Deprecated + public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope) throws ApiException { + return findAvailableEntityKeysByQueryWithHttpInfo(timeseries, attributes, entityDataQuery, scope, null); } /** - * Find Available Entity Keys By Query - * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Find Available Entity Keys by Query (deprecated) + * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param timeseries When true, includes unique time series key names in the response. When false, the 'timeseries' list will be empty. (required) + * @param attributes When true, includes unique attribute key names in the response. When false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope. (required) * @param entityDataQuery (required) - * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) - * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) - * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @param scope Filters attribute keys by scope. Only applies when 'attributes' is true. If not specified, returns attribute keys from all scopes. (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<AvailableEntityKeysV2> + * @return ApiResponse<AvailableEntityKeys> * @throws ApiException if fails to make API call + * @deprecated */ - public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryV2RequestBuilder(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); + @Deprecated + public ApiResponse findAvailableEntityKeysByQueryWithHttpInfo(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryRequestBuilder(timeseries, attributes, entityDataQuery, scope, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16299,11 +15841,11 @@ public ApiResponse findAvailableEntityKeysByQueryV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findAvailableEntityKeysByQueryV2", localVarResponse); + throw getApiException("findAvailableEntityKeysByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -16313,10 +15855,10 @@ public ApiResponse findAvailableEntityKeysByQueryV2WithHt String responseBody = new String(localVarResponseBody.readAllBytes()); - AvailableEntityKeysV2 responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + AvailableEntityKeys responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -16335,27 +15877,33 @@ public ApiResponse findAvailableEntityKeysByQueryV2WithHt } } - private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + private HttpRequest.Builder findAvailableEntityKeysByQueryRequestBuilder(@javax.annotation.Nonnull Boolean timeseries, @javax.annotation.Nonnull Boolean attributes, @javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable String scope, Map headers) throws ApiException { + // verify the required parameter 'timeseries' is set + if (timeseries == null) { + throw new ApiException(400, "Missing the required parameter 'timeseries' when calling findAvailableEntityKeysByQuery"); + } + // verify the required parameter 'attributes' is set + if (attributes == null) { + throw new ApiException(400, "Missing the required parameter 'attributes' when calling findAvailableEntityKeysByQuery"); + } // verify the required parameter 'entityDataQuery' is set if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQueryV2"); + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/v2/entitiesQuery/find/keys"; + String localVarPath = "/api/entitiesQuery/find/keys"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "includeTimeseries"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeTimeseries", includeTimeseries)); - localVarQueryParameterBaseName = "includeAttributes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeAttributes", includeAttributes)); - localVarQueryParameterBaseName = "scopes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scopes", scopes)); - localVarQueryParameterBaseName = "includeSamples"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("includeSamples", includeSamples)); + localVarQueryParameterBaseName = "timeseries"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("timeseries", timeseries)); + localVarQueryParameterBaseName = "attributes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("attributes", attributes)); + localVarQueryParameterBaseName = "scope"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -16389,62 +15937,66 @@ private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@java } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @return AvailableEntityKeysV2 * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); + public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { + return findAvailableEntityKeysByQueryV2(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return AvailableEntityKeysV2 * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); + public AvailableEntityKeysV2 findAvailableEntityKeysByQueryV2(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + ApiResponse localVarResponse = findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) + * @return ApiResponse<AvailableEntityKeysV2> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); + public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples) throws ApiException { + return findAvailableEntityKeysByQueryV2WithHttpInfo(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find Available Entity Keys By Query + * Discovers unique time series and/or attribute key names available on entities that match the given query. Works in two steps: first, the request body (an Entity Data Query) is executed to find matching entities (page size is capped at 100); then, all distinct key names are collected from those entities. Optionally, each key can include a sample — the most recent value (by timestamp) for that key across all matched entities. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityDataQuery (required) + * @param includeTimeseries When true, includes unique time series keys in the response. When false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param includeAttributes When true, includes unique attribute keys in the response. When false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true. (optional, default to true) + * @param scopes Filters attribute keys by scope. Only applies when 'includeAttributes' is true. When not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities, server scope only for other entity types. (optional) + * @param includeSamples When true, each key entry includes a 'sample' object with the most recent value and timestamp. When false, only key names are returned (sample is omitted from JSON). (optional, default to false) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<AvailableEntityKeysV2> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); + public ApiResponse findAvailableEntityKeysByQueryV2WithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAvailableEntityKeysByQueryV2RequestBuilder(entityDataQuery, includeTimeseries, includeAttributes, scopes, includeSamples, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16455,11 +16007,11 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromAndRelationType", localVarResponse); + throw getApiException("findAvailableEntityKeysByQueryV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -16469,10 +16021,10 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + AvailableEntityKeysV2 responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -16491,32 +16043,27 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ } } - private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromAndRelationType"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromAndRelationType"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByFromAndRelationType"); + private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, @javax.annotation.Nullable Boolean includeTimeseries, @javax.annotation.Nullable Boolean includeAttributes, @javax.annotation.Nullable String scopes, @javax.annotation.Nullable Boolean includeSamples, Map headers) throws ApiException { + // verify the required parameter 'entityDataQuery' is set + if (entityDataQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findAvailableEntityKeysByQueryV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); + String localVarPath = "/api/v2/entitiesQuery/find/keys"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + localVarQueryParameterBaseName = "includeTimeseries"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeTimeseries", includeTimeseries)); + localVarQueryParameterBaseName = "includeAttributes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeAttributes", includeAttributes)); + localVarQueryParameterBaseName = "scopes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scopes", scopes)); + localVarQueryParameterBaseName = "includeSamples"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeSamples", includeSamples)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -16529,9 +16076,15 @@ private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annot localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -16544,58 +16097,50 @@ private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annot } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2(fromType, fromId, relationTypeGroup, null); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQuery(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findDevicesByQueryWithHttpInfo(deviceSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQueryWithHttpInfo(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findDevicesByQueryRequestBuilder(deviceSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16606,11 +16151,11 @@ public ApiResponse> findByFromV2WithHttpInfo(@javax.annotat InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromV2", localVarResponse); + throw getApiException("findDevicesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -16620,10 +16165,10 @@ public ApiResponse> findByFromV2WithHttpInfo(@javax.annotat String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -16642,42 +16187,27 @@ public ApiResponse> findByFromV2WithHttpInfo(@javax.annotat } } - private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromV2"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromV2"); + private HttpRequest.Builder findDevicesByQueryRequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'deviceSearchQuery' is set + if (deviceSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findDevicesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/devices"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -16690,50 +16220,54 @@ private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return List<EntityRelation> + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * @return String * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQuery(entityRelationsQuery, null); + public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { + return findEdgeMissingAttributes(edgeId, integrationIds, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return String * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQueryWithHttpInfo(entityRelationsQuery, headers); + public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + ApiResponse localVarResponse = findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, headers); return localVarResponse.getData(); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelation>> + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { + return findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) + * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. + * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEdgeMissingAttributesRequestBuilder(edgeId, integrationIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16744,11 +16278,11 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery", localVarResponse); + throw getApiException("findEdgeMissingAttributes", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -16758,10 +16292,10 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -16780,27 +16314,41 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findByQuery"); + private HttpRequest.Builder findEdgeMissingAttributesRequestBuilder(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + // verify the required parameter 'edgeId' is set + if (edgeId == null) { + throw new ApiException(400, "Missing the required parameter 'edgeId' when calling findEdgeMissingAttributes"); + } + // verify the required parameter 'integrationIds' is set + if (integrationIds == null) { + throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling findEdgeMissingAttributes"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations"; + String localVarPath = "/api/edge/integration/{edgeId}/missingAttributes" + .replace("{edgeId}", ApiClient.urlEncode(edgeId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "integrationIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "integrationIds", integrationIds)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -16813,50 +16361,50 @@ private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return List<EntityView> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1(entityViewSearchQuery, null); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQuery(edgeSearchQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityView> + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery1WithHttpInfo(entityViewSearchQuery, headers); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEdgesByQueryWithHttpInfo(edgeSearchQuery, headers); return localVarResponse.getData(); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return ApiResponse<List<EntityView>> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1WithHttpInfo(entityViewSearchQuery, null); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQueryWithHttpInfo(edgeSearchQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityView>> + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery1RequestBuilder(entityViewSearchQuery, headers); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEdgesByQueryRequestBuilder(edgeSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16867,11 +16415,11 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery1", localVarResponse); + throw getApiException("findEdgesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -16881,10 +16429,10 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -16903,15 +16451,15 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'entityViewSearchQuery' is set - if (entityViewSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findByQuery1"); + private HttpRequest.Builder findEdgesByQueryRequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'edgeSearchQuery' is set + if (edgeSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findEdgesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entityViews"; + String localVarPath = "/api/edges"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -16919,7 +16467,7 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -16936,50 +16484,50 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return List<Edge> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2(edgeSearchQuery, null); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQuery(entityDataQuery, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return List<Edge> + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery2WithHttpInfo(edgeSearchQuery, headers); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); return localVarResponse.getData(); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return ApiResponse<List<Edge>> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2WithHttpInfo(edgeSearchQuery, null); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Edge>> + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery2RequestBuilder(edgeSearchQuery, headers); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16990,11 +16538,11 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery2", localVarResponse); + throw getApiException("findEntityDataByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17004,10 +16552,10 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17026,15 +16574,15 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'edgeSearchQuery' is set - if (edgeSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findByQuery2"); + private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + // verify the required parameter 'entityDataQuery' is set + if (entityDataQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edges"; + String localVarPath = "/api/entitiesQuery/find"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -17042,7 +16590,7 @@ private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -17059,50 +16607,58 @@ private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) - * @return List<Device> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3(deviceSearchQuery, null); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<Device> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery3WithHttpInfo(deviceSearchQuery, headers); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) - * @return ApiResponse<List<Device>> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3WithHttpInfo(deviceSearchQuery, null); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param deviceSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Device>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery3RequestBuilder(deviceSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17113,11 +16669,11 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery3", localVarResponse); + throw getApiException("findEntityRelationInfosByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17127,10 +16683,10 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17149,27 +16705,42 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn } } - private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'deviceSearchQuery' is set - if (deviceSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findByQuery3"); + private HttpRequest.Builder findEntityRelationInfosByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationInfosByFrom"); + } + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationInfosByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/devices"; + String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -17182,50 +16753,50 @@ private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) - * @return List<Asset> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4(assetSearchQuery, null); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQuery(entityRelationsQuery, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return List<Asset> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery4WithHttpInfo(assetSearchQuery, headers); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) - * @return ApiResponse<List<Asset>> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4WithHttpInfo(assetSearchQuery, null); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param assetSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Asset>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery4RequestBuilder(assetSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17236,11 +16807,11 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery4", localVarResponse); + throw getApiException("findEntityRelationInfosByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17250,10 +16821,10 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17272,15 +16843,15 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'assetSearchQuery' is set - if (assetSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findByQuery4"); + private HttpRequest.Builder findEntityRelationInfosByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationInfosByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/assets"; + String localVarPath = "/api/relations/info"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -17288,7 +16859,7 @@ private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -17305,62 +16876,58 @@ private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByTo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17371,11 +16938,11 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToAndRelationType", localVarResponse); + throw getApiException("findEntityRelationInfosByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17385,10 +16952,10 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17407,26 +16974,21 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja } } - private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + private HttpRequest.Builder findEntityRelationInfosByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { // verify the required parameter 'toType' is set if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToAndRelationType"); + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationInfosByTo"); } // verify the required parameter 'toId' is set if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToAndRelationType"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByToAndRelationType"); + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationInfosByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" + String localVarPath = "/api/relations/info/to/{toType}/{toId}" .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); + .replace("{toId}", ApiClient.urlEncode(toId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -17460,58 +17022,58 @@ private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotat } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2(toType, toId, relationTypeGroup, null); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17522,7 +17084,7 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToV2", localVarResponse); + throw getApiException("findEntityRelationsByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -17558,21 +17120,21 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToV2"); + private HttpRequest.Builder findEntityRelationsByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFrom"); } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToV2"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -17606,54 +17168,62 @@ private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull S } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) - * @return String + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { - return findEdgeMissingAttributes(edgeId, integrationIds, null); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return String + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public String findEdgeMissingAttributes(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - ApiResponse localVarResponse = findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, headers); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) - * @return ApiResponse<String> + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds) throws ApiException { - return findEdgeMissingAttributesWithHttpInfo(edgeId, integrationIds, null); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) - * Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. - * @param edgeId A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param integrationIds A list of assigned integration ids, separated by comma ',' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<String> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findEdgeMissingAttributesRequestBuilder(edgeId, integrationIds, headers); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17664,11 +17234,11 @@ public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findEdgeMissingAttributes", localVarResponse); + throw getApiException("findEntityRelationsByFromAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17678,10 +17248,10 @@ public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17700,26 +17270,32 @@ public ApiResponse findEdgeMissingAttributesWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder findEdgeMissingAttributesRequestBuilder(@javax.annotation.Nonnull String edgeId, @javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - // verify the required parameter 'edgeId' is set - if (edgeId == null) { - throw new ApiException(400, "Missing the required parameter 'edgeId' when calling findEdgeMissingAttributes"); + private HttpRequest.Builder findEntityRelationsByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFromAndRelationType"); } - // verify the required parameter 'integrationIds' is set - if (integrationIds == null) { - throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling findEdgeMissingAttributes"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFromAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByFromAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edge/integration/{edgeId}/missingAttributes" - .replace("{edgeId}", ApiClient.urlEncode(edgeId.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "integrationIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "integrationIds", integrationIds)); + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -17747,50 +17323,50 @@ private HttpRequest.Builder findEdgeMissingAttributesRequestBuilder(@javax.annot } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return PageDataEntityData + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQuery(entityDataQuery, null); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQuery(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return PageDataEntityData + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return ApiResponse<PageDataEntityData> + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` 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 Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Group Entities Filter Allows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"entityGroup\", \"groupType\": \"DEVICE\", \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Group List Filter Return multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entityGroupList\", \"groupType\": \"DEVICE\", \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"] } ``` ## Group Name Filter Allows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT': ```json { \"type\": \"entityGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"CAT\" } ``` ## Entities by Group Name Filter Allows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters': ```json { \"type\": \"entitiesByGroupName\", \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"entitiesByGroupName\", \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"}, \"groupType\": \"DEVICE\", \"entityGroupNameFilter\": \"Water Meters\" } ``` ## Entity owner Filter Allows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': ```json { \"type\": \"stateEntityOwner\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEntityData> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17801,11 +17377,11 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findEntityDataByQuery", localVarResponse); + throw getApiException("findEntityRelationsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17815,10 +17391,10 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17837,15 +17413,15 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - // verify the required parameter 'entityDataQuery' is set - if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); + private HttpRequest.Builder findEntityRelationsByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entitiesQuery/find"; + String localVarPath = "/api/relations"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -17853,7 +17429,7 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -17870,58 +17446,58 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2(fromType, fromId, relationTypeGroup, null); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByTo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -17932,11 +17508,11 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByFromV2", localVarResponse); + throw getApiException("findEntityRelationsByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -17946,10 +17522,10 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -17968,21 +17544,176 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax } } - private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findInfoByFromV2"); + private HttpRequest.Builder findEntityRelationsByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByTo"); } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findInfoByFromV2"); + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); + String localVarPath = "/api/relations/to/{toType}/{toId}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + + /** + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelation> + * @throws ApiException if fails to make API call + */ + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); + } + + /** + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @param headers Optional headers to include in the request + * @return List<EntityRelation> + * @throws ApiException if fails to make API call + */ + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); + return localVarResponse.getData(); + } + + /** + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelation>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); + } + + /** + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<EntityRelation>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("findEntityRelationsByToAndRelationType", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder findEntityRelationsByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByToAndRelationType"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -18016,50 +17747,50 @@ private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Non } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return List<EntityRelationInfo> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQuery(entityRelationsQuery, null); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQuery(entityViewSearchQuery, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByQueryWithHttpInfo(entityRelationsQuery, headers); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, headers); return localVarResponse.getData(); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelationInfo>> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityViewsByQueryRequestBuilder(entityViewSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18070,11 +17801,11 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByQuery", localVarResponse); + throw getApiException("findEntityViewsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -18084,10 +17815,10 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -18106,15 +17837,15 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findInfoByQuery"); + private HttpRequest.Builder findEntityViewsByQueryRequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'entityViewSearchQuery' is set + if (entityViewSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findEntityViewsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info"; + String localVarPath = "/api/entityViews"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -18122,7 +17853,7 @@ private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonn localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -18138,152 +17869,6 @@ private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonn return localVarRequestBuilder; } - /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> - * @throws ApiException if fails to make API call - */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2(toType, toId, relationTypeGroup, null); - } - - /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> - * @throws ApiException if fails to make API call - */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); - } - - /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByToV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder findInfoByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findInfoByToV2"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findInfoByToV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relations/info/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Find missing rule chains (findMissingToRelatedRuleChains) * 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. Available for users with 'TENANT_ADMIN' authority. @@ -18563,50 +18148,50 @@ private HttpRequest.Builder findOAuth2ClientInfosRequestBuilder(@javax.annotatio } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2(clientIds, null); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIds(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, headers); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, headers); return localVarResponse.getData(); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, null); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsV2RequestBuilder(clientIds, headers); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsRequestBuilder(clientIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18617,7 +18202,7 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findTenantOAuth2ClientInfosByIdsV2", localVarResponse); + throw getApiException("findTenantOAuth2ClientInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -18653,10 +18238,10 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit } } - private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsRequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { // verify the required parameter 'clientIds' is set if (clientIds == null) { - throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -20294,7 +19879,7 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -20312,12 +19897,12 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -20336,13 +19921,13 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - ApiResponse localVarResponse = getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + ApiResponse localVarResponse = getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); return localVarResponse.getData(); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -20360,12 +19945,12 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -20384,8 +19969,8 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAlarmsRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmsByEntityRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20396,7 +19981,7 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAlarms", localVarResponse); + throw getApiException("getAlarmsByEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20432,22 +20017,22 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder getAlarmsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + private HttpRequest.Builder getAlarmsByEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmsByEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmsByEntity"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmsByEntity"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmsByEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -22373,7 +21958,7 @@ private HttpRequest.Builder getAllEdgeSchedulerEventsRequestBuilder(@javax.annot } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -22386,7 +21971,7 @@ public List getAllEntityGroupsByOwnerAndType(@javax.annotation. } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -22401,7 +21986,7 @@ public List getAllEntityGroupsByOwnerAndType(@javax.annotation. } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -22414,7 +21999,7 @@ public ApiResponse> getAllEntityGroupsByOwnerAndTypeWithHt } /** - * Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList) + * Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType) * Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param ownerType Tenant or Customer (required) * @param ownerId A string value representing the Tenant or Customer id (required) @@ -22996,50 +22581,50 @@ private HttpRequest.Builder getAllReportTemplateInfosRequestBuilder(@javax.annot } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @return List<SchedulerEventWithCustomerInfo> * @throws ApiException if fails to make API call */ - public List getAllSchedulerEventsV2(@javax.annotation.Nullable String type) throws ApiException { - return getAllSchedulerEventsV2(type, null); + public List getAllSchedulerEvents(@javax.annotation.Nullable String type) throws ApiException { + return getAllSchedulerEvents(type, null); } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @param headers Optional headers to include in the request * @return List<SchedulerEventWithCustomerInfo> * @throws ApiException if fails to make API call */ - public List getAllSchedulerEventsV2(@javax.annotation.Nullable String type, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAllSchedulerEventsV2WithHttpInfo(type, headers); + public List getAllSchedulerEvents(@javax.annotation.Nullable String type, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllSchedulerEventsWithHttpInfo(type, headers); return localVarResponse.getData(); } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @return ApiResponse<List<SchedulerEventWithCustomerInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAllSchedulerEventsV2WithHttpInfo(@javax.annotation.Nullable String type) throws ApiException { - return getAllSchedulerEventsV2WithHttpInfo(type, null); + public ApiResponse> getAllSchedulerEventsWithHttpInfo(@javax.annotation.Nullable String type) throws ApiException { + return getAllSchedulerEventsWithHttpInfo(type, null); } /** - * Get all scheduler events (getAllSchedulerEventsV2) + * Get all scheduler events (getAllSchedulerEvents) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param type A string value representing the scheduler type. For example, 'generateReport' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<SchedulerEventWithCustomerInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAllSchedulerEventsV2WithHttpInfo(@javax.annotation.Nullable String type, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAllSchedulerEventsV2RequestBuilder(type, headers); + public ApiResponse> getAllSchedulerEventsWithHttpInfo(@javax.annotation.Nullable String type, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllSchedulerEventsRequestBuilder(type, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -23050,7 +22635,7 @@ public ApiResponse> getAllSchedulerEventsV2 InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAllSchedulerEventsV2", localVarResponse); + throw getApiException("getAllSchedulerEvents", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -23086,7 +22671,7 @@ public ApiResponse> getAllSchedulerEventsV2 } } - private HttpRequest.Builder getAllSchedulerEventsV2RequestBuilder(@javax.annotation.Nullable String type, Map headers) throws ApiException { + private HttpRequest.Builder getAllSchedulerEventsRequestBuilder(@javax.annotation.Nullable String type, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -23407,6 +22992,115 @@ private HttpRequest.Builder getAllUserInfosRequestBuilder(@javax.annotation.Nonn return localVarRequestBuilder; } + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return List<WidgetsBundle> + * @throws ApiException if fails to make API call + */ + public List getAllWidgetsBundles() throws ApiException { + return getAllWidgetsBundles(null); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return List<WidgetsBundle> + * @throws ApiException if fails to make API call + */ + public List getAllWidgetsBundles(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllWidgetsBundlesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return ApiResponse<List<WidgetsBundle>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllWidgetsBundlesWithHttpInfo() throws ApiException { + return getAllWidgetsBundlesWithHttpInfo(null); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetsBundle>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllWidgetsBundlesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllWidgetsBundlesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAllWidgetsBundles", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAllWidgetsBundlesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundles/all"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Permissions (getAllowedPermissions) * Returns a complex object that describes: * all possible (both granted and not granted) permissions for the authority of the user (Tenant or Customer); * all granted permissions for the user; The result impacts UI behavior and hides certain UI elements if user has no permissions to invoke the related operations. Nevertheless, all API calls check the permissions each time they are executed on the server side.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 response schema for more details. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -24576,50 +24270,50 @@ private HttpRequest.Builder getAssetProfilesRequestBuilder(@javax.annotation.Non } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2(assetProfileIds, null); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIds(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, headers); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAssetProfilesByIdsWithHttpInfo(assetProfileIds, headers); return localVarResponse.getData(); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, null); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIdsWithHttpInfo(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsV2RequestBuilder(assetProfileIds, headers); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsRequestBuilder(assetProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -24630,7 +24324,7 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAssetProfilesByIdsV2", localVarResponse); + throw getApiException("getAssetProfilesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -24666,10 +24360,10 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ } } - private HttpRequest.Builder getAssetProfilesByIdsV2RequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getAssetProfilesByIdsRequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { // verify the required parameter 'assetProfileIds' is set if (assetProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -26577,115 +26271,6 @@ private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation return localVarRequestBuilder; } - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return String - * @throws ApiException if fails to make API call - */ - public String getAuthorizationUrl() throws ApiException { - return getAuthorizationUrl(null); - } - - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String getAuthorizationUrl(Map headers) throws ApiException { - ApiResponse localVarResponse = getAuthorizationUrlWithHttpInfo(headers); - return localVarResponse.getData(); - } - - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuthorizationUrlWithHttpInfo() throws ApiException { - return getAuthorizationUrlWithHttpInfo(null); - } - - /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuthorizationUrlWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuthorizationUrlRequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuthorizationUrl", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getAuthorizationUrlRequestBuilder(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/admin/mail/oauth2/authorize"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/text, application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains) * Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. @@ -27232,46 +26817,46 @@ private HttpRequest.Builder getAvailableLocalesRequestBuilder(Map getAvailableTwoFaProviders() throws ApiException { - return getAvailableTwoFaProviders(null); + public List getAvailableTwoFaProviderInfos() throws ApiException { + return getAvailableTwoFaProviderInfos(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return List<TwoFaProviderInfo> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProvidersWithHttpInfo(headers); + public List getAvailableTwoFaProviderInfos(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderInfosWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo() throws ApiException { - return getAvailableTwoFaProvidersWithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderInfosWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProvidersRequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderInfosRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -27282,7 +26867,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders", localVarResponse); + throw getApiException("getAvailableTwoFaProviderInfos", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -27318,7 +26903,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn } } - private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderInfosRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -27341,46 +26926,46 @@ private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map getAvailableTwoFaProviders1() throws ApiException { - return getAvailableTwoFaProviders1(null); + public List getAvailableTwoFaProviderTypes() throws ApiException { + return getAvailableTwoFaProviderTypes(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return List<TwoFaProviderType> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders1(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProviders1WithHttpInfo(headers); + public List getAvailableTwoFaProviderTypes(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderTypesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo() throws ApiException { - return getAvailableTwoFaProviders1WithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderTypesWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviders1RequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderTypesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -27391,7 +26976,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders1", localVarResponse); + throw getApiException("getAvailableTwoFaProviderTypes", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -27427,7 +27012,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI } } - private HttpRequest.Builder getAvailableTwoFaProviders1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderTypesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -27628,50 +27213,50 @@ private HttpRequest.Builder getBlobEntitiesRequestBuilder(@javax.annotation.Nonn } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @return List<BlobEntityInfo> * @throws ApiException if fails to make API call */ - public List getBlobEntitiesByIdsV2(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { - return getBlobEntitiesByIdsV2(blobEntityIds, null); + public List getBlobEntitiesByIds(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { + return getBlobEntitiesByIds(blobEntityIds, null); } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<BlobEntityInfo> * @throws ApiException if fails to make API call */ - public List getBlobEntitiesByIdsV2(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getBlobEntitiesByIdsV2WithHttpInfo(blobEntityIds, headers); + public List getBlobEntitiesByIds(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getBlobEntitiesByIdsWithHttpInfo(blobEntityIds, headers); return localVarResponse.getData(); } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @return ApiResponse<List<BlobEntityInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { - return getBlobEntitiesByIdsV2WithHttpInfo(blobEntityIds, null); + public ApiResponse> getBlobEntitiesByIdsWithHttpInfo(@javax.annotation.Nonnull List blobEntityIds) throws ApiException { + return getBlobEntitiesByIdsWithHttpInfo(blobEntityIds, null); } /** - * Get Blob Entities By Ids (getBlobEntitiesByIdsV2) + * Get Blob Entities By Ids (getBlobEntitiesByIds) * Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param blobEntityIds A list of blob entity ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<BlobEntityInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getBlobEntitiesByIdsV2RequestBuilder(blobEntityIds, headers); + public ApiResponse> getBlobEntitiesByIdsWithHttpInfo(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getBlobEntitiesByIdsRequestBuilder(blobEntityIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -27682,7 +27267,7 @@ public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@jav InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getBlobEntitiesByIdsV2", localVarResponse); + throw getApiException("getBlobEntitiesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -27718,10 +27303,10 @@ public ApiResponse> getBlobEntitiesByIdsV2WithHttpInfo(@jav } } - private HttpRequest.Builder getBlobEntitiesByIdsV2RequestBuilder(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { + private HttpRequest.Builder getBlobEntitiesByIdsRequestBuilder(@javax.annotation.Nonnull List blobEntityIds, Map headers) throws ApiException { // verify the required parameter 'blobEntityIds' is set if (blobEntityIds == null) { - throw new ApiException(400, "Missing the required parameter 'blobEntityIds' when calling getBlobEntitiesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'blobEntityIds' when calling getBlobEntitiesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -28009,6 +27594,124 @@ private HttpRequest.Builder getBundleWidgetTypeFqnsRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypes(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getBundleWidgetTypesWithHttpInfo(widgetsBundleId, headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypesWithHttpInfo(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesRequestBuilder(widgetsBundleId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getBundleWidgetTypes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getBundleWidgetTypesRequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + // verify the required parameter 'widgetsBundleId' is set + if (widgetsBundleId == null) { + throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundle/{widgetsBundleId}/widgetTypes" + .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) * Returns an array of Widget Type Details objects that belong to specified Widget Bundle.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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -28335,124 +28038,6 @@ private HttpRequest.Builder getBundleWidgetTypesInfosRequestBuilder(@javax.annot return localVarRequestBuilder; } - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, headers); - return localVarResponse.getData(); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesV2RequestBuilder(widgetsBundleId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getBundleWidgetTypesV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getBundleWidgetTypesV2RequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - // verify the required parameter 'widgetsBundleId' is set - if (widgetsBundleId == null) { - throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypesV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" - .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Calculated Field (getCalculatedFieldById) * Fetch the Calculated Field object based on the provided Calculated Field Id. @@ -28920,7 +28505,7 @@ private HttpRequest.Builder getCalculatedFieldsRequestBuilder(@javax.annotation. } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -28933,12 +28518,12 @@ private HttpRequest.Builder getCalculatedFieldsRequestBuilder(@javax.annotation. * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -28952,13 +28537,13 @@ public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -28971,12 +28556,12 @@ public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) * Fetch the Calculated Fields based on the provided Entity Id. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -28990,8 +28575,8 @@ public ApiResponse getCalculatedFieldsByEntityIdV2WithH * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdV2RequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -29002,7 +28587,7 @@ public ApiResponse getCalculatedFieldsByEntityIdV2WithH InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCalculatedFieldsByEntityIdV2", localVarResponse); + throw getApiException("getCalculatedFieldsByEntityId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -29038,22 +28623,22 @@ public ApiResponse getCalculatedFieldsByEntityIdV2WithH } } - private HttpRequest.Builder getCalculatedFieldsByEntityIdV2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getCalculatedFieldsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityId"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityId"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityIdV2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -29103,123 +28688,14 @@ private HttpRequest.Builder getCalculatedFieldsByEntityIdV2RequestBuilder(@javax return localVarRequestBuilder; } - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return List<OAuth2ClientRegistrationTemplate> - * @throws ApiException if fails to make API call - */ - public List getClientRegistrationTemplates() throws ApiException { - return getClientRegistrationTemplates(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @param headers Optional headers to include in the request - * @return List<OAuth2ClientRegistrationTemplate> - * @throws ApiException if fails to make API call - */ - public List getClientRegistrationTemplates(Map headers) throws ApiException { - ApiResponse> localVarResponse = getClientRegistrationTemplatesWithHttpInfo(headers); - return localVarResponse.getData(); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo() throws ApiException { - return getClientRegistrationTemplatesWithHttpInfo(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @param headers Optional headers to include in the request - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplatesRequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/oauth2/config/template"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * Mail configuration template is set of default smtp settings for mail server that specific provider supports * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() throws ApiException { - return getClientRegistrationTemplates1(null); + public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates() throws ApiException { + return getClientRegistrationTemplates(null); } /** @@ -29229,8 +28705,8 @@ public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1(Map headers) throws ApiException { - ApiResponse localVarResponse = getClientRegistrationTemplates1WithHttpInfo(headers); + public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse localVarResponse = getClientRegistrationTemplatesWithHttpInfo(headers); return localVarResponse.getData(); } @@ -29240,8 +28716,8 @@ public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1(M * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo() throws ApiException { - return getClientRegistrationTemplates1WithHttpInfo(null); + public ApiResponse getClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getClientRegistrationTemplatesWithHttpInfo(null); } /** @@ -29251,8 +28727,8 @@ public ApiResponse getClientRegistratio * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplates1RequestBuilder(headers); + public ApiResponse getClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplatesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -29263,7 +28739,7 @@ public ApiResponse getClientRegistratio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates1", localVarResponse); + throw getApiException("getClientRegistrationTemplates", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -29299,7 +28775,7 @@ public ApiResponse getClientRegistratio } } - private HttpRequest.Builder getClientRegistrationTemplates1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -30005,50 +29481,50 @@ private HttpRequest.Builder getConvertersRequestBuilder(@javax.annotation.Nonnul } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @return List<Converter> * @throws ApiException if fails to make API call */ - public List getConvertersByIdsV2(@javax.annotation.Nonnull List converterIds) throws ApiException { - return getConvertersByIdsV2(converterIds, null); + public List getConvertersByIds(@javax.annotation.Nonnull List converterIds) throws ApiException { + return getConvertersByIds(converterIds, null); } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Converter> * @throws ApiException if fails to make API call */ - public List getConvertersByIdsV2(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getConvertersByIdsV2WithHttpInfo(converterIds, headers); + public List getConvertersByIds(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getConvertersByIdsWithHttpInfo(converterIds, headers); return localVarResponse.getData(); } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @return ApiResponse<List<Converter>> * @throws ApiException if fails to make API call */ - public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List converterIds) throws ApiException { - return getConvertersByIdsV2WithHttpInfo(converterIds, null); + public ApiResponse> getConvertersByIdsWithHttpInfo(@javax.annotation.Nonnull List converterIds) throws ApiException { + return getConvertersByIdsWithHttpInfo(converterIds, null); } /** - * Get Converters By Ids (getConvertersByIdsV2) + * Get Converters By Ids (getConvertersByIds) * Requested converters must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param converterIds A list of converter ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Converter>> * @throws ApiException if fails to make API call */ - public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getConvertersByIdsV2RequestBuilder(converterIds, headers); + public ApiResponse> getConvertersByIdsWithHttpInfo(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getConvertersByIdsRequestBuilder(converterIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30059,7 +29535,7 @@ public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getConvertersByIdsV2", localVarResponse); + throw getApiException("getConvertersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30095,10 +29571,10 @@ public ApiResponse> getConvertersByIdsV2WithHttpInfo(@javax.anno } } - private HttpRequest.Builder getConvertersByIdsV2RequestBuilder(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { + private HttpRequest.Builder getConvertersByIdsRequestBuilder(@javax.annotation.Nonnull List converterIds, Map headers) throws ApiException { // verify the required parameter 'converterIds' is set if (converterIds == null) { - throw new ApiException(400, "Missing the required parameter 'converterIds' when calling getConvertersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'converterIds' when calling getConvertersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -34055,50 +33531,50 @@ private HttpRequest.Builder getCustomersByEntityGroupIdRequestBuilder(@javax.ann } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2(customerIds, null); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIds(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getCustomersByIdsV2WithHttpInfo(customerIds, headers); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getCustomersByIdsWithHttpInfo(customerIds, headers); return localVarResponse.getData(); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2WithHttpInfo(customerIds, null); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIdsWithHttpInfo(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsV2RequestBuilder(customerIds, headers); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsRequestBuilder(customerIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -34109,7 +33585,7 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCustomersByIdsV2", localVarResponse); + throw getApiException("getCustomersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -34145,10 +33621,10 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota } } - private HttpRequest.Builder getCustomersByIdsV2RequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + private HttpRequest.Builder getCustomersByIdsRequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { // verify the required parameter 'customerIds' is set if (customerIds == null) { - throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -35989,50 +35465,50 @@ private HttpRequest.Builder getDeviceProfileInfosRequestBuilder(@javax.annotatio } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @return List<DeviceProfileInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2(deviceProfileIds, null); + public List getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIds(deviceProfileIds, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<DeviceProfileInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, headers); + public List getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, headers); return localVarResponse.getData(); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @return ApiResponse<List<DeviceProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, null); + public ApiResponse> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) + * Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) * Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param deviceProfileIds A list of device profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<DeviceProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsV2RequestBuilder(deviceProfileIds, headers); + public ApiResponse> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsRequestBuilder(deviceProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -36043,7 +35519,7 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDeviceProfileInfosByIdsV2", localVarResponse); + throw getApiException("getDeviceProfileInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -36079,10 +35555,10 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp } } - private HttpRequest.Builder getDeviceProfileInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getDeviceProfileInfosByIdsRequestBuilder(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { // verify the required parameter 'deviceProfileIds' is set if (deviceProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileIds' when calling getDeviceProfileInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileIds' when calling getDeviceProfileInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -36248,6 +35724,134 @@ private HttpRequest.Builder getDeviceProfileNamesRequestBuilder(@javax.annotatio return localVarRequestBuilder; } + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeys(deviceProfileId, null); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param headers Optional headers to include in the request + * @return List<String> + * @throws ApiException if fails to make API call + */ + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, headers); + return localVarResponse.getData(); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @return ApiResponse<List<String>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, null); + } + + /** + * Get time series keys (getDeviceProfileTimeseriesKeys) + * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. + * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<String>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileTimeseriesKeysRequestBuilder(deviceProfileId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getDeviceProfileTimeseriesKeys", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getDeviceProfileTimeseriesKeysRequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "deviceProfileId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Device Profiles (getDeviceProfiles) * Returns a page of devices profile objects owned by tenant. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. @@ -41457,50 +41061,50 @@ private HttpRequest.Builder getEntityGroupPermissionsRequestBuilder(@javax.annot } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @return List<EntityGroupInfo> * @throws ApiException if fails to make API call */ - public List getEntityGroupsByIdsV2(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { - return getEntityGroupsByIdsV2(entityGroupIds, null); + public List getEntityGroupsByIds(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { + return getEntityGroupsByIds(entityGroupIds, null); } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<EntityGroupInfo> * @throws ApiException if fails to make API call */ - public List getEntityGroupsByIdsV2(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getEntityGroupsByIdsV2WithHttpInfo(entityGroupIds, headers); + public List getEntityGroupsByIds(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getEntityGroupsByIdsWithHttpInfo(entityGroupIds, headers); return localVarResponse.getData(); } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @return ApiResponse<List<EntityGroupInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { - return getEntityGroupsByIdsV2WithHttpInfo(entityGroupIds, null); + public ApiResponse> getEntityGroupsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityGroupIds) throws ApiException { + return getEntityGroupsByIdsWithHttpInfo(entityGroupIds, null); } /** - * Get Entity Groups by Ids (getEntityGroupsByIdsV2) + * Get Entity Groups by Ids (getEntityGroupsByIds) * Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. * @param entityGroupIds A list of group ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityGroupInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEntityGroupsByIdsV2RequestBuilder(entityGroupIds, headers); + public ApiResponse> getEntityGroupsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEntityGroupsByIdsRequestBuilder(entityGroupIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -41511,7 +41115,7 @@ public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@ja InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEntityGroupsByIdsV2", localVarResponse); + throw getApiException("getEntityGroupsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -41547,10 +41151,10 @@ public ApiResponse> getEntityGroupsByIdsV2WithHttpInfo(@ja } } - private HttpRequest.Builder getEntityGroupsByIdsV2RequestBuilder(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { + private HttpRequest.Builder getEntityGroupsByIdsRequestBuilder(@javax.annotation.Nonnull List entityGroupIds, Map headers) throws ApiException { // verify the required parameter 'entityGroupIds' is set if (entityGroupIds == null) { - throw new ApiException(400, "Missing the required parameter 'entityGroupIds' when calling getEntityGroupsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'entityGroupIds' when calling getEntityGroupsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -42779,218 +42383,50 @@ private HttpRequest.Builder getEntityViewsByEntityGroupIdRequestBuilder(@javax.a } /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @return List<EntityView> - * @throws ApiException if fails to make API call - */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2(entityViewIds, null); - } - - /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return List<EntityView> - * @throws ApiException if fails to make API call - */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getEntityViewsByIdsV2WithHttpInfo(entityViewIds, headers); - return localVarResponse.getData(); - } - - /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @return ApiResponse<List<EntityView>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2WithHttpInfo(entityViewIds, null); - } - - /** - * Get Entity Views By Ids (getEntityViewsByIds) - * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param entityViewIds A list of entity view ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityView>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsV2RequestBuilder(entityViewIds, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEntityViewsByIdsV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getEntityViewsByIdsV2RequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - // verify the required parameter 'entityViewIds' is set - if (entityViewIds == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIdsV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/entityViews/list"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "entityViewIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "entityViewIds", entityViewIds)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return PageDataEventInfo + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIds(entityViewIds, null); } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return PageDataEventInfo + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getEntityViewsByIdsWithHttpInfo(entityViewIds, headers); return localVarResponse.getData(); } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return ApiResponse<PageDataEventInfo> + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIdsWithHttpInfo(entityViewIds, null); } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. 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 response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) + * Get Entity Views By Ids (getEntityViewsByIds) + * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEventInfo> + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEventsRequestBuilder(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsRequestBuilder(entityViewIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -43001,11 +42437,11 @@ public ApiResponse getEventsWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents", localVarResponse); + throw getApiException("getEntityViewsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -43015,10 +42451,10 @@ public ApiResponse getEventsWithHttpInfo(@javax.annotation.No String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEventInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -43037,53 +42473,21 @@ public ApiResponse getEventsWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents"); - } - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents"); + private HttpRequest.Builder getEntityViewsByIdsRequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + // verify the required parameter 'entityViewIds' is set + if (entityViewIds == null) { + throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/events/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); + String localVarPath = "/api/entityViews/list"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "tenantId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("tenantId", tenantId)); - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "entityViewIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "entityViewIds", entityViewIds)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -43111,7 +42515,7 @@ private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull St } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43127,12 +42531,12 @@ private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull St * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43149,13 +42553,13 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43171,12 +42575,12 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. 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 response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identif ier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43193,8 +42597,8 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents1RequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByFilterRequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -43205,7 +42609,7 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents1", localVarResponse); + throw getApiException("getEventsByFilter", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -43241,30 +42645,30 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByFilterRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByFilter"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByFilter"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByFilter"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByFilter"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByFilter"); } // verify the required parameter 'eventFilter' is set if (eventFilter == null) { - throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEventsByFilter"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -43325,7 +42729,7 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43341,12 +42745,12 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43363,13 +42767,13 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43385,12 +42789,12 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. 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 response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -43407,8 +42811,8 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents2RequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByTypeRequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -43419,7 +42823,7 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents2", localVarResponse); + throw getApiException("getEventsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -43455,30 +42859,30 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByTypeRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByType"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByType"); } // verify the required parameter 'eventType' is set if (eventType == null) { - throw new ApiException(400, "Missing the required parameter 'eventType' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'eventType' when calling getEventsByType"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -44051,7 +43455,7 @@ private HttpRequest.Builder getFullTranslationRequestBuilder(@javax.annotation.N } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call @@ -44061,7 +43465,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() throws A } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode @@ -44073,7 +43477,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings(Map getGeneralUserSettin } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> @@ -46069,50 +45473,50 @@ private HttpRequest.Builder getIntegrationsRequestBuilder(@javax.annotation.Nonn } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @return List<Integration> * @throws ApiException if fails to make API call */ - public List getIntegrationsByIdsV2(@javax.annotation.Nonnull List integrationIds) throws ApiException { - return getIntegrationsByIdsV2(integrationIds, null); + public List getIntegrationsByIds(@javax.annotation.Nonnull List integrationIds) throws ApiException { + return getIntegrationsByIds(integrationIds, null); } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Integration> * @throws ApiException if fails to make API call */ - public List getIntegrationsByIdsV2(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getIntegrationsByIdsV2WithHttpInfo(integrationIds, headers); + public List getIntegrationsByIds(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getIntegrationsByIdsWithHttpInfo(integrationIds, headers); return localVarResponse.getData(); } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @return ApiResponse<List<Integration>> * @throws ApiException if fails to make API call */ - public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List integrationIds) throws ApiException { - return getIntegrationsByIdsV2WithHttpInfo(integrationIds, null); + public ApiResponse> getIntegrationsByIdsWithHttpInfo(@javax.annotation.Nonnull List integrationIds) throws ApiException { + return getIntegrationsByIdsWithHttpInfo(integrationIds, null); } /** - * Get Integrations By Ids (getIntegrationsByIdsV2) + * Get Integrations By Ids (getIntegrationsByIds) * Requested integrations must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param integrationIds A list of integration ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Integration>> * @throws ApiException if fails to make API call */ - public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getIntegrationsByIdsV2RequestBuilder(integrationIds, headers); + public ApiResponse> getIntegrationsByIdsWithHttpInfo(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getIntegrationsByIdsRequestBuilder(integrationIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -46123,7 +45527,7 @@ public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getIntegrationsByIdsV2", localVarResponse); + throw getApiException("getIntegrationsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -46159,10 +45563,10 @@ public ApiResponse> getIntegrationsByIdsV2WithHttpInfo(@javax. } } - private HttpRequest.Builder getIntegrationsByIdsV2RequestBuilder(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { + private HttpRequest.Builder getIntegrationsByIdsRequestBuilder(@javax.annotation.Nonnull List integrationIds, Map headers) throws ApiException { // verify the required parameter 'integrationIds' is set if (integrationIds == null) { - throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling getIntegrationsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'integrationIds' when calling getIntegrationsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -48533,6 +47937,115 @@ private HttpRequest.Builder getLwm2mListObjectsPageRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl() throws ApiException { + return getMailOAuth2AuthorizationUrl(null); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailOAuth2AuthorizationUrlWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo() throws ApiException { + return getMailOAuth2AuthorizationUrlWithHttpInfo(null); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailOAuth2AuthorizationUrlRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getMailOAuth2AuthorizationUrl", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getMailOAuth2AuthorizationUrlRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/admin/mail/oauth2/authorize"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/text, application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 log in processing URL (getMailProcessingUrl) * Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider and user consent for requested scope, it makes a redirect to this path so that the platform can do further log in processing and generating access tokens. Available for users with 'SYS_ADMIN' authority. @@ -48998,7 +48511,7 @@ private HttpRequest.Builder getMergedCustomTranslationRequestBuilder(@javax.anno } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @return QrCodeSettings * @throws ApiException if fails to make API call @@ -49008,7 +48521,7 @@ public QrCodeSettings getMergedMobileAppSettings() throws ApiException { } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @param headers Optional headers to include in the request * @return QrCodeSettings @@ -49020,7 +48533,7 @@ public QrCodeSettings getMergedMobileAppSettings(Map headers) th } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @return ApiResponse<QrCodeSettings> * @throws ApiException if fails to make API call @@ -49030,7 +48543,7 @@ public ApiResponse getMergedMobileAppSettingsWithHttpInfo() thro } /** - * Get QR code configuration for home page (getMobileAppQrCodeConfig) + * Get QR code configuration for home page (getMergedMobileAppSettings) * The response payload contains ui configuration of qr code Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<QrCodeSettings> @@ -49225,7 +48738,7 @@ private HttpRequest.Builder getMobileAppBundleInfoByIdRequestBuilder(@javax.anno } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @return MobileApp @@ -49236,7 +48749,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id) throws ApiE } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -49249,7 +48762,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id, Map getMobileAppByIdWithHttpInfo(@javax.annotation.Non } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -50651,50 +50164,50 @@ private HttpRequest.Builder getNotificationTargetsRequestBuilder(@javax.annotati } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2(ids, null); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIds(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - ApiResponse> localVarResponse = getNotificationTargetsByIdsV2WithHttpInfo(ids, headers); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + ApiResponse> localVarResponse = getNotificationTargetsByIdsWithHttpInfo(ids, headers); return localVarResponse.getData(); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2WithHttpInfo(ids, null); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIdsWithHttpInfo(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsV2RequestBuilder(ids, headers); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsRequestBuilder(ids, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50705,7 +50218,7 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsByIdsV2", localVarResponse); + throw getApiException("getNotificationTargetsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50741,10 +50254,10 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt } } - private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsByIdsRequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { // verify the required parameter 'ids' is set if (ids == null) { - throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -50783,7 +50296,7 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -50794,12 +50307,12 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -50811,13 +50324,13 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -50828,12 +50341,12 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. 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 response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType Notification type to filter targets by (required) * @param pageSize Maximum amount of entities in a one page (required) @@ -50845,8 +50358,8 @@ public ApiResponse getNotificationTargetsBySupported * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeRequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50857,7 +50370,7 @@ public ApiResponse getNotificationTargetsBySupported InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsBySupportedNotificationTypeV2", localVarResponse); + throw getApiException("getNotificationTargetsBySupportedNotificationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50893,18 +50406,18 @@ public ApiResponse getNotificationTargetsBySupported } } - private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeRequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'notificationType' is set if (notificationType == null) { - throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -51525,6 +51038,115 @@ private HttpRequest.Builder getOAuth2ClientByIdRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates() throws ApiException { + return getOAuth2ClientRegistrationTemplates(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse> localVarResponse = getOAuth2ClientRegistrationTemplatesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getOAuth2ClientRegistrationTemplatesWithHttpInfo(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientRegistrationTemplatesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getOAuth2ClientRegistrationTemplates", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getOAuth2ClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/oauth2/config/template"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 clients (getOAuth2Clients) * Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header) @@ -52056,7 +51678,7 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -52068,12 +51690,12 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileIdAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileIdAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -52086,13 +51708,13 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileIdAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -52104,12 +51726,12 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) * Returns a page of OTA Package Info objects owned by tenant. 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -52122,8 +51744,8 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getOtaPackages1RequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getOtaPackagesByDeviceProfileIdAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOtaPackagesByDeviceProfileIdAndTypeRequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -52134,7 +51756,7 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getOtaPackages1", localVarResponse); + throw getApiException("getOtaPackagesByDeviceProfileIdAndType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -52170,22 +51792,22 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an } } - private HttpRequest.Builder getOtaPackages1RequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getOtaPackagesByDeviceProfileIdAndTypeRequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'deviceProfileId' is set if (deviceProfileId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackagesByDeviceProfileIdAndType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackagesByDeviceProfileIdAndType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackagesByDeviceProfileIdAndType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackagesByDeviceProfileIdAndType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -53217,7 +52839,7 @@ private HttpRequest.Builder getPrivacyPolicyRequestBuilder(@javax.annotation.Nul } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @return QrCodeSettings * @throws ApiException if fails to make API call @@ -53227,7 +52849,7 @@ public QrCodeSettings getQrCodeSettings() throws ApiException { } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @param headers Optional headers to include in the request * @return QrCodeSettings @@ -53239,7 +52861,7 @@ public QrCodeSettings getQrCodeSettings(Map headers) throws ApiE } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @return ApiResponse<QrCodeSettings> * @throws ApiException if fails to make API call @@ -53249,7 +52871,7 @@ public ApiResponse getQrCodeSettingsWithHttpInfo() throws ApiExc } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<QrCodeSettings> @@ -53680,50 +53302,50 @@ private HttpRequest.Builder getQueueStatsByIdRequestBuilder(@javax.annotation.No } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2(queueStatsIds, null); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIds(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, headers); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getQueueStatsByIdsWithHttpInfo(queueStatsIds, headers); return localVarResponse.getData(); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, null); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIdsWithHttpInfo(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsV2RequestBuilder(queueStatsIds, headers); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsRequestBuilder(queueStatsIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -53734,7 +53356,7 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getQueueStatsByIdsV2", localVarResponse); + throw getApiException("getQueueStatsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -53770,10 +53392,10 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann } } - private HttpRequest.Builder getQueueStatsByIdsV2RequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + private HttpRequest.Builder getQueueStatsByIdsRequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { // verify the required parameter 'queueStatsIds' is set if (queueStatsIds == null) { - throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -54441,6 +54063,138 @@ private HttpRequest.Builder getReportInfosRequestBuilder(@javax.annotation.Nonnu return localVarRequestBuilder; } + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @return List<ReportInfo> + * @throws ApiException if fails to make API call + */ + public List getReportInfosByIds(@javax.annotation.Nonnull List strReportIds) throws ApiException { + return getReportInfosByIds(strReportIds, null); + } + + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @param headers Optional headers to include in the request + * @return List<ReportInfo> + * @throws ApiException if fails to make API call + */ + public List getReportInfosByIds(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getReportInfosByIdsWithHttpInfo(strReportIds, headers); + return localVarResponse.getData(); + } + + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @return ApiResponse<List<ReportInfo>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getReportInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List strReportIds) throws ApiException { + return getReportInfosByIdsWithHttpInfo(strReportIds, null); + } + + /** + * getReportInfosByIds + * + * @param strReportIds A list of report ids, separated by comma ',' (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<ReportInfo>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getReportInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getReportInfosByIdsRequestBuilder(strReportIds, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getReportInfosByIds", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getReportInfosByIdsRequestBuilder(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { + // verify the required parameter 'strReportIds' is set + if (strReportIds == null) { + throw new ApiException(400, "Missing the required parameter 'strReportIds' when calling getReportInfosByIds"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v2/reportInfos"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "strReportIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "strReportIds", strReportIds)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get Report Template (getReportTemplateById) * Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -54969,138 +54723,6 @@ private HttpRequest.Builder getReportsRequestBuilder(@javax.annotation.Nonnull I return localVarRequestBuilder; } - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @return List<ReportInfo> - * @throws ApiException if fails to make API call - */ - public List getReports1(@javax.annotation.Nonnull List strReportIds) throws ApiException { - return getReports1(strReportIds, null); - } - - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return List<ReportInfo> - * @throws ApiException if fails to make API call - */ - public List getReports1(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getReports1WithHttpInfo(strReportIds, headers); - return localVarResponse.getData(); - } - - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @return ApiResponse<List<ReportInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getReports1WithHttpInfo(@javax.annotation.Nonnull List strReportIds) throws ApiException { - return getReports1WithHttpInfo(strReportIds, null); - } - - /** - * getReports - * - * @param strReportIds A list of report ids, separated by comma ',' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<ReportInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getReports1WithHttpInfo(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getReports1RequestBuilder(strReportIds, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getReports1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getReports1RequestBuilder(@javax.annotation.Nonnull List strReportIds, Map headers) throws ApiException { - // verify the required parameter 'strReportIds' is set - if (strReportIds == null) { - throw new ApiException(400, "Missing the required parameter 'strReportIds' when calling getReports1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v2/reportInfos"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "strReportIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "strReportIds", strReportIds)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get repository settings (getRepositorySettings) * Get the repository settings object. Available for users with 'TENANT_ADMIN' authority. @@ -56156,50 +55778,50 @@ private HttpRequest.Builder getRolesRequestBuilder(@javax.annotation.Nonnull Str } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @return List<Role> * @throws ApiException if fails to make API call */ - public List getRolesByIdsV2(@javax.annotation.Nonnull List roleIds) throws ApiException { - return getRolesByIdsV2(roleIds, null); + public List getRolesByIds(@javax.annotation.Nonnull List roleIds) throws ApiException { + return getRolesByIds(roleIds, null); } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Role> * @throws ApiException if fails to make API call */ - public List getRolesByIdsV2(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getRolesByIdsV2WithHttpInfo(roleIds, headers); + public List getRolesByIds(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getRolesByIdsWithHttpInfo(roleIds, headers); return localVarResponse.getData(); } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @return ApiResponse<List<Role>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List roleIds) throws ApiException { - return getRolesByIdsV2WithHttpInfo(roleIds, null); + public ApiResponse> getRolesByIdsWithHttpInfo(@javax.annotation.Nonnull List roleIds) throws ApiException { + return getRolesByIdsWithHttpInfo(roleIds, null); } /** - * Get Roles By Ids (getRolesByIdsV2) + * Get Roles By Ids (getRolesByIds) * Returns the list of rows based on their ids. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param roleIds A list of role ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Role>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getRolesByIdsV2RequestBuilder(roleIds, headers); + public ApiResponse> getRolesByIdsWithHttpInfo(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRolesByIdsRequestBuilder(roleIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -56210,7 +55832,7 @@ public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getRolesByIdsV2", localVarResponse); + throw getApiException("getRolesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -56246,10 +55868,10 @@ public ApiResponse> getRolesByIdsV2WithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder getRolesByIdsV2RequestBuilder(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { + private HttpRequest.Builder getRolesByIdsRequestBuilder(@javax.annotation.Nonnull List roleIds, Map headers) throws ApiException { // verify the required parameter 'roleIds' is set if (roleIds == null) { - throw new ApiException(400, "Missing the required parameter 'roleIds' when calling getRolesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'roleIds' when calling getRolesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -56926,50 +56548,50 @@ private HttpRequest.Builder getRuleChainsRequestBuilder(@javax.annotation.Nonnul } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2(ruleChainIds, null); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIds(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, headers); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getRuleChainsByIdsWithHttpInfo(ruleChainIds, headers); return localVarResponse.getData(); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, null); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIdsWithHttpInfo(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsV2RequestBuilder(ruleChainIds, headers); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsRequestBuilder(ruleChainIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -56980,7 +56602,7 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getRuleChainsByIdsV2", localVarResponse); + throw getApiException("getRuleChainsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -57016,10 +56638,10 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno } } - private HttpRequest.Builder getRuleChainsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + private HttpRequest.Builder getRuleChainsByIdsRequestBuilder(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { // verify the required parameter 'ruleChainIds' is set if (ruleChainIds == null) { - throw new ApiException(400, "Missing the required parameter 'ruleChainIds' when calling getRuleChainsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ruleChainIds' when calling getRuleChainsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -57644,50 +57266,50 @@ private HttpRequest.Builder getSchedulerEventsRequestBuilder(@javax.annotation.N } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @return List<SchedulerEventInfo> * @throws ApiException if fails to make API call */ - public List getSchedulerEventsByIdsV2(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { - return getSchedulerEventsByIdsV2(schedulerEventIds, null); + public List getSchedulerEventsByIds(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { + return getSchedulerEventsByIds(schedulerEventIds, null); } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<SchedulerEventInfo> * @throws ApiException if fails to make API call */ - public List getSchedulerEventsByIdsV2(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getSchedulerEventsByIdsV2WithHttpInfo(schedulerEventIds, headers); + public List getSchedulerEventsByIds(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getSchedulerEventsByIdsWithHttpInfo(schedulerEventIds, headers); return localVarResponse.getData(); } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @return ApiResponse<List<SchedulerEventInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSchedulerEventsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { - return getSchedulerEventsByIdsV2WithHttpInfo(schedulerEventIds, null); + public ApiResponse> getSchedulerEventsByIdsWithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds) throws ApiException { + return getSchedulerEventsByIdsWithHttpInfo(schedulerEventIds, null); } /** - * Get Scheduler Events By Ids (getSchedulerEventsByIdsV2) + * Get Scheduler Events By Ids (getSchedulerEventsByIds) * Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param schedulerEventIds A list of scheduler event ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<SchedulerEventInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSchedulerEventsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSchedulerEventsByIdsV2RequestBuilder(schedulerEventIds, headers); + public ApiResponse> getSchedulerEventsByIdsWithHttpInfo(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSchedulerEventsByIdsRequestBuilder(schedulerEventIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -57698,7 +57320,7 @@ public ApiResponse> getSchedulerEventsByIdsV2WithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getSchedulerEventsByIdsV2", localVarResponse); + throw getApiException("getSchedulerEventsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -57734,10 +57356,10 @@ public ApiResponse> getSchedulerEventsByIdsV2WithHttpIn } } - private HttpRequest.Builder getSchedulerEventsByIdsV2RequestBuilder(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { + private HttpRequest.Builder getSchedulerEventsByIdsRequestBuilder(@javax.annotation.Nonnull List schedulerEventIds, Map headers) throws ApiException { // verify the required parameter 'schedulerEventIds' is set if (schedulerEventIds == null) { - throw new ApiException(400, "Missing the required parameter 'schedulerEventIds' when calling getSchedulerEventsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'schedulerEventIds' when calling getSchedulerEventsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -59878,50 +59500,50 @@ private HttpRequest.Builder getSystemInfoRequestBuilder(Map head } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2(resourceIds, null); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIds(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, headers); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, headers); return localVarResponse.getData(); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, null); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsV2RequestBuilder(resourceIds, headers); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsRequestBuilder(resourceIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -59932,7 +59554,7 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getSystemOrTenantResourcesByIdsV2", localVarResponse); + throw getApiException("getSystemOrTenantResourcesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -59968,10 +59590,10 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt } } - private HttpRequest.Builder getSystemOrTenantResourcesByIdsV2RequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + private HttpRequest.Builder getSystemOrTenantResourcesByIdsRequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { // verify the required parameter 'resourceIds' is set if (resourceIds == null) { - throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -60179,7 +59801,7 @@ private HttpRequest.Builder getTenantAdminsRequestBuilder(@javax.annotation.Nonn } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @return Asset @@ -60190,7 +59812,7 @@ public Asset getTenantAssetByName(@javax.annotation.Nonnull String assetName) th } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @param headers Optional headers to include in the request @@ -60203,7 +59825,7 @@ public Asset getTenantAssetByName(@javax.annotation.Nonnull String assetName, Ma } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @return ApiResponse<Asset> @@ -60214,7 +59836,7 @@ public ApiResponse getTenantAssetByNameWithHttpInfo(@javax.annotation.Non } /** - * Get Tenant Asset (getTenantAsset) + * Get Tenant Asset (getTenantAssetByName) * 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param assetName A string value representing the Asset name. (required) * @param headers Optional headers to include in the request @@ -60727,27 +60349,27 @@ private HttpRequest.Builder getTenantCustomerRequestBuilder(@javax.annotation.No } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -60755,33 +60377,33 @@ public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Strin * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -60789,8 +60411,8 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -60837,11 +60459,7 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax } } - private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboards"); - } + private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards"); @@ -60853,8 +60471,7 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/{tenantId}/dashboards" - .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); + String localVarPath = "/api/tenant/dashboards"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -60863,6 +60480,8 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "mobile"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -60896,27 +60515,27 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -60924,33 +60543,33 @@ public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Inte * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. 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 response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -60958,8 +60577,8 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboards1RequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsByTenantIdRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -60970,7 +60589,7 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantDashboards1", localVarResponse); + throw getApiException("getTenantDashboardsByTenantId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -61006,19 +60625,24 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java } } - private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getTenantDashboardsByTenantIdRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboardsByTenantId"); + } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboardsByTenantId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboardsByTenantId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/dashboards"; + String localVarPath = "/api/tenant/{tenantId}/dashboards" + .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -61027,8 +60651,6 @@ private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "mobile"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -62503,7 +62125,7 @@ private HttpRequest.Builder getTenantMobileAppBundleInfosRequestBuilder(@javax.a } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -62519,7 +62141,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -62537,7 +62159,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -62553,7 +62175,7 @@ public ApiResponse getTenantMobileAppsWithHttpInfo(@javax.ann } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -63687,7 +63309,7 @@ private HttpRequest.Builder getTenantQueuesByServiceTypeRequestBuilder(@javax.an } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -63702,7 +63324,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -63719,7 +63341,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -63734,7 +63356,7 @@ public ApiResponse getTenantResourcesWithHttpInfo(@javax } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. 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 response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -64116,50 +63738,50 @@ private HttpRequest.Builder getTenantsRequestBuilder(@javax.annotation.Nonnull I } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2(tenantIds, null); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIds(tenantIds, null); } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTenantsByIdsV2WithHttpInfo(tenantIds, headers); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getTenantsByIdsWithHttpInfo(tenantIds, headers); return localVarResponse.getData(); } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2WithHttpInfo(tenantIds, null); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIdsWithHttpInfo(tenantIds, null); } /** - * Get Tenants By Ids (getTenantsByIdsV2) + * Get Tenants By Ids (getTenantsByIds) * Fetch Tenant objects based on the provided ids. Available for users with 'SYS_ADMIN' authority. * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsV2RequestBuilder(tenantIds, headers); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsRequestBuilder(tenantIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -64170,7 +63792,7 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantsByIdsV2", localVarResponse); + throw getApiException("getTenantsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -64206,10 +63828,10 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation } } - private HttpRequest.Builder getTenantsByIdsV2RequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + private HttpRequest.Builder getTenantsByIdsRequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { // verify the required parameter 'tenantIds' is set if (tenantIds == null) { - throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -64863,134 +64485,6 @@ private HttpRequest.Builder getTimeseriesKeysRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTimeseriesKeys1WithHttpInfo(deviceProfileId, headers); - return localVarResponse.getData(); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1WithHttpInfo(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTimeseriesKeys1RequestBuilder(deviceProfileId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTimeseriesKeys1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getTimeseriesKeys1RequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "deviceProfileId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get end-user multi-translation for basic edit (getTranslationForBasicEdit) * Fetch the translation info map where value is info object containing key translation, origin translation, translation of parent level, translation status. @@ -69134,50 +68628,50 @@ private HttpRequest.Builder getUsersByEntityGroupIdRequestBuilder(@javax.annotat } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2(userIds, null); + public List getUsersByIds(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIds(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getUsersByIdsV2WithHttpInfo(userIds, headers); + public List getUsersByIds(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getUsersByIdsWithHttpInfo(userIds, headers); return localVarResponse.getData(); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2WithHttpInfo(userIds, null); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIdsWithHttpInfo(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getUsersByIdsV2RequestBuilder(userIds, headers); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getUsersByIdsRequestBuilder(userIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -69188,7 +68682,7 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getUsersByIdsV2", localVarResponse); + throw getApiException("getUsersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -69224,10 +68718,10 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder getUsersByIdsV2RequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + private HttpRequest.Builder getUsersByIdsRequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { // verify the required parameter 'userIds' is set if (userIds == null) { - throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -71232,46 +70726,51 @@ private HttpRequest.Builder getWidgetsBundlesListRequestBuilder(@javax.annotatio } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return List<WidgetsBundle> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2() throws ApiException { - return getWidgetsBundlesV2(null); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + handleMailOAuth2Callback(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return List<WidgetsBundle> * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2(Map headers) throws ApiException { - ApiResponse> localVarResponse = getWidgetsBundlesV2WithHttpInfo(headers); - return localVarResponse.getData(); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + handleMailOAuth2CallbackWithHttpInfo(code, state, headers); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return ApiResponse<List<WidgetsBundle>> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo() throws ApiException { - return getWidgetsBundlesV2WithHttpInfo(null); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + return handleMailOAuth2CallbackWithHttpInfo(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetsBundle>> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getWidgetsBundlesV2RequestBuilder(headers); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleMailOAuth2CallbackRequestBuilder(code, state, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71282,27 +70781,16 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -71318,13 +70806,38 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { + private HttpRequest.Builder handleMailOAuth2CallbackRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException(400, "Missing the required parameter 'code' when calling handleMailOAuth2Callback"); + } + // verify the required parameter 'state' is set + if (state == null) { + throw new ApiException(400, "Missing the required parameter 'state' when calling handleMailOAuth2Callback"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/widgetsBundles/all"; + String localVarPath = "/api/admin/mail/oauth2/code"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "code"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); + localVarQueryParameterBaseName = "state"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Accept", "application/json"); @@ -71341,54 +70854,54 @@ private HttpRequest.Builder getWidgetsBundlesV2RequestBuilder(Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71399,7 +70912,7 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -71435,19 +70948,19 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/oneway/{deviceId}" + String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -71468,54 +70981,54 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1(deviceId, body, null); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71526,7 +71039,7 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -71562,19 +71075,19 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" + String localVarPath = "/api/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -71595,7 +71108,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -71603,12 +71116,12 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest(entityType, entityId, body, null); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntity(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -71617,13 +71130,13 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, headers); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, headers); return localVarResponse.getData(); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -71631,12 +71144,12 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -71645,8 +71158,8 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestRequestBuilder(entityType, entityId, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityRequestBuilder(entityType, entityId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71657,7 +71170,7 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -71693,18 +71206,18 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation } } - private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -71731,62 +71244,66 @@ private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotat } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1(entityType, entityId, timeout, body, null); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest1RequestBuilder(entityType, entityId, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(entityType, entityId, queueName, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71797,7 +71314,7 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest1", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithQueueAndTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -71833,29 +71350,34 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); + } + // verify the required parameter 'queueName' is set + if (queueName == null) { + throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) + .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -71876,66 +71398,62 @@ private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annota } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body, null); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest2RequestBuilder(entityType, entityId, queueName, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(entityType, entityId, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -71946,7 +71464,7 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest2", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -71982,34 +71500,29 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest2"); - } - // verify the required parameter 'queueName' is set - if (queueName == null) { - throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) - .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -72030,50 +71543,50 @@ private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annota } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3(body, null); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUser(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest3WithHttpInfo(body, headers); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForUserWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3WithHttpInfo(body, null); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUserWithHttpInfo(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest3RequestBuilder(body, headers); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForUserRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -72084,7 +71597,7 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest3", localVarResponse); + throw getApiException("handleRuleEngineRequestForUser", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -72120,10 +71633,10 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForUserRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest3"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -72148,54 +71661,54 @@ private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annota } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -72206,7 +71719,7 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -72242,19 +71755,19 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/twoway/{deviceId}" + String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -72275,54 +71788,54 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -72333,7 +71846,7 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -72369,19 +71882,19 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" + String localVarPath = "/api/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -77315,7 +76828,7 @@ private HttpRequest.Builder publicConnectToTrendzRequestBuilder(Map putGeneralUserSettingsWithHttpInfo(@javax.annotation.Nu } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @param headers Optional headers to include in the request @@ -77424,7 +76937,7 @@ private HttpRequest.Builder putGeneralUserSettingsRequestBuilder(@javax.annotati } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -77435,7 +76948,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -77447,7 +76960,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -77459,7 +76972,7 @@ public ApiResponse putUserSettingsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -80514,6 +80027,129 @@ private HttpRequest.Builder saveCalculatedFieldRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String saveClaimingInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + ApiResponse localVarResponse = saveClaimingInfoWithHttpInfo(deviceToken, body, headers); + return localVarResponse.getData(); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { + return saveClaimingInfoWithHttpInfo(deviceToken, body, null); + } + + /** + * Save claiming information (saveClaimingInfo) + * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). + * @param deviceToken Your device access token. (required) + * @param body (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveClaimingInfoWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveClaimingInfoRequestBuilder(deviceToken, body, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveClaimingInfo", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveClaimingInfoRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { + // verify the required parameter 'deviceToken' is set + if (deviceToken == null) { + throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling saveClaimingInfo"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/v1/{deviceToken}/claim" + .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients @@ -81753,148 +81389,6 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { - return saveDeviceWithCredentials(requestBody, entityGroupId, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @param headers Optional headers to include in the request - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, headers); - return localVarResponse.getData(); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { - return saveDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param entityGroupId (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(requestBody, entityGroupId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { - // verify the required parameter 'requestBody' is set - if (requestBody == null) { - throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveDeviceWithCredentials"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/lwm2m/device-credentials"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "entityGroupId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("entityGroupId", entityGroupId)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Create Device (saveDevice) with credentials * 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)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -81907,8 +81401,8 @@ private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annot * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -81924,8 +81418,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); return localVarResponse.getData(); } @@ -81941,8 +81435,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -81958,8 +81452,8 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentials1RequestBuilder(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(saveDeviceWithCredentialsRequest, entityGroupId, entityGroupIds, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -81970,7 +81464,7 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials1", localVarResponse); + throw getApiException("saveDeviceWithCredentials", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -82006,10 +81500,10 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat } } - private HttpRequest.Builder saveDeviceWithCredentials1RequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable String entityGroupId, @javax.annotation.Nullable List entityGroupIds, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { // verify the required parameter 'saveDeviceWithCredentialsRequest' is set if (saveDeviceWithCredentialsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials1"); + throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -83863,6 +83357,148 @@ private HttpRequest.Builder saveLoginWhiteLabelParamsRequestBuilder(@javax.annot return localVarRequestBuilder; } + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { + return saveLwm2mDeviceWithCredentials(requestBody, entityGroupId, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @param headers Optional headers to include in the request + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { + ApiResponse localVarResponse = saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, headers); + return localVarResponse.getData(); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId) throws ApiException { + return saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, entityGroupId, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) + * Deprecated. + * @param requestBody (required) + * @param entityGroupId (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveLwm2mDeviceWithCredentialsRequestBuilder(requestBody, entityGroupId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveLwm2mDeviceWithCredentials", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveLwm2mDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, @javax.annotation.Nullable String entityGroupId, Map headers) throws ApiException { + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveLwm2mDeviceWithCredentials"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/lwm2m/device-credentials"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "entityGroupId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("entityGroupId", entityGroupId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Save the Mail templates settings (saveMailTemplates) * Creates or Updates the Mail templates settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. @@ -85422,7 +85058,7 @@ private HttpRequest.Builder savePlatformTwoFaSettingsRequestBuilder(@javax.annot } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @return QrCodeSettings @@ -85433,7 +85069,7 @@ public QrCodeSettings saveQrCodeSettings(@javax.annotation.Nonnull QrCodeSetting } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @param headers Optional headers to include in the request @@ -85446,7 +85082,7 @@ public QrCodeSettings saveQrCodeSettings(@javax.annotation.Nonnull QrCodeSetting } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @return ApiResponse<QrCodeSettings> @@ -85457,7 +85093,7 @@ public ApiResponse saveQrCodeSettingsWithHttpInfo(@javax.annotat } /** - * Create Or Update the Mobile application settings (saveMobileAppSettings) + * Create Or Update the Mobile application settings (saveQrCodeSettings) * The request payload contains configuration for android/iOS applications and platform qr code widget settings. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param qrCodeSettings (required) * @param headers Optional headers to include in the request @@ -85694,10 +85330,11 @@ private HttpRequest.Builder saveQueueRequestBuilder(@javax.annotation.Nonnull St * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - saveRelation(entityRelation, null); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + return saveRelation(entityRelation, null); } /** @@ -85705,20 +85342,22 @@ public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - saveRelationWithHttpInfo(entityRelation, headers); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + ApiResponse localVarResponse = saveRelationWithHttpInfo(entityRelation, headers); + return localVarResponse.getData(); } /** * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { return saveRelationWithHttpInfo(entityRelation, null); } @@ -85727,10 +85366,10 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = saveRelationRequestBuilder(entityRelation, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -85745,118 +85384,6 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti throw getApiException("saveRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - // verify the required parameter 'entityRelation' is set - if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelation); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRelationV2WithHttpInfo(entityRelation, headers); - return localVarResponse.getData(); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2WithHttpInfo(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRelationV2RequestBuilder(entityRelation, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -85890,10 +85417,10 @@ public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder saveRelationV2RequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { // verify the required parameter 'entityRelation' is set if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelationV2"); + throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -86545,129 +86072,6 @@ private HttpRequest.Builder saveRuleChainRequestBuilder(@javax.annotation.Nonnul return localVarRequestBuilder; } - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, headers); - return localVarResponse.getData(); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRuleChain1RequestBuilder(defaultRuleChainCreateRequest, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRuleChain1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRuleChain1RequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - // verify the required parameter 'defaultRuleChainCreateRequest' is set - if (defaultRuleChainCreateRequest == null) { - throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling saveRuleChain1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/ruleChain/device/default"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Update Rule Chain Metadata * Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. @@ -89726,6 +89130,129 @@ private HttpRequest.Builder setDefaultTenantProfileRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @return RuleChain + * @throws ApiException if fails to make API call + */ + public RuleChain setDeviceDefaultRuleChain(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { + return setDeviceDefaultRuleChain(defaultRuleChainCreateRequest, null); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @param headers Optional headers to include in the request + * @return RuleChain + * @throws ApiException if fails to make API call + */ + public RuleChain setDeviceDefaultRuleChain(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = setDeviceDefaultRuleChainWithHttpInfo(defaultRuleChainCreateRequest, headers); + return localVarResponse.getData(); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @return ApiResponse<RuleChain> + * @throws ApiException if fails to make API call + */ + public ApiResponse setDeviceDefaultRuleChainWithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { + return setDeviceDefaultRuleChainWithHttpInfo(defaultRuleChainCreateRequest, null); + } + + /** + * Create Default Rule Chain (setDeviceDefaultRuleChain) + * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. + * @param defaultRuleChainCreateRequest (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<RuleChain> + * @throws ApiException if fails to make API call + */ + public ApiResponse setDeviceDefaultRuleChainWithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = setDeviceDefaultRuleChainRequestBuilder(defaultRuleChainCreateRequest, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("setDeviceDefaultRuleChain", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder setDeviceDefaultRuleChainRequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { + // verify the required parameter 'defaultRuleChainCreateRequest' is set + if (defaultRuleChainCreateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling setDeviceDefaultRuleChain"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/ruleChain/device/default"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Set root rule chain for provided edge (setEdgeRootRuleChain) * Change root rule chain of the edge to the new provided rule chain. This operation will send a notification to update root rule chain on remote edge service. Available for users with 'TENANT_ADMIN' authority. @@ -91295,54 +90822,50 @@ private HttpRequest.Builder termsOfUseAcceptedRequestBuilder(Map } /** - * Test converter function (testDownLinkConverter) - * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. - * @param body A JSON value representing the input to the converter function. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testDownLinkConverter(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testDownLinkConverter(body, scriptLang, null); + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScript(body, null); } /** - * Test converter function (testDownLinkConverter) - * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. - * @param body A JSON value representing the input to the converter function. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testDownLinkConverter(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - ApiResponse localVarResponse = testDownLinkConverterWithHttpInfo(body, scriptLang, headers); + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + ApiResponse localVarResponse = testCalculatedFieldScriptWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Test converter function (testDownLinkConverter) - * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. - * @param body A JSON value representing the input to the converter function. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testDownLinkConverterWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testDownLinkConverterWithHttpInfo(body, scriptLang, null); + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScriptWithHttpInfo(body, null); } /** - * Test converter function (testDownLinkConverter) - * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. - * @param body A JSON value representing the input to the converter function. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testDownLinkConverterWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testDownLinkConverterRequestBuilder(body, scriptLang, headers); + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testCalculatedFieldScriptRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -91353,7 +90876,7 @@ public ApiResponse testDownLinkConverte InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testDownLinkConverter", localVarResponse); + throw getApiException("testCalculatedFieldScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -91389,32 +90912,17 @@ public ApiResponse testDownLinkConverte } } - private HttpRequest.Builder testDownLinkConverterRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + private HttpRequest.Builder testCalculatedFieldScriptRequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testDownLinkConverter"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testCalculatedFieldScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/converter/testDownLink"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "scriptLang"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + String localVarPath = "/api/calculatedField/testScript"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); @@ -91437,50 +90945,54 @@ private HttpRequest.Builder testDownLinkConverterRequestBuilder(@javax.annotatio } /** - * Download test report (downloadTestReport) - * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. - * @param reportRequest (required) - * @return File + * Test converter function (testDownLinkConverter) + * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. + * @param body A JSON value representing the input to the converter function. (required) + * @param scriptLang Script language: JS or TBEL (optional) + * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public File testReportAndDownload(@javax.annotation.Nonnull ReportRequest reportRequest) throws ApiException { - return testReportAndDownload(reportRequest, null); + public com.fasterxml.jackson.databind.JsonNode testDownLinkConverter(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testDownLinkConverter(body, scriptLang, null); } /** - * Download test report (downloadTestReport) - * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. - * @param reportRequest (required) + * Test converter function (testDownLinkConverter) + * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. + * @param body A JSON value representing the input to the converter function. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request - * @return File + * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public File testReportAndDownload(@javax.annotation.Nonnull ReportRequest reportRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = testReportAndDownloadWithHttpInfo(reportRequest, headers); + public com.fasterxml.jackson.databind.JsonNode testDownLinkConverter(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + ApiResponse localVarResponse = testDownLinkConverterWithHttpInfo(body, scriptLang, headers); return localVarResponse.getData(); } /** - * Download test report (downloadTestReport) - * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. - * @param reportRequest (required) - * @return ApiResponse<File> + * Test converter function (testDownLinkConverter) + * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. + * @param body A JSON value representing the input to the converter function. (required) + * @param scriptLang Script language: JS or TBEL (optional) + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Nonnull ReportRequest reportRequest) throws ApiException { - return testReportAndDownloadWithHttpInfo(reportRequest, null); + public ApiResponse testDownLinkConverterWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testDownLinkConverterWithHttpInfo(body, scriptLang, null); } /** - * Download test report (downloadTestReport) - * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. - * @param reportRequest (required) + * Test converter function (testDownLinkConverter) + * Returns a JSON object representing the result of the processed incoming message. ## Request Body Example ```json { \"metadata\":{ \"data\":\"40\" }, \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"integrationMetadata\":{ \"integrationName\":\"Integration\" }, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/_** Encoder **_/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` * 'metadata' - message metadata pushed from the rule engine; * 'msg' - message data pushed from the rule engine; * 'msgType' - type of the message pushed from the rule engine; * 'integrationMetadata' - integration metadata object; * 'encoder' - string representation of the encoder configuration. ## Response Body Example ```json { \"contentType\":\"JSON\", \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\", \"metadata\":{ \"topic\":\"sensor/Temp Sensor/upload\" } } ``` * 'contentType' - downlink data content type; * 'data' - downlink data; * 'metadata' - optional metadata object. + * @param body A JSON value representing the input to the converter function. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<File> + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Nonnull ReportRequest reportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testReportAndDownloadRequestBuilder(reportRequest, headers); + public ApiResponse testDownLinkConverterWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testDownLinkConverterRequestBuilder(body, scriptLang, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -91491,11 +91003,11 @@ public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testReportAndDownload", localVarResponse); + throw getApiException("testDownLinkConverter", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -91503,11 +91015,12 @@ public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Non } - // Handle file downloading. - File responseValue = downloadFileFromResponse(localVarResponse, localVarResponseBody); + + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -91526,23 +91039,38 @@ public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder testReportAndDownloadRequestBuilder(@javax.annotation.Nonnull ReportRequest reportRequest, Map headers) throws ApiException { - // verify the required parameter 'reportRequest' is set - if (reportRequest == null) { - throw new ApiException(400, "Missing the required parameter 'reportRequest' when calling testReportAndDownload"); + private HttpRequest.Builder testDownLinkConverterRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling testDownLinkConverter"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/v2/report/test"; + String localVarPath = "/api/converter/testDownLink"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "scriptLang"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(reportRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -91559,54 +91087,50 @@ private HttpRequest.Builder testReportAndDownloadRequestBuilder(@javax.annotatio } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) - * @return com.fasterxml.jackson.databind.JsonNode + * Download test report (testReportAndDownload) + * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. + * @param reportRequest (required) + * @return File * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScript(body, scriptLang, null); + public File testReportAndDownload(@javax.annotation.Nonnull ReportRequest reportRequest) throws ApiException { + return testReportAndDownload(reportRequest, null); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Download test report (testReportAndDownload) + * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. + * @param reportRequest (required) * @param headers Optional headers to include in the request - * @return com.fasterxml.jackson.databind.JsonNode + * @return File * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - ApiResponse localVarResponse = testScriptWithHttpInfo(body, scriptLang, headers); + public File testReportAndDownload(@javax.annotation.Nonnull ReportRequest reportRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = testReportAndDownloadWithHttpInfo(reportRequest, headers); return localVarResponse.getData(); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * Download test report (testReportAndDownload) + * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. + * @param reportRequest (required) + * @return ApiResponse<File> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScriptWithHttpInfo(body, scriptLang, null); + public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Nonnull ReportRequest reportRequest) throws ApiException { + return testReportAndDownloadWithHttpInfo(reportRequest, null); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Download test report (testReportAndDownload) + * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. + * @param reportRequest (required) * @param headers Optional headers to include in the request - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @return ApiResponse<File> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScriptRequestBuilder(body, scriptLang, headers); + public ApiResponse testReportAndDownloadWithHttpInfo(@javax.annotation.Nonnull ReportRequest reportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testReportAndDownloadRequestBuilder(reportRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -91617,11 +91141,11 @@ public ApiResponse testScriptWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript", localVarResponse); + throw getApiException("testReportAndDownload", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -91629,12 +91153,11 @@ public ApiResponse testScriptWithHttpIn } - - String responseBody = new String(localVarResponseBody.readAllBytes()); - com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + // Handle file downloading. + File responseValue = downloadFileFromResponse(localVarResponse, localVarResponseBody); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -91653,38 +91176,23 @@ public ApiResponse testScriptWithHttpIn } } - private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript"); + private HttpRequest.Builder testReportAndDownloadRequestBuilder(@javax.annotation.Nonnull ReportRequest reportRequest, Map headers) throws ApiException { + // verify the required parameter 'reportRequest' is set + if (reportRequest == null) { + throw new ApiException(400, "Missing the required parameter 'reportRequest' when calling testReportAndDownload"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/ruleChain/testScript"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "scriptLang"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + String localVarPath = "/api/v2/report/test"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(reportRequest); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -91701,50 +91209,54 @@ private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1(body, null); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScript(body, scriptLang, null); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - ApiResponse localVarResponse = testScript1WithHttpInfo(body, headers); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + ApiResponse localVarResponse = testRuleChainScriptWithHttpInfo(body, scriptLang, headers); return localVarResponse.getData(); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1WithHttpInfo(body, null); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScriptWithHttpInfo(body, scriptLang, null); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScript1RequestBuilder(body, headers); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testRuleChainScriptRequestBuilder(body, scriptLang, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -91755,7 +91267,7 @@ public ApiResponse testScript1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript1", localVarResponse); + throw getApiException("testRuleChainScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -91791,17 +91303,32 @@ public ApiResponse testScript1WithHttpI } } - private HttpRequest.Builder testScript1RequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + private HttpRequest.Builder testRuleChainScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testRuleChainScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/calculatedField/testScript"; + String localVarPath = "/api/ruleChain/testScript"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "scriptLang"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); @@ -94034,42 +93561,42 @@ private HttpRequest.Builder updateImagePublicStatusRequestBuilder(@javax.annotat } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients(id, UUID, null); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateMobileAppBundleOauth2Clients(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2ClientsWithHttpInfo(id, UUID, headers); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, headers); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2ClientsWithHttpInfo(id, UUID, null); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) @@ -94077,8 +93604,8 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2ClientsRequestBuilder(id, UUID, headers); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateMobileAppBundleOauth2ClientsRequestBuilder(id, UUID, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -94089,7 +93616,7 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients", localVarResponse); + throw getApiException("updateMobileAppBundleOauth2Clients", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -94114,14 +93641,14 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + private HttpRequest.Builder updateMobileAppBundleOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateMobileAppBundleOauth2Clients"); } // verify the required parameter 'UUID' is set if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateMobileAppBundleOauth2Clients"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -94158,8 +93685,8 @@ private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation. * @param UUID (required) * @throws ApiException if fails to make API call */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients1(id, UUID, null); + public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateOauth2Clients(id, UUID, null); } /** @@ -94170,8 +93697,8 @@ public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annot * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2Clients1WithHttpInfo(id, UUID, headers); + public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateOauth2ClientsWithHttpInfo(id, UUID, headers); } /** @@ -94182,8 +93709,8 @@ public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annot * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2Clients1WithHttpInfo(id, UUID, null); + public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateOauth2ClientsWithHttpInfo(id, UUID, null); } /** @@ -94195,8 +93722,8 @@ public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonn * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2Clients1RequestBuilder(id, UUID, headers); + public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateOauth2ClientsRequestBuilder(id, UUID, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -94207,7 +93734,7 @@ public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients1", localVarResponse); + throw getApiException("updateOauth2Clients", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -94232,14 +93759,14 @@ public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonn } } - private HttpRequest.Builder updateOauth2Clients1RequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients1"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients"); } // verify the required parameter 'UUID' is set if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients1"); + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); diff --git a/pe/src/main/java/org/thingsboard/client/model/AiModelExportData.java b/pe/src/main/java/org/thingsboard/client/model/AiModelExportData.java new file mode 100644 index 00000000..0a9d6d84 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/AiModelExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AiModelExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AiModelExportData extends EntityExportData { + public AiModelExportData() { + } + + @Override + public AiModelExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AiModelExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AiModelExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AiModelExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AiModelExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AiModelExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiModelExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelExportData", AiModelExportData.class); + JSON.registerDiscriminator(AiModelExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java new file mode 100644 index 00000000..62a6084e --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmAssignmentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmAssignmentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmAssignmentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmAssignmentRecipientsConfig() { + } + + public AlarmAssignmentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmAssignmentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmAssignmentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmAssignmentRecipientsConfig alarmAssignmentRecipientsConfig = (AlarmAssignmentRecipientsConfig) o; + return Objects.equals(this.targets, alarmAssignmentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmAssignmentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmAssignmentRecipientsConfig", AlarmAssignmentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmAssignmentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java new file mode 100644 index 00000000..910e38e3 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmCommentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmCommentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmCommentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmCommentRecipientsConfig() { + } + + public AlarmCommentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmCommentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmCommentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmCommentRecipientsConfig alarmCommentRecipientsConfig = (AlarmCommentRecipientsConfig) o; + return Objects.equals(this.targets, alarmCommentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmCommentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmCommentRecipientsConfig", AlarmCommentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmCommentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java new file mode 100644 index 00000000..09389b53 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageLimitRecipientsConfig + */ +@JsonPropertyOrder({ + ApiUsageLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ApiUsageLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ApiUsageLimitRecipientsConfig() { + } + + public ApiUsageLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ApiUsageLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ApiUsageLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiUsageLimitRecipientsConfig apiUsageLimitRecipientsConfig = (ApiUsageLimitRecipientsConfig) o; + return Objects.equals(this.targets, apiUsageLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageLimitRecipientsConfig", ApiUsageLimitRecipientsConfig.class); + JSON.registerDiscriminator(ApiUsageLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetExportData.java b/pe/src/main/java/org/thingsboard/client/model/AssetExportData.java new file mode 100644 index 00000000..b2464a0f --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/AssetExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetExportData extends EntityExportData { + public AssetExportData() { + } + + @Override + public AssetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetExportData", AssetExportData.class); + JSON.registerDiscriminator(AssetExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java b/pe/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java new file mode 100644 index 00000000..94e83fb2 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetProfileExportData extends EntityExportData { + public AssetProfileExportData() { + } + + @Override + public AssetProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileExportData", AssetProfileExportData.class); + JSON.registerDiscriminator(AssetProfileExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java b/pe/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java index d2703af9..989314e3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java +++ b/pe/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultAsset { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultAsset { public BulkImportResultAsset() { } - public BulkImportResultAsset created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultAsset created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultAsset created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultAsset updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultAsset errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultAsset bulkImportResultAsset = (BulkImportResultAsset) o; - return equalsNullable(this.created, bulkImportResultAsset.created) && - equalsNullable(this.updated, bulkImportResultAsset.updated) && - equalsNullable(this.errors, bulkImportResultAsset.errors) && + return Objects.equals(this.created, bulkImportResultAsset.created) && + Objects.equals(this.updated, bulkImportResultAsset.updated) && + Objects.equals(this.errors, bulkImportResultAsset.errors) && Objects.equals(this.errorsList, bulkImportResultAsset.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/pe/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java b/pe/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java index dfd9c000..04a16777 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java +++ b/pe/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultDevice { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultDevice { public BulkImportResultDevice() { } - public BulkImportResultDevice created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultDevice created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultDevice created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultDevice updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultDevice errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultDevice bulkImportResultDevice = (BulkImportResultDevice) o; - return equalsNullable(this.created, bulkImportResultDevice.created) && - equalsNullable(this.updated, bulkImportResultDevice.updated) && - equalsNullable(this.errors, bulkImportResultDevice.errors) && + return Objects.equals(this.created, bulkImportResultDevice.created) && + Objects.equals(this.updated, bulkImportResultDevice.updated) && + Objects.equals(this.errors, bulkImportResultDevice.errors) && Objects.equals(this.errorsList, bulkImportResultDevice.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/pe/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java b/pe/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java index db2ffa8f..15572565 100644 --- a/pe/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java +++ b/pe/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultEdge { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultEdge { public BulkImportResultEdge() { } - public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultEdge created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultEdge updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultEdge errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultEdge bulkImportResultEdge = (BulkImportResultEdge) o; - return equalsNullable(this.created, bulkImportResultEdge.created) && - equalsNullable(this.updated, bulkImportResultEdge.updated) && - equalsNullable(this.errors, bulkImportResultEdge.errors) && + return Objects.equals(this.created, bulkImportResultEdge.created) && + Objects.equals(this.updated, bulkImportResultEdge.updated) && + Objects.equals(this.errors, bulkImportResultEdge.errors) && Objects.equals(this.errorsList, bulkImportResultEdge.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/pe/src/main/java/org/thingsboard/client/model/ConverterExportData.java b/pe/src/main/java/org/thingsboard/client/model/ConverterExportData.java new file mode 100644 index 00000000..d2f22126 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/ConverterExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ConverterExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ConverterExportData extends EntityExportData { + public ConverterExportData() { + } + + @Override + public ConverterExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public ConverterExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public ConverterExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public ConverterExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public ConverterExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this ConverterExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConverterExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ConverterExportData", ConverterExportData.class); + JSON.registerDiscriminator(ConverterExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java index f9e508f1..c9723eef 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/CsvReportTemplateConfig.java @@ -77,14 +77,14 @@ public CsvReportTemplateConfig filters(@javax.annotation.Nullable List f } @Override - public CsvReportTemplateConfig components(@javax.annotation.Nonnull List components) { - this.setComponents(components); + public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.setNamePattern(namePattern); return this; } @Override - public CsvReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.setNamePattern(namePattern); + public CsvReportTemplateConfig components(@javax.annotation.Nonnull List components) { + this.setComponents(components); return this; } @@ -190,6 +190,11 @@ public String toUrlQueryString(String prefix) { } } + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -200,11 +205,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `timeDataPattern` to the URL query string if (getTimeDataPattern() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomerExportData.java b/pe/src/main/java/org/thingsboard/client/model/CustomerExportData.java new file mode 100644 index 00000000..af5c6235 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/CustomerExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * CustomerExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class CustomerExportData extends EntityExportData { + public CustomerExportData() { + } + + @Override + public CustomerExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public CustomerExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public CustomerExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public CustomerExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public CustomerExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this CustomerExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerExportData", CustomerExportData.class); + JSON.registerDiscriminator(CustomerExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/DashboardExportData.java b/pe/src/main/java/org/thingsboard/client/model/DashboardExportData.java new file mode 100644 index 00000000..236285a8 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/DashboardExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DashboardExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DashboardExportData extends EntityExportData { + public DashboardExportData() { + } + + @Override + public DashboardExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DashboardExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DashboardExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DashboardExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DashboardExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DashboardExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DashboardExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardExportData", DashboardExportData.class); + JSON.registerDiscriminator(DashboardExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java index e786f73b..7678be98 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java @@ -172,6 +172,12 @@ public void setNotifyOn(@javax.annotation.Nonnull Set notifyOn) { } + @Override + public DeviceActivityNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this DeviceActivityNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java new file mode 100644 index 00000000..937ead2e --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceActivityRecipientsConfig + */ +@JsonPropertyOrder({ + DeviceActivityRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class DeviceActivityRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public DeviceActivityRecipientsConfig() { + } + + public DeviceActivityRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public DeviceActivityRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this DeviceActivityRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceActivityRecipientsConfig deviceActivityRecipientsConfig = (DeviceActivityRecipientsConfig) o; + return Objects.equals(this.targets, deviceActivityRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceActivityRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceActivityRecipientsConfig", DeviceActivityRecipientsConfig.class); + JSON.registerDiscriminator(DeviceActivityRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java new file mode 100644 index 00000000..8d7146a3 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DeviceProfileExportData extends EntityExportData { + public DeviceProfileExportData() { + } + + @Override + public DeviceProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DeviceProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DeviceProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DeviceProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DeviceProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DeviceProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileExportData", DeviceProfileExportData.class); + JSON.registerDiscriminator(DeviceProfileExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java index ac43f101..77fcc393 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setEdges(@javax.annotation.Nullable Set edges) { } + @Override + public EdgeCommunicationFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeCommunicationFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java similarity index 70% rename from pe/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java rename to pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java index c3c292af..c598e977 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java @@ -41,11 +41,10 @@ import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * Default notification rule recipients configuration + * EdgeCommunicationFailureRecipientsConfig */ @JsonPropertyOrder({ - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TRIGGER_TYPE, - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TARGETS + EdgeCommunicationFailureRecipientsConfig.JSON_PROPERTY_TARGETS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -54,48 +53,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) -public class DefaultNotificationRuleRecipientsConfig extends NotificationRuleRecipientsConfig { - public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull - private NotificationRuleTriggerType triggerType = NotificationRuleTriggerType.ENTITY_ACTION; - +public class EdgeCommunicationFailureRecipientsConfig extends NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TARGETS = "targets"; @javax.annotation.Nonnull private List targets = new ArrayList<>(); - public DefaultNotificationRuleRecipientsConfig() { - } - - public DefaultNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get triggerType - * @return triggerType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotificationRuleTriggerType getTriggerType() { - return triggerType; - } - - - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; + public EdgeCommunicationFailureRecipientsConfig() { } - - public DefaultNotificationRuleRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + public EdgeCommunicationFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { this.targets = targets; return this; } - public DefaultNotificationRuleRecipientsConfig addTargetsItem(UUID targetsItem) { + public EdgeCommunicationFailureRecipientsConfig addTargetsItem(UUID targetsItem) { if (this.targets == null) { this.targets = new ArrayList<>(); } @@ -122,8 +93,14 @@ public void setTargets(@javax.annotation.Nonnull List targets) { } + @Override + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** - * Return true if this DefaultNotificationRuleRecipientsConfig object is equal to o. + * Return true if this EdgeCommunicationFailureRecipientsConfig object is equal to o. */ @Override public boolean equals(Object o) { @@ -133,23 +110,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DefaultNotificationRuleRecipientsConfig defaultNotificationRuleRecipientsConfig = (DefaultNotificationRuleRecipientsConfig) o; - return Objects.equals(this.triggerType, defaultNotificationRuleRecipientsConfig.triggerType) && - Objects.equals(this.targets, defaultNotificationRuleRecipientsConfig.targets) && + EdgeCommunicationFailureRecipientsConfig edgeCommunicationFailureRecipientsConfig = (EdgeCommunicationFailureRecipientsConfig) o; + return Objects.equals(this.targets, edgeCommunicationFailureRecipientsConfig.targets) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(triggerType, targets, super.hashCode()); + return Objects.hash(targets, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DefaultNotificationRuleRecipientsConfig {\n"); + sb.append("class EdgeCommunicationFailureRecipientsConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" triggerType: ").append(toIndentedString(triggerType)).append("\n"); sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,8 +194,8 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("DefaultNotificationRuleRecipientsConfig", DefaultNotificationRuleRecipientsConfig.class); - JSON.registerDiscriminator(DefaultNotificationRuleRecipientsConfig.class, "triggerType", mappings); + mappings.put("EdgeCommunicationFailureRecipientsConfig", EdgeCommunicationFailureRecipientsConfig.class); + JSON.registerDiscriminator(EdgeCommunicationFailureRecipientsConfig.class, "triggerType", mappings); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java index bca83fc2..ddb2335e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java @@ -134,6 +134,12 @@ public void setNotifyOn(@javax.annotation.Nullable Set no } + @Override + public EdgeConnectionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeConnectionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java new file mode 100644 index 00000000..e8a8443d --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EdgeConnectionRecipientsConfig + */ +@JsonPropertyOrder({ + EdgeConnectionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EdgeConnectionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EdgeConnectionRecipientsConfig() { + } + + public EdgeConnectionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EdgeConnectionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EdgeConnectionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EdgeConnectionRecipientsConfig edgeConnectionRecipientsConfig = (EdgeConnectionRecipientsConfig) o; + return Objects.equals(this.targets, edgeConnectionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EdgeConnectionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeConnectionRecipientsConfig", EdgeConnectionRecipientsConfig.class); + JSON.registerDiscriminator(EdgeConnectionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java index e7fd1178..0c43a420 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java @@ -125,6 +125,12 @@ public void setThreshold(@javax.annotation.Nullable Float threshold) { } + @Override + public EntitiesLimitNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntitiesLimitNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java new file mode 100644 index 00000000..0008b4fc --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntitiesLimitRecipientsConfig + */ +@JsonPropertyOrder({ + EntitiesLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntitiesLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntitiesLimitRecipientsConfig() { + } + + public EntitiesLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntitiesLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntitiesLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntitiesLimitRecipientsConfig entitiesLimitRecipientsConfig = (EntitiesLimitRecipientsConfig) o; + return Objects.equals(this.targets, entitiesLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntitiesLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntitiesLimitRecipientsConfig", EntitiesLimitRecipientsConfig.class); + JSON.registerDiscriminator(EntitiesLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java index 033afe05..1b5d49b5 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java @@ -182,6 +182,12 @@ public void setDeleted(@javax.annotation.Nullable Boolean deleted) { } + @Override + public EntityActionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntityActionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java new file mode 100644 index 00000000..80c67578 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityActionRecipientsConfig + */ +@JsonPropertyOrder({ + EntityActionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntityActionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntityActionRecipientsConfig() { + } + + public EntityActionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntityActionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntityActionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityActionRecipientsConfig entityActionRecipientsConfig = (EntityActionRecipientsConfig) o; + return Objects.equals(this.targets, entityActionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityActionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityActionRecipientsConfig", EntityActionRecipientsConfig.class); + JSON.registerDiscriminator(EntityActionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityExportData.java b/pe/src/main/java/org/thingsboard/client/model/EntityExportData.java index 51f3595c..f5638b2d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityExportData.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityExportData.java @@ -61,15 +61,26 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "ASSET"), - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "CUSTOMER"), - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "DASHBOARD"), + @JsonSubTypes.Type(value = AiModelExportData.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AssetExportData.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileExportData.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = ConverterExportData.class, name = "CONVERTER"), + @JsonSubTypes.Type(value = CustomerExportData.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardExportData.class, name = "DASHBOARD"), @JsonSubTypes.Type(value = DeviceExportData.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileExportData.class, name = "DEVICE_PROFILE"), @JsonSubTypes.Type(value = EntityGroupExportData.class, name = "ENTITY_GROUP"), - @JsonSubTypes.Type(value = GroupEntityExportData.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = EntityViewExportData.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = IntegrationExportData.class, name = "INTEGRATION"), + @JsonSubTypes.Type(value = NotificationRuleExportData.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetExportData.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateExportData.class, name = "NOTIFICATION_TEMPLATE"), @JsonSubTypes.Type(value = OtaPackageExportData.class, name = "OTA_PACKAGE"), + @JsonSubTypes.Type(value = ReportTemplateExportData.class, name = "REPORT_TEMPLATE"), + @JsonSubTypes.Type(value = RoleExportData.class, name = "ROLE"), @JsonSubTypes.Type(value = RuleChainExportData.class, name = "RULE_CHAIN"), @JsonSubTypes.Type(value = SchedulerEventExportData.class, name = "SCHEDULER_EVENT"), + @JsonSubTypes.Type(value = TbResourceExportData.class, name = "TB_RESOURCE"), @JsonSubTypes.Type(value = WidgetsBundleExportData.class, name = "WIDGETS_BUNDLE"), @JsonSubTypes.Type(value = WidgetTypeExportData.class, name = "WIDGET_TYPE"), }) @@ -366,15 +377,26 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("ASSET", GroupEntityExportData.class); - mappings.put("CUSTOMER", GroupEntityExportData.class); - mappings.put("DASHBOARD", GroupEntityExportData.class); + mappings.put("AI_MODEL", AiModelExportData.class); + mappings.put("ASSET", AssetExportData.class); + mappings.put("ASSET_PROFILE", AssetProfileExportData.class); + mappings.put("CONVERTER", ConverterExportData.class); + mappings.put("CUSTOMER", CustomerExportData.class); + mappings.put("DASHBOARD", DashboardExportData.class); mappings.put("DEVICE", DeviceExportData.class); + mappings.put("DEVICE_PROFILE", DeviceProfileExportData.class); mappings.put("ENTITY_GROUP", EntityGroupExportData.class); - mappings.put("ENTITY_VIEW", GroupEntityExportData.class); + mappings.put("ENTITY_VIEW", EntityViewExportData.class); + mappings.put("INTEGRATION", IntegrationExportData.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleExportData.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetExportData.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateExportData.class); mappings.put("OTA_PACKAGE", OtaPackageExportData.class); + mappings.put("REPORT_TEMPLATE", ReportTemplateExportData.class); + mappings.put("ROLE", RoleExportData.class); mappings.put("RULE_CHAIN", RuleChainExportData.class); mappings.put("SCHEDULER_EVENT", SchedulerEventExportData.class); + mappings.put("TB_RESOURCE", TbResourceExportData.class); mappings.put("WIDGETS_BUNDLE", WidgetsBundleExportData.class); mappings.put("WIDGET_TYPE", WidgetTypeExportData.class); mappings.put("EntityExportData", EntityExportData.class); diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityViewExportData.java b/pe/src/main/java/org/thingsboard/client/model/EntityViewExportData.java new file mode 100644 index 00000000..caf77159 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/EntityViewExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityViewExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class EntityViewExportData extends EntityExportData { + public EntityViewExportData() { + } + + @Override + public EntityViewExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public EntityViewExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public EntityViewExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public EntityViewExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public EntityViewExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this EntityViewExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityViewExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewExportData", EntityViewExportData.class); + JSON.registerDiscriminator(EntityViewExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java index efdd05d3..6867a75b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java @@ -94,6 +94,12 @@ public void setEscalationTable(@javax.annotation.Nonnull Map> } + @Override + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EscalatedNotificationRuleRecipientsConfig object is equal to o. */ diff --git a/paas/src/main/java/org/thingsboard/client/model/GroupEntityExportData.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationExportData.java similarity index 90% rename from paas/src/main/java/org/thingsboard/client/model/GroupEntityExportData.java rename to pe/src/main/java/org/thingsboard/client/model/IntegrationExportData.java index 55ef4df4..427fa831 100644 --- a/paas/src/main/java/org/thingsboard/client/model/GroupEntityExportData.java +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationExportData.java @@ -46,7 +46,7 @@ import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * GroupEntityExportData + * IntegrationExportData */ @JsonPropertyOrder({ }) @@ -57,42 +57,42 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) -public class GroupEntityExportData extends EntityExportData { - public GroupEntityExportData() { +public class IntegrationExportData extends EntityExportData { + public IntegrationExportData() { } @Override - public GroupEntityExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + public IntegrationExportData entityType(@javax.annotation.Nonnull EntityType entityType) { this.setEntityType(entityType); return this; } @Override - public GroupEntityExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + public IntegrationExportData entity(@javax.annotation.Nullable ExportableEntity entity) { this.setEntity(entity); return this; } @Override - public GroupEntityExportData relations(@javax.annotation.Nullable List relations) { + public IntegrationExportData relations(@javax.annotation.Nullable List relations) { this.setRelations(relations); return this; } @Override - public GroupEntityExportData attributes(@javax.annotation.Nullable Map> attributes) { + public IntegrationExportData attributes(@javax.annotation.Nullable Map> attributes) { this.setAttributes(attributes); return this; } @Override - public GroupEntityExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + public IntegrationExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { this.setCalculatedFields(calculatedFields); return this; } /** - * Return true if this GroupEntityExportData object is equal to o. + * Return true if this IntegrationExportData object is equal to o. */ @Override public boolean equals(Object o) { @@ -113,7 +113,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GroupEntityExportData {\n"); + sb.append("class IntegrationExportData {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); @@ -206,8 +206,8 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("GroupEntityExportData", GroupEntityExportData.class); - JSON.registerDiscriminator(GroupEntityExportData.class, "entityType", mappings); + mappings.put("IntegrationExportData", IntegrationExportData.class); + JSON.registerDiscriminator(IntegrationExportData.class, "entityType", mappings); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java index 08e16562..bb17b583 100644 --- a/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventNotificationRuleTriggerConfig.java @@ -202,6 +202,12 @@ public void setOnlyOnError(@javax.annotation.Nullable Boolean onlyOnError) { } + @Override + public IntegrationLifecycleEventNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this IntegrationLifecycleEventNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java new file mode 100644 index 00000000..b9c5d542 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * IntegrationLifecycleEventRecipientsConfig + */ +@JsonPropertyOrder({ + IntegrationLifecycleEventRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class IntegrationLifecycleEventRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public IntegrationLifecycleEventRecipientsConfig() { + } + + public IntegrationLifecycleEventRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public IntegrationLifecycleEventRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public IntegrationLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this IntegrationLifecycleEventRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationLifecycleEventRecipientsConfig integrationLifecycleEventRecipientsConfig = (IntegrationLifecycleEventRecipientsConfig) o; + return Objects.equals(this.targets, integrationLifecycleEventRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationLifecycleEventRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("IntegrationLifecycleEventRecipientsConfig", IntegrationLifecycleEventRecipientsConfig.class); + JSON.registerDiscriminator(IntegrationLifecycleEventRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java index 7de78c92..79df485c 100644 --- a/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java @@ -694,6 +694,16 @@ public String toUrlQueryString(String prefix) { joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } + // add `notificationRecipient` to the URL query string + if (getNotificationRecipient() != null) { + joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); + } + + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + } + // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -724,16 +734,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } - // add `notificationRecipient` to the URL query string - if (getNotificationRecipient() != null) { - joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); - } - - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `privacyPolicy` to the URL query string if (getPrivacyPolicy() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sprivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrivacyPolicy())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java index 910f35c6..ebb08c63 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class NewPlatformVersionNotificationRuleTriggerConfig extends Notificatio public NewPlatformVersionNotificationRuleTriggerConfig() { } + @Override + public NewPlatformVersionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this NewPlatformVersionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java new file mode 100644 index 00000000..97cc594a --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NewPlatformVersionRecipientsConfig + */ +@JsonPropertyOrder({ + NewPlatformVersionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class NewPlatformVersionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public NewPlatformVersionRecipientsConfig() { + } + + public NewPlatformVersionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public NewPlatformVersionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this NewPlatformVersionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewPlatformVersionRecipientsConfig newPlatformVersionRecipientsConfig = (NewPlatformVersionRecipientsConfig) o; + return Objects.equals(this.targets, newPlatformVersionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewPlatformVersionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NewPlatformVersionRecipientsConfig", NewPlatformVersionRecipientsConfig.class); + JSON.registerDiscriminator(NewPlatformVersionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java b/pe/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java index 73d4c129..0b7e0e58 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java @@ -29,10 +29,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -51,14 +47,15 @@ public class NotificationRequestStats { public static final String JSON_PROPERTY_SENT = "sent"; @javax.annotation.Nullable - private Map sent = new HashMap<>(); + private Map sent = new HashMap<>(); public static final String JSON_PROPERTY_ERRORS = "errors"; @javax.annotation.Nullable private Map> errors = new HashMap<>(); public static final String JSON_PROPERTY_TOTAL_ERRORS = "totalErrors"; - private JsonNullable totalErrors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer totalErrors; public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable @@ -71,12 +68,12 @@ public class NotificationRequestStats { public NotificationRequestStats() { } - public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { + public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { this.sent = sent; return this; } - public NotificationRequestStats putSentItem(String key, Object sentItem) { + public NotificationRequestStats putSentItem(String key, Integer sentItem) { if (this.sent == null) { this.sent = new HashMap<>(); } @@ -90,15 +87,15 @@ public NotificationRequestStats putSentItem(String key, Object sentItem) { */ @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getSent() { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSent() { return sent; } @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setSent(@javax.annotation.Nullable Map sent) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSent(@javax.annotation.Nullable Map sent) { this.sent = sent; } @@ -135,8 +132,8 @@ public void setErrors(@javax.annotation.Nullable Map } - public NotificationRequestStats totalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + public NotificationRequestStats totalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; return this; } @@ -145,25 +142,17 @@ public NotificationRequestStats totalErrors(@javax.annotation.Nullable Object to * @return totalErrors */ @javax.annotation.Nullable - @JsonIgnore - public Object getTotalErrors() { - return totalErrors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getTotalErrors_JsonNullable() { + public Integer getTotalErrors() { return totalErrors; } - - @JsonProperty(JSON_PROPERTY_TOTAL_ERRORS) - public void setTotalErrors_JsonNullable(JsonNullable totalErrors) { - this.totalErrors = totalErrors; - } - public void setTotalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + + @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; } @@ -229,25 +218,14 @@ public boolean equals(Object o) { NotificationRequestStats notificationRequestStats = (NotificationRequestStats) o; return Objects.equals(this.sent, notificationRequestStats.sent) && Objects.equals(this.errors, notificationRequestStats.errors) && - equalsNullable(this.totalErrors, notificationRequestStats.totalErrors) && + Objects.equals(this.totalErrors, notificationRequestStats.totalErrors) && Objects.equals(this.error, notificationRequestStats.error) && Objects.equals(this.totalSent, notificationRequestStats.totalSent); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(sent, errors, hashCodeNullable(totalErrors), error, totalSent); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(sent, errors, totalErrors, error, totalSent); } @Override diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java new file mode 100644 index 00000000..15ccb3a8 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationRuleExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationRuleExportData extends EntityExportData { + public NotificationRuleExportData() { + } + + @Override + public NotificationRuleExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationRuleExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationRuleExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationRuleExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationRuleExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationRuleExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRuleExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleExportData", NotificationRuleExportData.class); + JSON.registerDiscriminator(NotificationRuleExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index 001dedaf..cff3b700 100644 --- a/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -50,20 +50,20 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = EscalatedNotificationRuleRecipientsConfig.class, name = "ALARM"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_COMMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "API_USAGE_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "DEVICE_ACTIVITY"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_CONNECTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITIES_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITY_ACTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "INTEGRATION_LIFECYCLE_EVENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RATE_LIMITS"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), + @JsonSubTypes.Type(value = AlarmAssignmentRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), + @JsonSubTypes.Type(value = AlarmCommentRecipientsConfig.class, name = "ALARM_COMMENT"), + @JsonSubTypes.Type(value = ApiUsageLimitRecipientsConfig.class, name = "API_USAGE_LIMIT"), + @JsonSubTypes.Type(value = DeviceActivityRecipientsConfig.class, name = "DEVICE_ACTIVITY"), + @JsonSubTypes.Type(value = EdgeCommunicationFailureRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), + @JsonSubTypes.Type(value = EdgeConnectionRecipientsConfig.class, name = "EDGE_CONNECTION"), + @JsonSubTypes.Type(value = EntitiesLimitRecipientsConfig.class, name = "ENTITIES_LIMIT"), + @JsonSubTypes.Type(value = EntityActionRecipientsConfig.class, name = "ENTITY_ACTION"), + @JsonSubTypes.Type(value = IntegrationLifecycleEventRecipientsConfig.class, name = "INTEGRATION_LIFECYCLE_EVENT"), + @JsonSubTypes.Type(value = NewPlatformVersionRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), + @JsonSubTypes.Type(value = RateLimitsRecipientsConfig.class, name = "RATE_LIMITS"), + @JsonSubTypes.Type(value = ResourceShortageRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), + @JsonSubTypes.Type(value = RuleEngineComponentLifecycleEventRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), + @JsonSubTypes.Type(value = TaskProcessingFailureRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), }) public class NotificationRuleRecipientsConfig { @@ -181,20 +181,20 @@ public String toUrlQueryString(String prefix) { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); mappings.put("ALARM", EscalatedNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_ASSIGNMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_COMMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("API_USAGE_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("DEVICE_ACTIVITY", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_COMMUNICATION_FAILURE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_CONNECTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITIES_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITY_ACTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("INTEGRATION_LIFECYCLE_EVENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("NEW_PLATFORM_VERSION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RATE_LIMITS", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RESOURCES_SHORTAGE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("TASK_PROCESSING_FAILURE", DefaultNotificationRuleRecipientsConfig.class); + mappings.put("ALARM_ASSIGNMENT", AlarmAssignmentRecipientsConfig.class); + mappings.put("ALARM_COMMENT", AlarmCommentRecipientsConfig.class); + mappings.put("API_USAGE_LIMIT", ApiUsageLimitRecipientsConfig.class); + mappings.put("DEVICE_ACTIVITY", DeviceActivityRecipientsConfig.class); + mappings.put("EDGE_COMMUNICATION_FAILURE", EdgeCommunicationFailureRecipientsConfig.class); + mappings.put("EDGE_CONNECTION", EdgeConnectionRecipientsConfig.class); + mappings.put("ENTITIES_LIMIT", EntitiesLimitRecipientsConfig.class); + mappings.put("ENTITY_ACTION", EntityActionRecipientsConfig.class); + mappings.put("INTEGRATION_LIFECYCLE_EVENT", IntegrationLifecycleEventRecipientsConfig.class); + mappings.put("NEW_PLATFORM_VERSION", NewPlatformVersionRecipientsConfig.class); + mappings.put("RATE_LIMITS", RateLimitsRecipientsConfig.class); + mappings.put("RESOURCES_SHORTAGE", ResourceShortageRecipientsConfig.class); + mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", RuleEngineComponentLifecycleEventRecipientsConfig.class); + mappings.put("TASK_PROCESSING_FAILURE", TaskProcessingFailureRecipientsConfig.class); mappings.put("NotificationRuleRecipientsConfig", NotificationRuleRecipientsConfig.class); JSON.registerDiscriminator(NotificationRuleRecipientsConfig.class, "triggerType", mappings); } diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java b/pe/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java new file mode 100644 index 00000000..84fa3fcb --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationTargetExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTargetExportData extends EntityExportData { + public NotificationTargetExportData() { + } + + @Override + public NotificationTargetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationTargetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationTargetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationTargetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationTargetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationTargetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTargetExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTargetExportData", NotificationTargetExportData.class); + JSON.registerDiscriminator(NotificationTargetExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java b/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java new file mode 100644 index 00000000..be691034 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationTemplateExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTemplateExportData extends EntityExportData { + public NotificationTemplateExportData() { + } + + @Override + public NotificationTemplateExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationTemplateExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationTemplateExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationTemplateExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationTemplateExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationTemplateExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTemplateExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateExportData", NotificationTemplateExportData.class); + JSON.registerDiscriminator(NotificationTemplateExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java index f6dc0e80..83edb1a9 100644 --- a/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/PdfReportTemplateConfig.java @@ -255,14 +255,14 @@ public PdfReportTemplateConfig filters(@javax.annotation.Nullable List f } @Override - public PdfReportTemplateConfig components(@javax.annotation.Nonnull List components) { - this.setComponents(components); + public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.setNamePattern(namePattern); return this; } @Override - public PdfReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.setNamePattern(namePattern); + public PdfReportTemplateConfig components(@javax.annotation.Nonnull List components) { + this.setComponents(components); return this; } @@ -381,6 +381,11 @@ public String toUrlQueryString(String prefix) { } } + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -391,11 +396,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `timeDataPattern` to the URL query string if (getTimeDataPattern() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java index a5469145..e52858c5 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setApis(@javax.annotation.Nullable Set apis) { } + @Override + public RateLimitsNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RateLimitsNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java new file mode 100644 index 00000000..ddd4e212 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RateLimitsRecipientsConfig + */ +@JsonPropertyOrder({ + RateLimitsRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RateLimitsRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RateLimitsRecipientsConfig() { + } + + public RateLimitsRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RateLimitsRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RateLimitsRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RateLimitsRecipientsConfig rateLimitsRecipientsConfig = (RateLimitsRecipientsConfig) o; + return Objects.equals(this.targets, rateLimitsRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RateLimitsRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RateLimitsRecipientsConfig", RateLimitsRecipientsConfig.class); + JSON.registerDiscriminator(RateLimitsRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java index 0f86fbb4..fe29bd9e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateConfig.java @@ -48,8 +48,8 @@ ReportTemplateConfig.JSON_PROPERTY_FORMAT, ReportTemplateConfig.JSON_PROPERTY_ENTITY_ALIASES, ReportTemplateConfig.JSON_PROPERTY_FILTERS, - ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, ReportTemplateConfig.JSON_PROPERTY_NAME_PATTERN, + ReportTemplateConfig.JSON_PROPERTY_COMPONENTS, ReportTemplateConfig.JSON_PROPERTY_TIME_DATA_PATTERN }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -76,14 +76,14 @@ public class ReportTemplateConfig { @javax.annotation.Nullable private List filters = new ArrayList<>(); - public static final String JSON_PROPERTY_COMPONENTS = "components"; - @javax.annotation.Nullable - private List components = new ArrayList<>(); - public static final String JSON_PROPERTY_NAME_PATTERN = "namePattern"; @javax.annotation.Nullable private String namePattern; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + @javax.annotation.Nullable + private List components = new ArrayList<>(); + public static final String JSON_PROPERTY_TIME_DATA_PATTERN = "timeDataPattern"; @javax.annotation.Nullable private String timeDataPattern; @@ -179,6 +179,30 @@ public void setFilters(@javax.annotation.Nullable List filters) { } + public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * Get namePattern + * @return namePattern + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamePattern() { + return namePattern; + } + + + @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public ReportTemplateConfig components(@javax.annotation.Nullable List components) { this.components = components; return this; @@ -211,30 +235,6 @@ public void setComponents(@javax.annotation.Nullable List compo } - public ReportTemplateConfig namePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - return this; - } - - /** - * Get namePattern - * @return namePattern - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNamePattern() { - return namePattern; - } - - - @JsonProperty(value = JSON_PROPERTY_NAME_PATTERN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamePattern(@javax.annotation.Nullable String namePattern) { - this.namePattern = namePattern; - } - - public ReportTemplateConfig timeDataPattern(@javax.annotation.Nullable String timeDataPattern) { this.timeDataPattern = timeDataPattern; return this; @@ -274,14 +274,14 @@ public boolean equals(Object o) { return Objects.equals(this.format, reportTemplateConfig.format) && Objects.equals(this.entityAliases, reportTemplateConfig.entityAliases) && Objects.equals(this.filters, reportTemplateConfig.filters) && - Objects.equals(this.components, reportTemplateConfig.components) && Objects.equals(this.namePattern, reportTemplateConfig.namePattern) && + Objects.equals(this.components, reportTemplateConfig.components) && Objects.equals(this.timeDataPattern, reportTemplateConfig.timeDataPattern); } @Override public int hashCode() { - return Objects.hash(format, entityAliases, filters, components, namePattern, timeDataPattern); + return Objects.hash(format, entityAliases, filters, namePattern, components, timeDataPattern); } @Override @@ -291,8 +291,8 @@ public String toString() { sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" entityAliases: ").append(toIndentedString(entityAliases)).append("\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); sb.append(" timeDataPattern: ").append(toIndentedString(timeDataPattern)).append("\n"); sb.append("}"); return sb.toString(); @@ -366,6 +366,11 @@ public String toUrlQueryString(String prefix) { } } + // add `namePattern` to the URL query string + if (getNamePattern() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); + } + // add `components` to the URL query string if (getComponents() != null) { for (int i = 0; i < getComponents().size(); i++) { @@ -376,11 +381,6 @@ public String toUrlQueryString(String prefix) { } } - // add `namePattern` to the URL query string - if (getNamePattern() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%snamePattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNamePattern())))); - } - // add `timeDataPattern` to the URL query string if (getTimeDataPattern() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stimeDataPattern%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimeDataPattern())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java new file mode 100644 index 00000000..24649549 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ReportTemplateExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class ReportTemplateExportData extends EntityExportData { + public ReportTemplateExportData() { + } + + @Override + public ReportTemplateExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public ReportTemplateExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public ReportTemplateExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public ReportTemplateExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public ReportTemplateExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this ReportTemplateExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportTemplateExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ReportTemplateExportData", ReportTemplateExportData.class); + JSON.registerDiscriminator(ReportTemplateExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java new file mode 100644 index 00000000..fec24a83 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ResourceShortageRecipientsConfig + */ +@JsonPropertyOrder({ + ResourceShortageRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ResourceShortageRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ResourceShortageRecipientsConfig() { + } + + public ResourceShortageRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ResourceShortageRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ResourceShortageRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceShortageRecipientsConfig resourceShortageRecipientsConfig = (ResourceShortageRecipientsConfig) o; + return Objects.equals(this.targets, resourceShortageRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceShortageRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ResourceShortageRecipientsConfig", ResourceShortageRecipientsConfig.class); + JSON.registerDiscriminator(ResourceShortageRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java index 0519c2bf..95d50463 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java @@ -143,6 +143,12 @@ public void setStorageThreshold(@javax.annotation.Nullable Float storageThreshol } + @Override + public ResourcesShortageNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this ResourcesShortageNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/RoleExportData.java b/pe/src/main/java/org/thingsboard/client/model/RoleExportData.java new file mode 100644 index 00000000..cb7577d4 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/RoleExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RoleExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class RoleExportData extends EntityExportData { + public RoleExportData() { + } + + @Override + public RoleExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public RoleExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public RoleExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public RoleExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public RoleExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this RoleExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoleExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RoleExportData", RoleExportData.class); + JSON.registerDiscriminator(RoleExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java index 3c22091f..c42a67e4 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java @@ -259,6 +259,12 @@ public void setOnlyRuleNodeLifecycleFailures(@javax.annotation.Nullable Boolean } + @Override + public RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java new file mode 100644 index 00000000..ba2ded17 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RuleEngineComponentLifecycleEventRecipientsConfig + */ +@JsonPropertyOrder({ + RuleEngineComponentLifecycleEventRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RuleEngineComponentLifecycleEventRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RuleEngineComponentLifecycleEventRecipientsConfig() { + } + + public RuleEngineComponentLifecycleEventRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RuleEngineComponentLifecycleEventRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RuleEngineComponentLifecycleEventRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuleEngineComponentLifecycleEventRecipientsConfig ruleEngineComponentLifecycleEventRecipientsConfig = (RuleEngineComponentLifecycleEventRecipientsConfig) o; + return Objects.equals(this.targets, ruleEngineComponentLifecycleEventRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuleEngineComponentLifecycleEventRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleEngineComponentLifecycleEventRecipientsConfig", RuleEngineComponentLifecycleEventRecipientsConfig.class); + JSON.registerDiscriminator(RuleEngineComponentLifecycleEventRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java index c260e1c5..b81fc8a4 100644 --- a/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/SelfRegistrationParams.java @@ -57,13 +57,13 @@ SelfRegistrationParams.JSON_PROPERTY_TITLE, SelfRegistrationParams.JSON_PROPERTY_ENABLED, SelfRegistrationParams.JSON_PROPERTY_HOME_DASHBOARD, + SelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, + SelfRegistrationParams.JSON_PROPERTY_CAPTCHA, SelfRegistrationParams.JSON_PROPERTY_SIGN_UP_FIELDS, SelfRegistrationParams.JSON_PROPERTY_DEFAULT_DASHBOARD, SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_TITLE_PREFIX, SelfRegistrationParams.JSON_PROPERTY_CUSTOM_MENU_ID, - SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID, - SelfRegistrationParams.JSON_PROPERTY_NOTIFICATION_RECIPIENT, - SelfRegistrationParams.JSON_PROPERTY_CAPTCHA + SelfRegistrationParams.JSON_PROPERTY_CUSTOMER_GROUP_ID }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -105,6 +105,14 @@ public class SelfRegistrationParams { @javax.annotation.Nullable private HomeDashboardParams homeDashboard; + public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; + @javax.annotation.Nullable + private NotificationTargetId notificationRecipient; + + public static final String JSON_PROPERTY_CAPTCHA = "captcha"; + @javax.annotation.Nullable + private CaptchaParams captcha; + public static final String JSON_PROPERTY_SIGN_UP_FIELDS = "signUpFields"; @javax.annotation.Nullable private List signUpFields = new ArrayList<>(); @@ -125,14 +133,6 @@ public class SelfRegistrationParams { @javax.annotation.Nullable private EntityGroupId customerGroupId; - public static final String JSON_PROPERTY_NOTIFICATION_RECIPIENT = "notificationRecipient"; - @javax.annotation.Nullable - private NotificationTargetId notificationRecipient; - - public static final String JSON_PROPERTY_CAPTCHA = "captcha"; - @javax.annotation.Nullable - private CaptchaParams captcha; - public SelfRegistrationParams() { } @@ -312,6 +312,54 @@ public void setHomeDashboard(@javax.annotation.Nullable HomeDashboardParams home } + public SelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { + this.notificationRecipient = notificationRecipient; + return this; + } + + /** + * Get notificationRecipient + * @return notificationRecipient + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NotificationTargetId getNotificationRecipient() { + return notificationRecipient; + } + + + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { + this.notificationRecipient = notificationRecipient; + } + + + public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; + return this; + } + + /** + * Get captcha + * @return captcha + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CaptchaParams getCaptcha() { + return captcha; + } + + + @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { + this.captcha = captcha; + } + + public SelfRegistrationParams signUpFields(@javax.annotation.Nullable List signUpFields) { this.signUpFields = signUpFields; return this; @@ -440,54 +488,6 @@ public void setCustomerGroupId(@javax.annotation.Nullable EntityGroupId customer } - public SelfRegistrationParams notificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - return this; - } - - /** - * Get notificationRecipient - * @return notificationRecipient - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NotificationTargetId getNotificationRecipient() { - return notificationRecipient; - } - - - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_RECIPIENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationRecipient(@javax.annotation.Nullable NotificationTargetId notificationRecipient) { - this.notificationRecipient = notificationRecipient; - } - - - public SelfRegistrationParams captcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; - return this; - } - - /** - * Get captcha - * @return captcha - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CaptchaParams getCaptcha() { - return captcha; - } - - - @JsonProperty(value = JSON_PROPERTY_CAPTCHA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCaptcha(@javax.annotation.Nullable CaptchaParams captcha) { - this.captcha = captcha; - } - - /** * Return true if this SelfRegistrationParams object is equal to o. */ @@ -507,18 +507,18 @@ public boolean equals(Object o) { Objects.equals(this.title, selfRegistrationParams.title) && Objects.equals(this.enabled, selfRegistrationParams.enabled) && Objects.equals(this.homeDashboard, selfRegistrationParams.homeDashboard) && + Objects.equals(this.notificationRecipient, selfRegistrationParams.notificationRecipient) && + Objects.equals(this.captcha, selfRegistrationParams.captcha) && Objects.equals(this.signUpFields, selfRegistrationParams.signUpFields) && Objects.equals(this.defaultDashboard, selfRegistrationParams.defaultDashboard) && Objects.equals(this.customerTitlePrefix, selfRegistrationParams.customerTitlePrefix) && Objects.equals(this.customMenuId, selfRegistrationParams.customMenuId) && - Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId) && - Objects.equals(this.notificationRecipient, selfRegistrationParams.notificationRecipient) && - Objects.equals(this.captcha, selfRegistrationParams.captcha); + Objects.equals(this.customerGroupId, selfRegistrationParams.customerGroupId); } @Override public int hashCode() { - return Objects.hash(permissions, type, showPrivacyPolicy, showTermsOfUse, title, enabled, homeDashboard, signUpFields, defaultDashboard, customerTitlePrefix, customMenuId, customerGroupId, notificationRecipient, captcha); + return Objects.hash(permissions, type, showPrivacyPolicy, showTermsOfUse, title, enabled, homeDashboard, notificationRecipient, captcha, signUpFields, defaultDashboard, customerTitlePrefix, customMenuId, customerGroupId); } @Override @@ -532,13 +532,13 @@ public String toString() { sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" homeDashboard: ").append(toIndentedString(homeDashboard)).append("\n"); + sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); + sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); sb.append(" signUpFields: ").append(toIndentedString(signUpFields)).append("\n"); sb.append(" defaultDashboard: ").append(toIndentedString(defaultDashboard)).append("\n"); sb.append(" customerTitlePrefix: ").append(toIndentedString(customerTitlePrefix)).append("\n"); sb.append(" customMenuId: ").append(toIndentedString(customMenuId)).append("\n"); sb.append(" customerGroupId: ").append(toIndentedString(customerGroupId)).append("\n"); - sb.append(" notificationRecipient: ").append(toIndentedString(notificationRecipient)).append("\n"); - sb.append(" captcha: ").append(toIndentedString(captcha)).append("\n"); sb.append("}"); return sb.toString(); } @@ -626,6 +626,16 @@ public String toUrlQueryString(String prefix) { joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } + // add `notificationRecipient` to the URL query string + if (getNotificationRecipient() != null) { + joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); + } + + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + } + // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -656,16 +666,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } - // add `notificationRecipient` to the URL query string - if (getNotificationRecipient() != null) { - joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); - } - - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java b/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java index 464e1cb0..ca2153f1 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class TaskProcessingFailureNotificationRuleTriggerConfig extends Notifica public TaskProcessingFailureNotificationRuleTriggerConfig() { } + @Override + public TaskProcessingFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this TaskProcessingFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java new file mode 100644 index 00000000..b6f7856b --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TaskProcessingFailureRecipientsConfig + */ +@JsonPropertyOrder({ + TaskProcessingFailureRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class TaskProcessingFailureRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public TaskProcessingFailureRecipientsConfig() { + } + + public TaskProcessingFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public TaskProcessingFailureRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this TaskProcessingFailureRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaskProcessingFailureRecipientsConfig taskProcessingFailureRecipientsConfig = (TaskProcessingFailureRecipientsConfig) o; + return Objects.equals(this.targets, taskProcessingFailureRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaskProcessingFailureRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TaskProcessingFailureRecipientsConfig", TaskProcessingFailureRecipientsConfig.class); + JSON.registerDiscriminator(TaskProcessingFailureRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/TbResourceExportData.java b/pe/src/main/java/org/thingsboard/client/model/TbResourceExportData.java new file mode 100644 index 00000000..90e90f36 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/TbResourceExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TbResourceExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TbResourceExportData extends EntityExportData { + public TbResourceExportData() { + } + + @Override + public TbResourceExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public TbResourceExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public TbResourceExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public TbResourceExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public TbResourceExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this TbResourceExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TbResourceExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceExportData", TbResourceExportData.class); + JSON.registerDiscriminator(TbResourceExportData.class, "entityType", mappings); +} +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java index 033de962..3fefdd94 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java +++ b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java @@ -46,10 +46,10 @@ TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, TsKvEntry.JSON_PROPERTY_LONG_VALUE, TsKvEntry.JSON_PROPERTY_BOOLEAN_VALUE, + TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, TsKvEntry.JSON_PROPERTY_DATA_TYPE, TsKvEntry.JSON_PROPERTY_JSON_VALUE, TsKvEntry.JSON_PROPERTY_STR_VALUE, - TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, TsKvEntry.JSON_PROPERTY_VERSION }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @@ -77,6 +77,10 @@ public class TsKvEntry { @javax.annotation.Nullable private Boolean booleanValue; + public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; + @javax.annotation.Nullable + private String valueAsString; + public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; @javax.annotation.Nullable private DataType dataType; @@ -89,10 +93,6 @@ public class TsKvEntry { @javax.annotation.Nullable private String strValue; - public static final String JSON_PROPERTY_VALUE_AS_STRING = "valueAsString"; - @javax.annotation.Nullable - private String valueAsString; - public static final String JSON_PROPERTY_VERSION = "version"; @javax.annotation.Nullable private Long version; @@ -252,6 +252,30 @@ public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { } + public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; + return this; + } + + /** + * Get valueAsString + * @return valueAsString + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValueAsString() { + return valueAsString; + } + + + @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValueAsString(@javax.annotation.Nullable String valueAsString) { + this.valueAsString = valueAsString; + } + + public TsKvEntry dataType(@javax.annotation.Nullable DataType dataType) { this.dataType = dataType; return this; @@ -324,30 +348,6 @@ public void setStrValue(@javax.annotation.Nullable String strValue) { } - public TsKvEntry valueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; - return this; - } - - /** - * Get valueAsString - * @return valueAsString - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValueAsString() { - return valueAsString; - } - - - @JsonProperty(value = JSON_PROPERTY_VALUE_AS_STRING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValueAsString(@javax.annotation.Nullable String valueAsString) { - this.valueAsString = valueAsString; - } - - public TsKvEntry version(@javax.annotation.Nullable Long version) { this.version = version; return this; @@ -390,10 +390,10 @@ public boolean equals(Object o) { Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && Objects.equals(this.longValue, tsKvEntry.longValue) && Objects.equals(this.booleanValue, tsKvEntry.booleanValue) && + Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && Objects.equals(this.dataType, tsKvEntry.dataType) && Objects.equals(this.jsonValue, tsKvEntry.jsonValue) && Objects.equals(this.strValue, tsKvEntry.strValue) && - Objects.equals(this.valueAsString, tsKvEntry.valueAsString) && Objects.equals(this.version, tsKvEntry.version); } @@ -403,7 +403,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, dataType, jsonValue, strValue, valueAsString, version); + return Objects.hash(ts, hashCodeNullable(value), key, doubleValue, longValue, booleanValue, valueAsString, dataType, jsonValue, strValue, version); } private static int hashCodeNullable(JsonNullable a) { @@ -423,10 +423,10 @@ public String toString() { sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); sb.append(" longValue: ").append(toIndentedString(longValue)).append("\n"); sb.append(" booleanValue: ").append(toIndentedString(booleanValue)).append("\n"); + sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); sb.append(" jsonValue: ").append(toIndentedString(jsonValue)).append("\n"); sb.append(" strValue: ").append(toIndentedString(strValue)).append("\n"); - sb.append(" valueAsString: ").append(toIndentedString(valueAsString)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); @@ -505,6 +505,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sbooleanValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBooleanValue())))); } + // add `valueAsString` to the URL query string + if (getValueAsString() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); + } + // add `dataType` to the URL query string if (getDataType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sdataType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDataType())))); @@ -520,11 +525,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sstrValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStrValue())))); } - // add `valueAsString` to the URL query string - if (getValueAsString() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%svalueAsString%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueAsString())))); - } - // add `version` to the URL query string if (getVersion() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); diff --git a/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java b/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java index daae45c5..97ac72bb 100644 --- a/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java +++ b/pe/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java @@ -694,6 +694,16 @@ public String toUrlQueryString(String prefix) { joiner.add(getHomeDashboard().toUrlQueryString(prefix + "homeDashboard" + suffix)); } + // add `notificationRecipient` to the URL query string + if (getNotificationRecipient() != null) { + joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); + } + + // add `captcha` to the URL query string + if (getCaptcha() != null) { + joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); + } + // add `signUpFields` to the URL query string if (getSignUpFields() != null) { for (int i = 0; i < getSignUpFields().size(); i++) { @@ -724,16 +734,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getCustomerGroupId().toUrlQueryString(prefix + "customerGroupId" + suffix)); } - // add `notificationRecipient` to the URL query string - if (getNotificationRecipient() != null) { - joiner.add(getNotificationRecipient().toUrlQueryString(prefix + "notificationRecipient" + suffix)); - } - - // add `captcha` to the URL query string - if (getCaptcha() != null) { - joiner.add(getCaptcha().toUrlQueryString(prefix + "captcha" + suffix)); - } - // add `privacyPolicy` to the URL query string if (getPrivacyPolicy() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sprivacyPolicy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPrivacyPolicy())))); diff --git a/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java b/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java index 950a2648..428fb2de 100644 --- a/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/CalculatedFieldApiTest.java @@ -17,6 +17,12 @@ import org.junit.jupiter.api.Test; import org.thingsboard.client.ApiException; +import org.thingsboard.client.model.AlarmCalculatedFieldConfiguration; +import org.thingsboard.client.model.AlarmConditionValueAlarmRuleSchedule; +import org.thingsboard.client.model.AlarmRuleDefinition; +import org.thingsboard.client.model.AlarmRuleSimpleCondition; +import org.thingsboard.client.model.AlarmRuleSpecificTimeSchedule; +import org.thingsboard.client.model.AlarmSeverity; import org.thingsboard.client.model.Argument; import org.thingsboard.client.model.ArgumentType; import org.thingsboard.client.model.CalculatedField; @@ -27,14 +33,18 @@ import org.thingsboard.client.model.PageDataCalculatedField; import org.thingsboard.client.model.ReferencedEntityKey; import org.thingsboard.client.model.SimpleCalculatedFieldConfiguration; +import org.thingsboard.client.model.TbelAlarmConditionExpression; import org.thingsboard.client.model.TimeSeriesOutput; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; public class CalculatedFieldApiTest extends AbstractApiTest { @@ -126,14 +136,14 @@ void testCalculatedFieldLifecycle() throws ApiException { } // get calculated fields by entity id for device1 - PageDataCalculatedField device1Fields = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device1Fields = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice1.getId().getId().toString(), 100, 0, CalculatedFieldType.SIMPLE, null, null, null); assertNotNull(device1Fields); assertEquals(5, device1Fields.getData().size()); // get calculated fields by entity id for device2 - PageDataCalculatedField device2Fields = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device2Fields = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice2.getId().getId().toString(), 100, 0, CalculatedFieldType.SIMPLE, null, null, null); assertEquals(3, device2Fields.getData().size()); @@ -166,10 +176,122 @@ void testCalculatedFieldLifecycle() throws ApiException { client.getCalculatedFieldById(fieldToDeleteId.toString()) ); - PageDataCalculatedField device1FieldsAfterDelete = client.getCalculatedFieldsByEntityIdV2( + PageDataCalculatedField device1FieldsAfterDelete = client.getCalculatedFieldsByEntityId( EntityType.DEVICE.toString(), createdDevice1.getId().getId().toString(), 100, 0, null, null, null, null); assertEquals(4, device1FieldsAfterDelete.getData().size()); } + @Test + void testAlarmCalculatedFieldLifecycle() throws ApiException { + long timestamp = System.currentTimeMillis(); + + // create a device to attach the alarm calculated field to + Device device = new Device(); + device.setName("AlarmCalcFieldDevice_" + timestamp); + device.setType("default"); + Device createdDevice = client.saveDevice(device, null, null, null, null, null, null); + + // build the alarm calculated field configuration + AlarmCalculatedFieldConfiguration config = new AlarmCalculatedFieldConfiguration(); + + // argument: temperature time-series + Argument tempArg = new Argument(); + ReferencedEntityKey refKey = new ReferencedEntityKey(); + refKey.setKey("temperature"); + refKey.setType(ArgumentType.TS_LATEST); + tempArg.setRefEntityKey(refKey); + config.putArgumentsItem("temp", tempArg); + + // create rule: HIGH_TEMPERATURE when temp > 50 (TBEL expression) + TbelAlarmConditionExpression createExpression = new TbelAlarmConditionExpression(); + createExpression.setExpression("return temp > 50;"); + AlarmRuleSimpleCondition createCondition = new AlarmRuleSimpleCondition(); + createCondition.setExpression(createExpression); + AlarmRuleSpecificTimeSchedule specificTimeSchedule = new AlarmRuleSpecificTimeSchedule().addDaysOfWeekItem(3); + AlarmConditionValueAlarmRuleSchedule schedule = new AlarmConditionValueAlarmRuleSchedule().staticValue(specificTimeSchedule); + createCondition.setSchedule(schedule); + AlarmRuleDefinition createRule = new AlarmRuleDefinition(); + createRule.setCondition(createCondition); + createRule.setAlarmDetails("Temperature is too high: ${temp}"); + config.setCreateRules(Map.of( + AlarmSeverity.CRITICAL.name(), createRule + )); + + // clear rule: when temp drops below 30 + TbelAlarmConditionExpression clearExpression = new TbelAlarmConditionExpression(); + clearExpression.setExpression("return temp < 30;"); + AlarmRuleSimpleCondition clearCondition = new AlarmRuleSimpleCondition(); + clearCondition.setExpression(clearExpression); + AlarmRuleDefinition clearRule = new AlarmRuleDefinition(); + clearRule.setCondition(clearCondition); + config.setClearRule(clearRule); + + config.setPropagate(true); + config.setPropagateToOwner(false); + + // create calculated field + CalculatedField cf = new CalculatedField(); + cf.setName(TEST_PREFIX + "AlarmCalcField_" + timestamp); + cf.setType(CalculatedFieldType.ALARM); + + EntityId entityId = new EntityId(); + entityId.setEntityType(EntityType.DEVICE); + entityId.setId(createdDevice.getId().getId()); + cf.setEntityId(entityId); + cf.setConfiguration(config); + + CalculatedField created = client.saveCalculatedField(cf); + assertNotNull(created); + assertNotNull(created.getId()); + assertEquals(cf.getName(), created.getName()); + assertEquals(CalculatedFieldType.ALARM, created.getType()); + AlarmCalculatedFieldConfiguration configuration = (AlarmCalculatedFieldConfiguration) created.getConfiguration(); + AlarmConditionValueAlarmRuleSchedule createdSchedule = configuration.getCreateRules().get(AlarmSeverity.CRITICAL.name()).getCondition().getSchedule(); + AlarmRuleSpecificTimeSchedule staticSchedule = (AlarmRuleSpecificTimeSchedule)createdSchedule.getStaticValue(); + assertEquals(Set.of(3), staticSchedule.getDaysOfWeek()); + + // get by id and verify configuration + CalculatedField fetched = client.getCalculatedFieldById(created.getId().getId().toString()); + assertNotNull(fetched); + assertEquals(created.getName(), fetched.getName()); + assertEquals(CalculatedFieldType.ALARM, fetched.getType()); + assertNotNull(fetched.getConfiguration()); + AlarmCalculatedFieldConfiguration fetchedConfig = + (AlarmCalculatedFieldConfiguration) fetched.getConfiguration(); + assertNotNull(fetchedConfig.getCreateRules()); + assertEquals(1, fetchedConfig.getCreateRules().size()); + assertTrue(fetchedConfig.getCreateRules().containsKey("CRITICAL")); + assertNotNull(fetchedConfig.getClearRule()); + assertEquals(Boolean.TRUE, fetchedConfig.getPropagate()); + + // update: add a second create rule for CRITICAL_TEMPERATURE + TbelAlarmConditionExpression criticalExpression = new TbelAlarmConditionExpression(); + criticalExpression.setExpression("return temp > 80;"); + AlarmRuleSimpleCondition criticalCondition = new AlarmRuleSimpleCondition(); + criticalCondition.setExpression(criticalExpression); + AlarmRuleDefinition criticalRule = new AlarmRuleDefinition(); + criticalRule.setCondition(criticalCondition); + fetchedConfig.putCreateRulesItem(AlarmSeverity.INDETERMINATE.name(), criticalRule); + fetched.setConfiguration(fetchedConfig); + + CalculatedField updated = client.saveCalculatedField(fetched); + AlarmCalculatedFieldConfiguration updatedConfig = + (AlarmCalculatedFieldConfiguration) updated.getConfiguration(); + assertEquals(2, updatedConfig.getCreateRules().size()); + assertTrue(updatedConfig.getCreateRules().containsKey("INDETERMINATE")); + + // filter by entity and ALARM type + PageDataCalculatedField deviceFields = client.getCalculatedFieldsByEntityId( + EntityType.DEVICE.toString(), createdDevice.getId().getId().toString(), + 100, 0, CalculatedFieldType.ALARM, null, null, null); + assertNotNull(deviceFields); + assertEquals(1, deviceFields.getData().size()); + + // delete and verify + UUID fieldId = created.getId().getId(); + client.deleteCalculatedField(fieldId.toString()); + assertReturns404(() -> client.getCalculatedFieldById(fieldId.toString())); + } + } diff --git a/pe/src/test/java/org/thingsboard/client/api/ConverterApiTest.java b/pe/src/test/java/org/thingsboard/client/api/ConverterApiTest.java index c36e2b5c..fc8e69d3 100644 --- a/pe/src/test/java/org/thingsboard/client/api/ConverterApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/ConverterApiTest.java @@ -126,7 +126,7 @@ void testGetConvertersByIdsV2() throws ApiException { String id1 = c1.getId().getId().toString(); String id2 = c2.getId().getId().toString(); - List result = client.getConvertersByIdsV2(List.of(id1, id2)); + List result = client.getConvertersByIds(List.of(id1, id2)); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.stream().anyMatch(c -> c.getId().getId().toString().equals(id1))); diff --git a/pe/src/test/java/org/thingsboard/client/api/CustomerApiTest.java b/pe/src/test/java/org/thingsboard/client/api/CustomerApiTest.java index 3976d6e7..6b5dbefc 100644 --- a/pe/src/test/java/org/thingsboard/client/api/CustomerApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/CustomerApiTest.java @@ -115,7 +115,7 @@ void testGetCustomerCustomerInfos() throws ApiException { void testGetCustomersByIdsV2() throws ApiException { String customerId = savedCustomer.getId().getId().toString(); - List result = client.getCustomersByIdsV2(List.of(customerId)); + List result = client.getCustomersByIds(List.of(customerId)); assertNotNull(result); assertEquals(1, result.size(), "Expected exactly one customer returned"); diff --git a/pe/src/test/java/org/thingsboard/client/api/DashboardApiTest.java b/pe/src/test/java/org/thingsboard/client/api/DashboardApiTest.java index 98ee95f1..c0eab272 100644 --- a/pe/src/test/java/org/thingsboard/client/api/DashboardApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/DashboardApiTest.java @@ -50,7 +50,7 @@ void testDashboardLifecycle() throws ApiException { } // find all, check count - PageDataDashboardInfo allDashboards = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo allDashboards = client.getTenantDashboards(100, 0, null, null, null, null); assertNotNull(allDashboards); assertNotNull(allDashboards.getData()); int initialSize = allDashboards.getData().size(); @@ -59,7 +59,7 @@ void testDashboardLifecycle() throws ApiException { List createdDashboards = allDashboards.getData(); // find all with search text, check count - PageDataDashboardInfo filteredDashboards = client.getTenantDashboards1(100, 0, null, TEST_PREFIX_2, null, null); + PageDataDashboardInfo filteredDashboards = client.getTenantDashboards(100, 0, null, TEST_PREFIX_2, null, null); assertEquals(10, filteredDashboards.getData().size(), "Expected exactly 10 dashboards matching prefix"); // find by id @@ -97,7 +97,7 @@ void testGetTenantDashboards() throws Exception { client.saveDashboard(dashboard, null, null, null); // tenant admin variant - PageDataDashboardInfo tenantAdminResult = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo tenantAdminResult = client.getTenantDashboards(100, 0, null, null, null, null); assertNotNull(tenantAdminResult); assertEquals(1, tenantAdminResult.getData().size()); @@ -111,7 +111,7 @@ void testGetTenantDashboards() throws Exception { // system administrator variant (requires tenantId) client.login("sysadmin@thingsboard.org", "sysadmin"); - PageDataDashboardInfo sysAdminResult = client.getTenantDashboards( + PageDataDashboardInfo sysAdminResult = client.getTenantDashboardsByTenantId( savedTenant.getId().getId().toString(), 100, 0, null, null, null); assertNotNull(sysAdminResult); assertEquals(1, sysAdminResult.getData().size(), "Expected at least one dashboard from sysadmin query"); @@ -135,7 +135,7 @@ void testGetDashboardsByIds() throws ApiException { client.saveDashboard(dashboard, null, null, null); // saveDashboard returns void, so fetch the ID via getTenantDashboards1 - PageDataDashboardInfo all = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo all = client.getTenantDashboards(100, 0, null, null, null, null); assertFalse(all.getData().isEmpty()); DashboardInfo first = all.getData().get(0); @@ -178,7 +178,7 @@ void testTenantHomeDashboard() throws ApiException { dashboard.setTitle(TEST_PREFIX + System.currentTimeMillis()); client.saveDashboard(dashboard, null, null, null); - PageDataDashboardInfo all = client.getTenantDashboards1(100, 0, null, null, null, null); + PageDataDashboardInfo all = client.getTenantDashboards(100, 0, null, null, null, null); DashboardId dashboardId = all.getData().get(0).getId(); // getTenantHomeDashboardInfo: no home dashboard set for a freshly created tenant diff --git a/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java b/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java index 24cf533b..04057733 100644 --- a/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/DeviceApiTest.java @@ -108,7 +108,7 @@ void testDeviceLifecycle() throws Exception { request.setDevice(deviceWithCreds); request.setCredentials(creds); - Device savedDeviceWithCreds = client.saveDeviceWithCredentials1(request, null, null, null, null, null); + Device savedDeviceWithCreds = client.saveDeviceWithCredentials(request, null, null, null, null, null); assertEquals("device-with-creds", savedDeviceWithCreds.getName()); // find credentials by device id @@ -194,7 +194,7 @@ void testFindByQuery() throws ApiException { buildingToDevice.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); buildingToDevice.setType("Contains"); buildingToDevice.setTypeGroup(RelationTypeGroup.COMMON); - EntityRelation savedRelation = client.saveRelationV2(buildingToDevice); + EntityRelation savedRelation = client.saveRelation(buildingToDevice); RelationsSearchParameters params = new RelationsSearchParameters(); params.setRootId(device.getId().getId()); @@ -206,7 +206,7 @@ void testFindByQuery() throws ApiException { query.setParameters(params); // device has no outgoing relations; result is an empty list, not null - List result = client.findByQuery(query); + List result = client.findEntityRelationsByQuery(query); assertEquals(1, result.size()); } diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java index e69945ea..e2c64e0d 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityGroupApiTest.java @@ -251,7 +251,7 @@ void testGetEntityGroupsByIds() throws ApiException { String id2 = g2.getId().getId().toString(); // getEntityGroupsByIdsV2 - List byIds = client.getEntityGroupsByIdsV2(List.of(id1, id2)); + List byIds = client.getEntityGroupsByIds(List.of(id1, id2)); assertNotNull(byIds); assertEquals(2, byIds.size()); assertTrue(byIds.stream().anyMatch(g -> g.getId().getId().toString().equals(id1))); diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java index a2b42bfa..aa787e62 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityQueryApiTest.java @@ -320,7 +320,7 @@ void testFindByAssetSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(child.getId().getId()).entityType(EntityType.ASSET)); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -353,7 +353,7 @@ void testFindByDeviceSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -423,7 +423,7 @@ void testFindByEdgeSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(edge.getId().getId()).entityType(EntityType.EDGE)); rel.setType("Manages"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -486,7 +486,7 @@ void testFindByEntityViewSearchQueryFilter() throws Exception { rel.setTo(new EntityId().id(ev.getId().getId()).entityType(EntityType.ENTITY_VIEW)); rel.setType("HasView"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() @@ -518,7 +518,7 @@ void testFindByRelationsQueryFilter() throws Exception { rel.setTo(new EntityId().id(device.getId().getId()).entityType(EntityType.DEVICE)); rel.setType("Contains"); rel.setTypeGroup(RelationTypeGroup.COMMON); - client.saveRelationV2(rel); + client.saveRelation(rel); } EntityDataQuery query = new EntityDataQuery() diff --git a/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java b/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java index ab2eaab1..4dbb288c 100644 --- a/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/EntityRelationApiTest.java @@ -82,20 +82,21 @@ void testEntityRelationLifecycle() throws ApiException { buildingToFloor.setTo(entityId(floor)); buildingToFloor.setType("Contains"); buildingToFloor.setTypeGroup(RelationTypeGroup.COMMON); - EntityRelation savedRelation = client.saveRelationV2(buildingToFloor); + EntityRelation savedRelation = client + .saveRelation(buildingToFloor); assertNotNull(savedRelation); assertEquals("Contains", savedRelation.getType()); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device1)) .type("Contains") .typeGroup(RelationTypeGroup.COMMON)); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device2)) .type("Contains").typeGroup(RelationTypeGroup.COMMON)); - client.saveRelationV2(new EntityRelation() + client.saveRelation(new EntityRelation() .from(entityId(floor)) .to(entityId(device3)) .type("Manages") @@ -111,28 +112,28 @@ void testEntityRelationLifecycle() throws ApiException { assertEquals("Contains", fetched.getType()); // find all relations from floor - List fromFloor = client.findByFromV2("ASSET", + List fromFloor = client.findEntityRelationsByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(3, fromFloor.size()); // find relations from floor with type filter "Contains" - List containsFromFloor = client.findByFromAndRelationType("ASSET", + List containsFromFloor = client.findEntityRelationsByFromAndRelationType("ASSET", floor.getId().getId().toString(), "Contains", RelationTypeGroup.COMMON.getValue()); assertEquals(2, containsFromFloor.size()); // find relations to device1 - List toDevice1 = client.findByToV2("DEVICE", + List toDevice1 = client.findEntityRelationsByTo("DEVICE", device1.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(1, toDevice1.size()); assertEquals("Contains", toDevice1.get(0).getType()); // find relations to device3 with type filter "Manages" - List managesToDevice3 = client.findByToAndRelationType("DEVICE", + List managesToDevice3 = client.findEntityRelationsByToAndRelationType("DEVICE", device3.getId().getId().toString(), "Manages", RelationTypeGroup.COMMON.getValue()); assertEquals(1, managesToDevice3.size()); // find info by from (includes entity names) - List infoFromFloor = client.findInfoByFromV2("ASSET", + List infoFromFloor = client.findEntityRelationInfosByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(3, infoFromFloor.size()); Device finalDevice = device1; @@ -140,7 +141,7 @@ void testEntityRelationLifecycle() throws ApiException { finalDevice.getName().equals(info.getToName()))); // find info by to - List infoToDevice2 = client.findInfoByToV2("DEVICE", + List infoToDevice2 = client.findEntityRelationInfosByTo("DEVICE", device2.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(1, infoToDevice2.size()); assertEquals(floor.getName(), infoToDevice2.get(0).getFromName()); @@ -161,11 +162,11 @@ void testEntityRelationLifecycle() throws ApiException { query.setParameters(params); query.setFilters(List.of(filter)); - List queryResult = client.findByQuery(query); + List queryResult = client.findEntityRelationsByQuery(query); assertTrue(queryResult.size() >= 3); // find info by query - List infoQueryResult = client.findInfoByQuery(query); + List infoQueryResult = client.findEntityRelationInfosByQuery(query); assertTrue(infoQueryResult.size() >= 3); // delete single relation @@ -176,14 +177,14 @@ void testEntityRelationLifecycle() throws ApiException { RelationTypeGroup.COMMON.getValue()); // verify deletion - List afterDelete = client.findByFromV2("ASSET", + List afterDelete = client.findEntityRelationsByFrom("ASSET", floor.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(2, afterDelete.size()); // delete all relations for building client.deleteRelations(building.getId().getId().toString(), "ASSET"); - List afterDeleteAll = client.findByFromV2("ASSET", + List afterDeleteAll = client.findEntityRelationsByFrom("ASSET", building.getId().getId().toString(), RelationTypeGroup.COMMON.getValue()); assertEquals(0, afterDeleteAll.size()); } diff --git a/pe/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java b/pe/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java index 0c8ea585..9ae44f8a 100644 --- a/pe/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/IntegrationApiTest.java @@ -170,7 +170,7 @@ void testGetIntegrationsByIds() throws ApiException { String id2 = i2.getId().getId().toString(); // getIntegrationsByIdsV2 (covers both getIntegrationsByIds and getIntegrationsByIdsV2) - List result = client.getIntegrationsByIdsV2(List.of(id1, id2)); + List result = client.getIntegrationsByIds(List.of(id1, id2)); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.stream().anyMatch(i -> i.getId().getId().toString().equals(id1))); diff --git a/pe/src/test/java/org/thingsboard/client/api/NotificationApiTest.java b/pe/src/test/java/org/thingsboard/client/api/NotificationApiTest.java index f0c67355..63c5aa77 100644 --- a/pe/src/test/java/org/thingsboard/client/api/NotificationApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/NotificationApiTest.java @@ -16,9 +16,15 @@ package org.thingsboard.client.api; import org.junit.jupiter.api.Test; +import org.thingsboard.client.model.EntityActionNotificationRuleTriggerConfig; +import org.thingsboard.client.model.EntityActionRecipientsConfig; +import org.thingsboard.client.model.EntityType; import org.thingsboard.client.model.NotificationDeliveryMethod; import org.thingsboard.client.model.NotificationRequest; import org.thingsboard.client.model.NotificationRequestInfo; +import org.thingsboard.client.model.NotificationRule; +import org.thingsboard.client.model.NotificationRuleInfo; +import org.thingsboard.client.model.NotificationRuleTriggerType; import org.thingsboard.client.model.NotificationSettings; import org.thingsboard.client.model.NotificationTarget; import org.thingsboard.client.model.NotificationTemplate; @@ -26,6 +32,7 @@ import org.thingsboard.client.model.NotificationType; import org.thingsboard.client.model.PageDataNotification; import org.thingsboard.client.model.PageDataNotificationRequestInfo; +import org.thingsboard.client.model.PageDataNotificationRuleInfo; import org.thingsboard.client.model.PageDataNotificationTarget; import org.thingsboard.client.model.PageDataNotificationTemplate; import org.thingsboard.client.model.PlatformUsersNotificationTargetConfig; @@ -187,4 +194,83 @@ void testNotificationLifecycle() throws Exception { assertReturns404(() -> client.getNotificationTargetById(savedTarget.getId().getId())); } + @Test + void testNotificationRuleLifecycle() throws Exception { + long timestamp = System.currentTimeMillis(); + + // Create a target for the rule recipients + TenantAdministratorsFilter usersFilter = new TenantAdministratorsFilter(); + PlatformUsersNotificationTargetConfig targetConfig = + new PlatformUsersNotificationTargetConfig().usersFilter(usersFilter); + NotificationTarget target = + new NotificationTarget() + .name("Rule Test Target " + timestamp) + ._configuration(targetConfig); + NotificationTarget savedTarget = client.saveNotificationTarget(target); + + // Create a template of type ENTITY_ACTION + WebDeliveryMethodNotificationTemplate webTemplate = + new WebDeliveryMethodNotificationTemplate() + .subject("Entity action: ${entityType}") + .body("Entity ${entityName} was ${actionType}") + .enabled(true); + NotificationTemplateConfig templateConfig = + new NotificationTemplateConfig() + .putDeliveryMethodsTemplatesItem("WEB", webTemplate); + NotificationTemplate template = + new NotificationTemplate() + .name("Rule Test Template " + timestamp) + .notificationType(NotificationType.ENTITY_ACTION) + ._configuration(templateConfig); + NotificationTemplate savedTemplate = client.saveNotificationTemplate(template); + + // Build trigger config: fire on DEVICE create/update + EntityActionNotificationRuleTriggerConfig triggerConfig = + new EntityActionNotificationRuleTriggerConfig() + .addEntityTypesItem(EntityType.DEVICE) + .created(true) + .updated(true) + .deleted(false); + + // Build recipients config + EntityActionRecipientsConfig recipientsConfig = new EntityActionRecipientsConfig() + .addTargetsItem(savedTarget.getId().getId()); + + // saveNotificationRule - create + NotificationRule rule = new NotificationRule() + .name("Test Rule " + timestamp) + .enabled(true) + .templateId(savedTemplate.getId()) + .triggerType(NotificationRuleTriggerType.ENTITY_ACTION) + .triggerConfig(triggerConfig) + .recipientsConfig(recipientsConfig); + + NotificationRule savedRule = client.saveNotificationRule(rule); + assertNotNull(savedRule); + assertNotNull(savedRule.getId()); + assertEquals("Test Rule " + timestamp, savedRule.getName()); + assertEquals(NotificationRuleTriggerType.ENTITY_ACTION, savedRule.getTriggerType()); + assertEquals(Boolean.TRUE, savedRule.getEnabled()); + + // getNotificationRuleById + NotificationRuleInfo fetchedRule = client.getNotificationRuleById(savedRule.getId().getId()); + assertNotNull(fetchedRule); + assertEquals(savedRule.getName(), fetchedRule.getName()); + assertEquals(NotificationRuleTriggerType.ENTITY_ACTION, fetchedRule.getTriggerType()); + + // getNotificationRules - verify it appears in the list + PageDataNotificationRuleInfo rulesPage = client.getNotificationRules(100, 0, null, null, null); + assertNotNull(rulesPage); + assertTrue(rulesPage.getData().stream() + .anyMatch(r -> r.getId().getId().equals(savedRule.getId().getId()))); + + // deleteNotificationRule + client.deleteNotificationRule(savedRule.getId().getId()); + assertReturns404(() -> client.getNotificationRuleById(savedRule.getId().getId())); + + // Cleanup + client.deleteNotificationTemplateById(savedTemplate.getId().getId()); + client.deleteNotificationTargetById(savedTarget.getId().getId()); + } + } diff --git a/pe/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java b/pe/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java index 11c015a7..51eaf75b 100644 --- a/pe/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/Oauth2ApiTest.java @@ -108,7 +108,7 @@ void testOAuth2ClientLifecycle() throws ApiException { createdClients.get(0).getId().getId().toString(), createdClients.get(1).getId().getId().toString() ); - List fetchedInfos = client.findTenantOAuth2ClientInfosByIdsV2(idsToFetch); + List fetchedInfos = client.findTenantOAuth2ClientInfosByIds(idsToFetch); assertEquals(2, fetchedInfos.size()); // update OAuth2 client diff --git a/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java b/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java index ad3a3a72..d90370db 100644 --- a/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/OtaPackageApiTest.java @@ -206,7 +206,7 @@ void testGetOtaPackagesByDeviceProfileAndType() throws Exception { createFirmwareWithUrl("byprofile_" + ts + "_0"); createFirmwareWithUrl("byprofile_" + ts + "_1"); - PageDataOtaPackageInfo page = client.getOtaPackages1( + PageDataOtaPackageInfo page = client.getOtaPackagesByDeviceProfileIdAndType( profileId.getId().toString(), "FIRMWARE", 100, 0, OTA_PREFIX + "byprofile_" + ts, null, null); assertNotNull(page); diff --git a/pe/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java b/pe/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java index 82d6c848..ddc0cb8d 100644 --- a/pe/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/RpcV1ApiTest.java @@ -52,7 +52,7 @@ void testHandleOneWayDeviceRPCRequest() throws ApiException { // String as the return type and fails to deserialize the JSON object, // wrapping the IOException in ApiException with code 0. try { - client.handleOneWayDeviceRPCRequest(deviceId, ONE_WAY_BODY); + client.handleOneWayDeviceRPCRequestV1(deviceId, ONE_WAY_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleOneWayDeviceRPCRequest got an unexpected HTTP error: " + e.getCode()); @@ -74,7 +74,7 @@ void testHandleTwoWayDeviceRPCRequest() throws ApiException { // Same behaviour as one-way: persistent=true returns {"rpcId":"..."} // immediately; client type mismatch produces ApiException(code=0). try { - client.handleTwoWayDeviceRPCRequest(deviceId, TWO_WAY_BODY); + client.handleTwoWayDeviceRPCRequestV1(deviceId, TWO_WAY_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleTwoWayDeviceRPCRequest got an unexpected HTTP error: " + e.getCode()); diff --git a/pe/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java b/pe/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java index 9f3a0d6a..18a15d81 100644 --- a/pe/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/RpcV2ApiTest.java @@ -72,7 +72,7 @@ void testHandleOneWayDeviceRPCRequest() throws ApiException { // which the generated client (return type String) cannot deserialise → // IOException wrapped in ApiException with code 0. try { - client.handleOneWayDeviceRPCRequest1(deviceId, PERSISTENT_BODY); + client.handleOneWayDeviceRPCRequestV2(deviceId, PERSISTENT_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleOneWayDeviceRPCRequest1 got an unexpected HTTP error: " + e.getCode()); @@ -93,7 +93,7 @@ void testHandleTwoWayDeviceRPCRequest() throws ApiException { // Same behaviour as one-way with persistent=true. try { - client.handleTwoWayDeviceRPCRequest1(deviceId, PERSISTENT_BODY); + client.handleTwoWayDeviceRPCRequestV2(deviceId, PERSISTENT_BODY); } catch (ApiException e) { assertEquals(0, e.getCode(), "handleTwoWayDeviceRPCRequest1 got an unexpected HTTP error: " + e.getCode()); diff --git a/pe/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java b/pe/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java index 632f66ee..a163525b 100644 --- a/pe/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/SchedulerEventApiTest.java @@ -123,13 +123,13 @@ void testGetAllSchedulerEventsV2() throws ApiException { String id2 = e2.getId().getId().toString(); // getAllSchedulerEventsV2 – no type filter - List all = client.getAllSchedulerEventsV2(null); + List all = client.getAllSchedulerEvents(null); assertNotNull(all); assertTrue(all.stream().anyMatch(e -> e.getId().getId().toString().equals(id1))); assertTrue(all.stream().anyMatch(e -> e.getId().getId().toString().equals(id2))); // getAllSchedulerEventsV2 – with type filter - List filtered = client.getAllSchedulerEventsV2(EVENT_TYPE); + List filtered = client.getAllSchedulerEvents(EVENT_TYPE); assertNotNull(filtered); assertTrue(filtered.stream().anyMatch(e -> e.getId().getId().toString().equals(id1))); @@ -211,7 +211,7 @@ void testGetSchedulerEventsByIdsV2() throws ApiException { String id1 = e1.getId().getId().toString(); String id2 = e2.getId().getId().toString(); - List result = client.getSchedulerEventsByIdsV2(List.of(id1, id2)); + List result = client.getSchedulerEventsByIds(List.of(id1, id2)); assertNotNull(result); assertEquals(2, result.size()); assertTrue(result.stream().anyMatch(e -> e.getId().getId().toString().equals(id1))); diff --git a/pe/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java b/pe/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java index 231c6245..4afa2627 100644 --- a/pe/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/TbResourceApiTest.java @@ -100,7 +100,7 @@ void testResourceLifecycle() throws ApiException { createdResources.get(0).getId().getId().toString(), createdResources.get(1).getId().getId().toString() ); - List resourceList = client.getSystemOrTenantResourcesByIdsV2(idsToFetch); + List resourceList = client.getSystemOrTenantResourcesByIds(idsToFetch); assertEquals(2, resourceList.size()); // update resource diff --git a/pe/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java b/pe/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java index 5b29e905..ca9e02cb 100644 --- a/pe/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/TwoFactorAuthApiTest.java @@ -59,7 +59,7 @@ void testTwoFactorAuthLifecycle() throws ApiException, IOException, InterruptedE assertEquals(300, savedSettings.getTotalAllowedTimeForVerification()); // get available 2FA providers (should include TOTP) - List providerTypes = client.getAvailableTwoFaProviders1(); + List providerTypes = client.getAvailableTwoFaProviderTypes(); assertNotNull(providerTypes); assertTrue(providerTypes.contains(TwoFaProviderType.TOTP)); diff --git a/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java b/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java index 5de70253..e7986ada 100644 --- a/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java +++ b/pe/src/test/java/org/thingsboard/client/api/UserApiTest.java @@ -214,7 +214,7 @@ void testGetUsersByIdsV2() throws Exception { user.setEmail("byids_" + ts + "@test.com"); User created = client.saveUser(user, "false", null, null); - List result = client.getUsersByIdsV2(List.of(created.getId().getId().toString())); + List result = client.getUsersByIds(List.of(created.getId().getId().toString())); assertNotNull(result); assertEquals(1, result.size()); assertEquals(created.getId().getId(), result.get(0).getId().getId()); @@ -294,7 +294,7 @@ void testUserSettings() throws Exception { assertEquals("2", typed.get("y").asText()); // deleteUserSettings removes a specific key from a typed settings section - client.deleteUserSettings("x", settingsType); + client.deleteUserSettingsByType("x", settingsType); JsonNode afterDelete = client.getUserSettings(settingsType); assertNotNull(afterDelete); assertFalse(afterDelete.has("x"));