From 8bd77827a221f9527e4281232e9d144cfb8dcf25 Mon Sep 17 00:00:00 2001 From: TeamCity Date: Tue, 3 Mar 2026 14:17:52 +0000 Subject: [PATCH 1/2] Update PE OpenAPI spec --- pe/docs/AdminControllerApi.md | 68 +- ...tityExportData.md => AiModelExportData.md} | 4 +- ....md => AlarmAssignmentRecipientsConfig.md} | 7 +- pe/docs/AlarmCommentRecipientsConfig.md | 24 + pe/docs/AlarmControllerApi.md | 8 +- pe/docs/ApiUsageLimitRecipientsConfig.md | 24 + pe/docs/AssetControllerApi.md | 12 +- pe/docs/AssetExportData.md | 23 + pe/docs/AssetProfileControllerApi.md | 8 +- pe/docs/AssetProfileExportData.md | 23 + pe/docs/BlobEntityControllerApi.md | 8 +- pe/docs/BulkImportResultAsset.md | 6 +- pe/docs/BulkImportResultDevice.md | 6 +- pe/docs/BulkImportResultEdge.md | 6 +- pe/docs/CalculatedFieldControllerApi.md | 14 +- pe/docs/ConverterControllerApi.md | 8 +- pe/docs/ConverterExportData.md | 23 + pe/docs/CustomerControllerApi.md | 8 +- pe/docs/CustomerExportData.md | 23 + pe/docs/DashboardControllerApi.md | 22 +- pe/docs/DashboardExportData.md | 23 + pe/docs/DeviceActivityRecipientsConfig.md | 24 + pe/docs/DeviceApiControllerApi.md | 255 - pe/docs/DeviceControllerApi.md | 20 +- pe/docs/DeviceProfileControllerApi.md | 42 +- pe/docs/DeviceProfileExportData.md | 23 + pe/docs/DomainControllerApi.md | 6 +- ...dgeCommunicationFailureRecipientsConfig.md | 24 + pe/docs/EdgeConnectionRecipientsConfig.md | 24 + pe/docs/EdgeControllerApi.md | 8 +- pe/docs/EntitiesLimitRecipientsConfig.md | 24 + pe/docs/EntityActionRecipientsConfig.md | 24 + pe/docs/EntityGroupControllerApi.md | 12 +- pe/docs/EntityRelationControllerApi.md | 179 +- pe/docs/EntityViewControllerApi.md | 14 +- pe/docs/EntityViewExportData.md | 23 + pe/docs/EventControllerApi.md | 46 +- pe/docs/FeaturesInfo.md | 2 +- pe/docs/IntegrationControllerApi.md | 8 +- pe/docs/IntegrationExportData.md | 23 + ...tegrationLifecycleEventRecipientsConfig.md | 24 + pe/docs/Lwm2mControllerApi.md | 10 +- pe/docs/MailConfigTemplateControllerApi.md | 6 +- pe/docs/MobileAppBundleControllerApi.md | 8 +- pe/docs/MobileAppControllerApi.md | 8 +- pe/docs/NewPlatformVersionRecipientsConfig.md | 24 + pe/docs/NotificationRequestStats.md | 4 +- pe/docs/NotificationRuleExportData.md | 23 + pe/docs/NotificationTargetControllerApi.md | 16 +- pe/docs/NotificationTargetExportData.md | 23 + pe/docs/NotificationTemplateExportData.md | 23 + pe/docs/OAuth2ConfigTemplateControllerApi.md | 8 +- pe/docs/OAuth2ControllerApi.md | 8 +- pe/docs/OtaPackageControllerApi.md | 8 +- pe/docs/QrCodeSettingsControllerApi.md | 12 +- pe/docs/QueueStatsControllerApi.md | 8 +- pe/docs/RateLimitsRecipientsConfig.md | 24 + pe/docs/ReportControllerApi.md | 32 +- pe/docs/ReportTemplateConfig.md | 2 +- pe/docs/ReportTemplateExportData.md | 23 + pe/docs/ReportTimeSeriesChartSettings.md | 2 +- pe/docs/ResourceShortageRecipientsConfig.md | 24 + pe/docs/RoleControllerApi.md | 8 +- pe/docs/RoleExportData.md | 23 + pe/docs/RpcV1ControllerApi.md | 16 +- pe/docs/RpcV2ControllerApi.md | 16 +- pe/docs/RuleChainControllerApi.md | 52 +- ...ComponentLifecycleEventRecipientsConfig.md | 24 + pe/docs/RuleEngineControllerApi.md | 38 +- pe/docs/SchedulerEventControllerApi.md | 16 +- pe/docs/SelfRegistrationParams.md | 4 +- .../TaskProcessingFailureRecipientsConfig.md | 24 + pe/docs/TbResource.md | 2 +- pe/docs/TbResourceControllerApi.md | 16 +- pe/docs/TbResourceExportData.md | 23 + pe/docs/TbResourceInfo.md | 2 +- pe/docs/TenantControllerApi.md | 8 +- pe/docs/TsKvEntry.md | 6 +- pe/docs/TwoFactorAuthConfigControllerApi.md | 8 +- pe/docs/TwoFactorAuthControllerApi.md | 8 +- pe/docs/UserControllerApi.md | 52 +- pe/docs/WidgetTypeControllerApi.md | 42 +- pe/docs/WidgetsBundleControllerApi.md | 28 +- pe/spec/openapi.json | 14309 +++++++--------- .../client/api/ThingsboardApi.java | 8416 ++++----- .../client/model/AiModelExportData.java | 213 + .../AlarmAssignmentRecipientsConfig.java | 201 + .../model/AlarmCommentRecipientsConfig.java | 201 + .../model/ApiUsageLimitRecipientsConfig.java | 201 + .../client/model/AssetExportData.java | 213 + .../client/model/AssetProfileExportData.java | 213 + .../client/model/BulkImportResultAsset.java | 104 +- .../client/model/BulkImportResultDevice.java | 104 +- .../client/model/BulkImportResultEdge.java | 104 +- .../client/model/ConverterExportData.java | 213 + .../client/model/CsvReportTemplateConfig.java | 18 +- .../client/model/CustomerExportData.java | 213 + .../client/model/DashboardExportData.java | 213 + ...ActivityNotificationRuleTriggerConfig.java | 6 + .../model/DeviceActivityRecipientsConfig.java | 201 + .../client/model/DeviceProfileExportData.java | 213 + ...nFailureNotificationRuleTriggerConfig.java | 6 + ...CommunicationFailureRecipientsConfig.java} | 63 +- ...nnectionNotificationRuleTriggerConfig.java | 6 + .../model/EdgeConnectionRecipientsConfig.java | 201 + ...iesLimitNotificationRuleTriggerConfig.java | 6 + .../model/EntitiesLimitRecipientsConfig.java | 201 + ...tyActionNotificationRuleTriggerConfig.java | 6 + .../model/EntityActionRecipientsConfig.java | 201 + .../client/model/EntityExportData.java | 38 +- .../client/model/EntityViewExportData.java | 213 + ...latedNotificationRuleRecipientsConfig.java | 6 + .../client/model/FeaturesInfo.java | 76 +- ...rtData.java => IntegrationExportData.java} | 24 +- ...cleEventNotificationRuleTriggerConfig.java | 6 + ...grationLifecycleEventRecipientsConfig.java | 201 + .../model/MobileSelfRegistrationParams.java | 20 +- ...mVersionNotificationRuleTriggerConfig.java | 6 + .../NewPlatformVersionRecipientsConfig.java | 201 + .../model/NotificationRequestStats.java | 60 +- .../model/NotificationRuleExportData.java | 213 + .../NotificationRuleRecipientsConfig.java | 56 +- .../model/NotificationTargetExportData.java | 213 + .../model/NotificationTemplateExportData.java | 213 + .../client/model/PdfReportTemplateConfig.java | 18 +- ...teLimitsNotificationRuleTriggerConfig.java | 6 + .../model/RateLimitsRecipientsConfig.java | 201 + .../ReportBarChartWithLabelsSettings.java | 18 +- .../model/ReportRangeChartSettings.java | 18 +- .../client/model/ReportTemplateConfig.java | 74 +- .../model/ReportTemplateExportData.java | 213 + .../model/ReportTimeSeriesChartSettings.java | 74 +- .../ResourceShortageRecipientsConfig.java | 201 + ...ShortageNotificationRuleTriggerConfig.java | 6 + .../client/model/RoleExportData.java | 213 + ...cleEventNotificationRuleTriggerConfig.java | 6 + ...mponentLifecycleEventRecipientsConfig.java | 201 + .../client/model/SelfRegistrationParams.java | 150 +- ...gFailureNotificationRuleTriggerConfig.java | 6 + ...TaskProcessingFailureRecipientsConfig.java | 201 + .../thingsboard/client/model/TbResource.java | 56 +- .../client/model/TbResourceExportData.java | 213 + .../client/model/TbResourceInfo.java | 56 +- .../thingsboard/client/model/TsKvEntry.java | 146 +- .../model/WebSelfRegistrationParams.java | 20 +- 145 files changed, 16786 insertions(+), 14768 deletions(-) rename pe/docs/{GroupEntityExportData.md => AiModelExportData.md} (86%) rename pe/docs/{DefaultNotificationRuleRecipientsConfig.md => AlarmAssignmentRecipientsConfig.md} (70%) create mode 100644 pe/docs/AlarmCommentRecipientsConfig.md create mode 100644 pe/docs/ApiUsageLimitRecipientsConfig.md create mode 100644 pe/docs/AssetExportData.md create mode 100644 pe/docs/AssetProfileExportData.md create mode 100644 pe/docs/ConverterExportData.md create mode 100644 pe/docs/CustomerExportData.md create mode 100644 pe/docs/DashboardExportData.md create mode 100644 pe/docs/DeviceActivityRecipientsConfig.md delete mode 100644 pe/docs/DeviceApiControllerApi.md create mode 100644 pe/docs/DeviceProfileExportData.md create mode 100644 pe/docs/EdgeCommunicationFailureRecipientsConfig.md create mode 100644 pe/docs/EdgeConnectionRecipientsConfig.md create mode 100644 pe/docs/EntitiesLimitRecipientsConfig.md create mode 100644 pe/docs/EntityActionRecipientsConfig.md create mode 100644 pe/docs/EntityViewExportData.md create mode 100644 pe/docs/IntegrationExportData.md create mode 100644 pe/docs/IntegrationLifecycleEventRecipientsConfig.md create mode 100644 pe/docs/NewPlatformVersionRecipientsConfig.md create mode 100644 pe/docs/NotificationRuleExportData.md create mode 100644 pe/docs/NotificationTargetExportData.md create mode 100644 pe/docs/NotificationTemplateExportData.md create mode 100644 pe/docs/RateLimitsRecipientsConfig.md create mode 100644 pe/docs/ReportTemplateExportData.md create mode 100644 pe/docs/ResourceShortageRecipientsConfig.md create mode 100644 pe/docs/RoleExportData.md create mode 100644 pe/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md create mode 100644 pe/docs/TaskProcessingFailureRecipientsConfig.md create mode 100644 pe/docs/TbResourceExportData.md create mode 100644 pe/src/main/java/org/thingsboard/client/model/AiModelExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/AssetExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/ConverterExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/CustomerExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/DashboardExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java rename pe/src/main/java/org/thingsboard/client/model/{DefaultNotificationRuleRecipientsConfig.java => EdgeCommunicationFailureRecipientsConfig.java} (70%) create mode 100644 pe/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/EntityViewExportData.java rename pe/src/main/java/org/thingsboard/client/model/{GroupEntityExportData.java => IntegrationExportData.java} (90%) create mode 100644 pe/src/main/java/org/thingsboard/client/model/IntegrationLifecycleEventRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/ReportTemplateExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/RoleExportData.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java create mode 100644 pe/src/main/java/org/thingsboard/client/model/TbResourceExportData.java 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/GroupEntityExportData.md b/pe/docs/AiModelExportData.md similarity index 86% rename from pe/docs/GroupEntityExportData.md rename to pe/docs/AiModelExportData.md index e1f5ee84..4b2f43c7 100644 --- a/pe/docs/GroupEntityExportData.md +++ b/pe/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/pe/docs/AlarmAssignmentRecipientsConfig.md similarity index 70% rename from pe/docs/DefaultNotificationRuleRecipientsConfig.md rename to pe/docs/AlarmAssignmentRecipientsConfig.md index 358dfc01..c394d83e 100644 --- a/pe/docs/DefaultNotificationRuleRecipientsConfig.md +++ b/pe/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/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 deleted file mode 100644 index 43fe8257..00000000 --- a/pe/docs/DeviceApiControllerApi.md +++ /dev/null @@ -1,255 +0,0 @@ -# DeviceApiControllerApi - -| 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) | -| [**postDeviceAttributes**](#postDeviceAttributes) | **POST** /api/v1/{deviceToken}/attributes | Post attributes (postDeviceAttributes) | -| [**postRpcRequest**](#postRpcRequest) | **POST** /api/v1/{deviceToken}/rpc | Send the RPC command (postRpcRequest) | -| [**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) | -| [**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) - -Get attributes (getDeviceAttributes) - -Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` 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. | | -| **clientKeys** | **String** | Comma separated key names for attribute with client scope | | -| **sharedKeys** | **String** | Comma separated key names for attribute with shared scope | | - -### Return type - -**String** - - -## getFirmware - -> String getFirmware(deviceToken, title, version, size, chunk) - -Get Device Firmware (getFirmware) - -Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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. | | -| **title** | **String** | Title of the firmware, corresponds to the value of 'fw_title' attribute. | | -| **version** | **String** | Version of the firmware, corresponds to the value of 'fw_version' attribute. | | -| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | -| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without chunks. | [optional] [default to 0] | - -### Return type - -**String** - - -## getSoftware - -> String getSoftware(deviceToken, title, version, size, chunk) - -Get Device Software (getSoftware) - -Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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. | | -| **title** | **String** | Title of the software, corresponds to the value of 'sw_title' attribute. | | -| **version** | **String** | Version of the software, corresponds to the value of 'sw_version' attribute. | | -| **size** | **Integer** | Size of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | -| **chunk** | **Integer** | Index of the chunk. Optional. Omit to download the entire file without using chunks. | [optional] [default to 0] | - -### Return type - -**String** - - -## postDeviceAttributes - -> String postDeviceAttributes(deviceToken, body) - -Post attributes (postDeviceAttributes) - -Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` 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** | JSON with attribute key-value pairs. See API call description for example. | | - -### Return type - -**String** - - -## postRpcRequest - -> String postRpcRequest(deviceToken, body) - -Send the RPC command (postRpcRequest) - -Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` 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** | The RPC request JSON | | - -### Return type - -**String** - - -## postTelemetry - -> String postTelemetry(deviceToken, body) - -Post time series data (postTelemetry) - -Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` 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** | | | - -### Return type - -**String** - - -## provisionDevice - -> String provisionDevice(body) - -Provision new device (provisionDevice) - -Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **body** | **String** | JSON with provision request. See API call description for example. | | - -### Return type - -**String** - - -## replyToCommand - -> String replyToCommand(deviceToken, requestId, body) - -Reply to RPC commands (replyToCommand) - -Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. 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. | | -| **requestId** | **String** | RPC request id from the incoming RPC request | | -| **body** | **String** | Reply to the RPC request, JSON. For example: {\"status\":\"success\"} | | - -### Return type - -**String** - - -## subscribeToAttributes - -> String subscribeToAttributes(deviceToken, timeout) - -Subscribe to attribute updates (subscribeToAttributes) (Deprecated) - -Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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. | | -| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | - -### Return type - -**String** - - -## subscribeToCommands - -> String subscribeToCommands(deviceToken, timeout) - -Subscribe to RPC commands (subscribeToCommands) (Deprecated) - -Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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. | | -| **timeout** | **Long** | Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. | [optional] [default to 0] | - -### Return type - -**String** - 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/FeaturesInfo.md b/pe/docs/FeaturesInfo.md index 7c1a8aa5..eba39fa4 100644 --- a/pe/docs/FeaturesInfo.md +++ b/pe/docs/FeaturesInfo.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **whiteLabelingEnabled** | **Boolean** | | [optional] | | **smsEnabled** | **Boolean** | | [optional] | | **oauthEnabled** | **Boolean** | | [optional] | -| **whiteLabelingEnabled** | **Boolean** | | [optional] | | **notificationEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | | **emailEnabled** | **Boolean** | | [optional] | 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/ReportTimeSeriesChartSettings.md b/pe/docs/ReportTimeSeriesChartSettings.md index 7b9dcfc9..939a0353 100644 --- a/pe/docs/ReportTimeSeriesChartSettings.md +++ b/pe/docs/ReportTimeSeriesChartSettings.md @@ -23,8 +23,8 @@ | **legendLabelColor** | **String** | | [optional] | | **legendValueFont** | **Font** | | [optional] | | **legendValueColor** | **String** | | [optional] | -| **yaxes** | **Map\** | | [optional] | | **xaxis** | **TimeSeriesChartXAxisSettings** | | [optional] | +| **yaxes** | **Map\** | | [optional] | | **thresholds** | **List\** | | [optional] | | **grid** | **TimeSeriesChartGridSettings** | | [optional] | | **yAxes** | **Map\** | | [optional] | 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/TbResource.md b/pe/docs/TbResource.md index bfa63893..3b742711 100644 --- a/pe/docs/TbResource.md +++ b/pe/docs/TbResource.md @@ -25,8 +25,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | 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/TbResourceInfo.md b/pe/docs/TbResourceInfo.md index 02741685..506b11ae 100644 --- a/pe/docs/TbResourceInfo.md +++ b/pe/docs/TbResourceInfo.md @@ -23,8 +23,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | 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..a9a8b78c 100644 --- a/pe/docs/TsKvEntry.md +++ b/pe/docs/TsKvEntry.md @@ -10,13 +10,13 @@ | **ts** | **Long** | | [optional] | | **value** | **Object** | | [optional] | | **key** | **String** | | [optional] | -| **doubleValue** | **Double** | | [optional] | -| **longValue** | **Long** | | [optional] | | **booleanValue** | **Boolean** | | [optional] | +| **valueAsString** | **String** | | [optional] | +| **longValue** | **Long** | | [optional] | +| **doubleValue** | **Double** | | [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..40d38acc 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -97,10 +97,6 @@ "name": "dashboard-report-controller", "description": "Dashboard Report Controller" }, - { - "name": "device-api-controller", - "description": "Device Api Controller" - }, { "name": "device-connectivity-controller", "description": "Device Connectivity Controller" @@ -474,10 +470,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -617,10 +613,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -743,10 +739,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -878,10 +874,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1013,10 +1009,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1148,10 +1144,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1291,10 +1287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1426,10 +1422,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1441,7 +1437,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 +1557,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1574,8 +1570,8 @@ "tags": [ "admin-controller" ], - "summary": "codeProcessingUrl", - "operationId": "codeProcessingUrl", + "summary": "handleMailOAuth2Callback", + "operationId": "handleMailOAuth2Callback", "parameters": [ { "name": "code", @@ -1706,10 +1702,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1841,10 +1837,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1976,10 +1972,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2119,10 +2115,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2245,10 +2241,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2383,10 +2379,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2518,10 +2514,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2652,10 +2648,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2787,10 +2783,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2930,10 +2926,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3076,10 +3072,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3214,10 +3210,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3352,10 +3348,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3508,10 +3504,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3643,10 +3639,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3778,10 +3774,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3972,10 +3968,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4115,10 +4111,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4260,10 +4256,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4408,10 +4404,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4554,10 +4550,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4746,10 +4742,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4901,10 +4897,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5049,10 +5045,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5195,10 +5191,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5390,10 +5386,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5536,10 +5532,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5715,10 +5711,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5861,10 +5857,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -6005,10 +6001,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6151,10 +6147,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6297,10 +6293,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6452,10 +6448,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6598,10 +6594,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6611,9 +6607,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 +6879,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7150,10 +7146,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7445,10 +7441,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7722,10 +7718,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7736,7 +7732,7 @@ "api-key-controller" ], "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey \u003Cvalue\u003E'.\n\nAvailable for any authorized user. ", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey '.\n\nAvailable for any authorized user. ", "operationId": "saveApiKey", "requestBody": { "content": { @@ -7867,10 +7863,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8006,10 +8002,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8163,10 +8159,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8319,10 +8315,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8522,10 +8518,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8721,10 +8717,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8866,10 +8862,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9012,10 +9008,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9151,10 +9147,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9297,10 +9293,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9434,10 +9430,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9647,10 +9643,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9799,10 +9795,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9810,9 +9806,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 +9941,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10167,10 +10163,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10380,10 +10376,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10584,10 +10580,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10597,7 +10593,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 +10726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10934,10 +10930,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11147,10 +11143,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11292,10 +11288,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11442,10 +11438,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11597,10 +11593,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -11734,10 +11730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11880,10 +11876,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12015,10 +12011,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12161,10 +12157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12355,10 +12351,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12368,9 +12364,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 +12503,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12701,10 +12697,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12926,10 +12922,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13160,10 +13156,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13403,10 +13399,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13637,10 +13633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13782,10 +13778,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13910,10 +13906,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14045,10 +14041,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15076,10 +15072,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15089,9 +15085,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 +15224,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15374,10 +15370,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15513,10 +15509,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15660,10 +15656,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15806,10 +15802,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15821,7 +15817,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 +15948,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16097,10 +16093,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -16233,10 +16229,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16378,10 +16374,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16541,10 +16537,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16686,10 +16682,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16831,10 +16827,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16987,10 +16983,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17000,9 +16996,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 +17202,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17445,10 +17441,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17633,10 +17629,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17779,10 +17775,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17944,10 +17940,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18113,10 +18109,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18259,10 +18255,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18416,10 +18412,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18573,10 +18569,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18730,10 +18726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18876,10 +18872,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -19013,10 +19009,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19196,10 +19192,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19409,10 +19405,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19422,9 +19418,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 +19557,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19746,10 +19742,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19939,10 +19935,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20100,10 +20096,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20261,10 +20257,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20422,10 +20418,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20583,10 +20579,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20744,10 +20740,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20905,10 +20901,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21043,10 +21039,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -21209,10 +21205,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21419,10 +21415,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21575,10 +21571,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21725,10 +21721,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21872,10 +21868,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -22027,10 +22023,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22174,10 +22170,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22325,10 +22321,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22493,10 +22489,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22639,10 +22635,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -22785,10 +22781,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -22932,10 +22928,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -23069,10 +23065,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -23216,10 +23212,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23373,10 +23369,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23521,10 +23517,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23720,10 +23716,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -23866,10 +23862,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24012,10 +24008,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -24149,10 +24145,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24362,10 +24358,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24508,10 +24504,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24654,10 +24650,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -24858,10 +24854,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25053,10 +25049,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25066,9 +25062,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 +25201,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25409,10 +25405,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25555,10 +25551,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25750,10 +25746,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -25885,10 +25881,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -26021,10 +26017,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26231,10 +26227,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26407,10 +26403,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26545,10 +26541,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26680,10 +26676,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26826,10 +26822,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -26963,10 +26959,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27100,10 +27096,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27256,10 +27252,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -27393,10 +27389,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27545,10 +27541,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27746,10 +27742,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -27947,10 +27943,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28114,10 +28110,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28277,10 +28273,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28412,10 +28408,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -28548,10 +28544,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28563,7 +28559,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 +28745,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -28762,9 +28758,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 +28946,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29169,10 +29165,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29339,10 +29335,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -29508,183 +29504,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/v1/provision": { - "post": { - "tags": [ - "device-api-controller" - ], - "summary": "Provision new device (provisionDevice)", - "description": "Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: \n\n```json\n{\n \"deviceName\": \"NEW_DEVICE_NAME\",\n \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\",\n \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\"\n}\n```\n\nWhere 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials:\n\n```json\n{\n \"credentialsType\":\"ACCESS_TOKEN\",\n \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\",\n \"status\":\"SUCCESS\"\n}\n```\n\n", - "operationId": "provisionDevice", - "requestBody": { - "description": "JSON with provision request. See API call description for example.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "/api/v1/{deviceToken}/attributes": { + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { "get": { "tags": [ - "device-api-controller" + "device-connectivity-controller" ], - "summary": "Get attributes (getDeviceAttributes)", - "description": "Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. \n Example of the result: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\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": "getDeviceAttributes", + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", "parameters": [ { - "name": "deviceToken", + "name": "deviceId", "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "clientKeys", - "in": "query", - "description": "Comma separated key names for attribute with client scope", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "sharedKeys", - "in": "query", - "description": "Comma separated key names for attribute with shared scope", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -29695,9 +29535,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } @@ -29807,44 +29648,57 @@ } } } - } - }, - "post": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/device-connectivity/{deviceId}": { + "get": { "tags": [ - "device-api-controller" + "device-connectivity-controller" ], - "summary": "Post attributes (postDeviceAttributes)", - "description": "Post client attribute updates on behalf of device. \n Example of the request: \n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\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": "postDeviceAttributes", + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", "parameters": [ { - "name": "deviceToken", + "name": "deviceId", "in": "path", - "description": "Your device access token.", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "JSON with attribute key-value pairs. See API call description for example.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JsonNode" + }, + "examples": { + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" + } } } } @@ -29861,7 +29715,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -29954,46 +29808,44 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/attributes/updates": { + "/api/device-connectivity/{protocol}/certificate/download": { "get": { "tags": [ - "device-api-controller" + "device-connectivity-controller" ], - "summary": "Subscribe to attribute updates (subscribeToAttributes) (Deprecated)", - "description": "Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \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": "subscribeToAttributes", + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", "parameters": [ { - "name": "deviceToken", + "name": "protocol", "in": "path", - "description": "Your device access token.", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", "required": true, "schema": { "type": "string" } - }, - { - "name": "timeout", - "in": "query", - "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", - "required": false, - "schema": { - "type": "integer", - "format": "int64", - "default": 0 - } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } @@ -30103,33 +29955,49 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/claim": { + "/api/customer/device/{deviceName}/claim": { "post": { "tags": [ - "device-api-controller" + "device-controller" ], - "summary": "Save claiming information (claimDevice)", - "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", + "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", "parameters": [ { - "name": "deviceToken", + "name": "deviceName", "in": "path", - "description": "Your device access token.", + "description": "Unique name of the device which is going to be claimed", "required": true, "schema": { "type": "string" } + }, + { + "name": "subCustomerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ClaimRequest" } } } @@ -30250,1578 +30118,13 @@ } } } - } - } - }, - "/api/v1/{deviceToken}/firmware": { - "get": { - "tags": [ - "device-api-controller" - ], - "summary": "Get Device Firmware (getFirmware)", - "description": "Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. \n\nOptional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \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": "getFirmware", - "parameters": [ - { - "name": "deviceToken", - "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "title", - "in": "query", - "description": "Title of the firmware, corresponds to the value of 'fw_title' attribute.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "query", - "description": "Version of the firmware, corresponds to the value of 'fw_version' attribute.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "description": "Size of the chunk. Optional. Omit to download the entire file without chunks.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - }, - { - "name": "chunk", - "in": "query", - "description": "Index of the chunk. Optional. Omit to download the entire file without chunks.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "/api/v1/{deviceToken}/rpc": { - "get": { - "tags": [ - "device-api-controller" - ], - "summary": "Subscribe to RPC commands (subscribeToCommands) (Deprecated)", - "description": "Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. \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": "subscribeToCommands", - "parameters": [ - { - "name": "deviceToken", - "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "timeout", - "in": "query", - "description": "Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side.", - "required": false, - "schema": { - "type": "integer", - "format": "int64", - "default": 0 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "device-api-controller" - ], - "summary": "Send the RPC command (postRpcRequest)", - "description": "Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example:\n\n```json\n{\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}}\n```\n\nThe response contains arbitrary JSON with the RPC reply. For example: \n\n```json\n{\"result\": 4}\n```\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": "postRpcRequest", - "parameters": [ - { - "name": "deviceToken", - "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "The RPC request JSON", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "RPC request to server was sent to Rule Engine.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Invalid structure of the request.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload too large.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "/api/v1/{deviceToken}/rpc/{requestId}": { - "post": { - "tags": [ - "device-api-controller" - ], - "summary": "Reply to RPC commands (replyToCommand)", - "description": "Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON.\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": "replyToCommand", - "parameters": [ - { - "name": "deviceToken", - "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "requestId", - "in": "path", - "description": "RPC request id from the incoming RPC request", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Reply to the RPC request, JSON. For example: {\"status\":\"success\"}", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "RPC reply to command request was sent to Core.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Invalid structure of the request.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload is too large.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "/api/v1/{deviceToken}/software": { - "get": { - "tags": [ - "device-api-controller" - ], - "summary": "Get Device Software (getSoftware)", - "description": "Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. \n\nOptional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. \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": "getSoftware", - "parameters": [ - { - "name": "deviceToken", - "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "title", - "in": "query", - "description": "Title of the software, corresponds to the value of 'sw_title' attribute.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "query", - "description": "Version of the software, corresponds to the value of 'sw_version' attribute.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "query", - "description": "Size of the chunk. Optional. Omit to download the entire file without using chunks.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - }, - { - "name": "chunk", - "in": "query", - "description": "Index of the chunk. Optional. Omit to download the entire file without using chunks.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "/api/v1/{deviceToken}/telemetry": { - "post": { - "tags": [ - "device-api-controller" - ], - "summary": "Post time series data (postTelemetry)", - "description": "Post time series data on behalf of device. \n Example of the request: The request payload is a JSON document with three possible formats:\n\nSimple format without timestamp. In such a case, current server time will be used: \n\n\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\n\n Single JSON object with timestamp: \n\n\n\n```json\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}\n```\n\n\n\n JSON array with timestamps: \n\n\n\n```json\n[\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, \n{\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}\n]\n```\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": "postTelemetry", - "parameters": [ - { - "name": "deviceToken", - "in": "path", - "description": "Your device access token.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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 - } - } - } - } - } - } - } - } - }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { - "get": { - "tags": [ - "device-connectivity-controller" - ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "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": [] - } - ] - } - }, - "/api/device-connectivity/{deviceId}": { - "get": { - "tags": [ - "device-connectivity-controller" - ], - "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", - "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicePublishTelemetryCommands", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - }, - "examples": { - "http": { - "description": "http", - "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" - }, - "mqtt": { - "description": "mqtt", - "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" - }, - "coap": { - "description": "coap", - "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" - } - } - } - } - }, - "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": [] - } - ] - } - }, - "/api/device-connectivity/{protocol}/certificate/download": { - "get": { - "tags": [ - "device-connectivity-controller" - ], - "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", - "description": "Download server certificate.", - "operationId": "downloadServerCertificate", - "parameters": [ - { - "name": "protocol", - "in": "path", - "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "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": [] - } - ] - } - }, - "/api/customer/device/{deviceName}/claim": { - "post": { - "tags": [ - "device-controller" - ], - "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", - "parameters": [ - { - "name": "deviceName", - "in": "path", - "description": "Unique name of the device which is going to be claimed", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "subCustomerId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClaimRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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": [] + "ApiKeyForm": [] } ] }, @@ -31833,244 +30136,13 @@ "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", "operationId": "reClaimDevice", "parameters": [ - { - "name": "deviceName", - "in": "path", - "description": "Unique name of the device which is going to be reclaimed", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "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": [] - } - ] - } - }, - "/api/customer/{customerId}/deviceInfos": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. 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": "getCustomerDeviceInfos", - "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", - "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": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device 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", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + { + "name": "deviceName", + "in": "path", + "description": "Unique name of the device which is going to be reclaimed", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -32080,7 +30152,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "string" } } } @@ -32193,22 +30265,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/devices": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ "device-controller" ], - "summary": "Get Customer Devices (getCustomerDevices)", - "description": "Returns a page of devices 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDevices", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. 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": "getCustomerDeviceInfos", "parameters": [ { "name": "customerId", @@ -32240,14 +30312,32 @@ } }, { - "name": "type", + "name": "includeCustomers", "in": "query", - "description": "Device type as the name of the device profile", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "textSearch", "in": "query", @@ -32293,7 +30383,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -32406,1009 +30496,97 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device": { - "post": { + "/api/customer/{customerId}/devices": { + "get": { "tags": [ "device-controller" ], - "summary": "Create Or Update Device (saveDevice)", - "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)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove '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": "saveDevice", + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDevices", "parameters": [ { - "name": "accessToken", - "in": "query", - "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupId", - "in": "query", - "required": false, + "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": "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", + "name": "pageSize", "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, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "string", - "default": "_" + "type": "integer", + "format": "int32" } }, { - "name": "uniquifyStrategy", + "name": "page", "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, + "description": "Sequence number of page starting from 0", + "required": true, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } - } - ], - "requestBody": { - "description": "A JSON value representing the device.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "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 - } - } - } - } + "type": "integer", + "format": "int32" } - } - }, - "security": [ - { - "http_login_form": [] }, { - "api_key_form": [] - } - ] - } - }, - "/api/device-with-credentials": { - "post": { - "tags": [ - "device-controller" - ], - "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", - "parameters": [ - { - "name": "entityGroupId", + "name": "type", "in": "query", + "description": "Device type as the name of the device profile", "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", + "name": "textSearch", "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.", + "description": "The case insensitive 'substring' filter based on the device name.", "required": false, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string" } }, { - "name": "uniquifySeparator", + "name": "sortProperty", "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'.", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string", - "default": "_" + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] } }, { - "name": "uniquifyStrategy", + "name": "sortOrder", "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.", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "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/device/bulk_import": { - "post": { - "tags": [ - "device-controller" - ], - "summary": "Import the bulk of devices (processDevicesBulkImport)", - "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processDevicesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportResultDevice" - } - } - } - }, - "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/device/credentials": { - "post": { - "tags": [ - "device-controller" - ], - "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\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 ID\u003C/b\u003E and with \u003Cb\u003Edevice ID\u003C/b\u003E below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\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 \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\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 \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\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 \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -\u003E \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "updateDeviceCredentials", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } - } - } - }, - "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/device/info/{deviceId}": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Device (getDeviceInfoById)", - "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \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": "getDeviceInfoById", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceInfo" - } - } - } - }, - "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": [] - } - ] - } - }, - "/api/device/types": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Device Types (getDeviceTypes)", - "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceTypes", - "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 - } - } - } - } - } - } - }, - "deprecated": true, - "security": [ - { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/api/device/{deviceId}": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Device (getDeviceById)", - "description": "Fetch the Device object based on the provided Device Id. \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": "getDeviceById", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -33418,7 +30596,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -33531,34 +30709,104 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/device": { + "post": { "tags": [ "device-controller" ], - "summary": "Delete device (deleteDevice)", - "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id 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 'DELETE' permission for the entity (entities).", - "operationId": "deleteDevice", + "summary": "Create Or Update Device (saveDevice)", + "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)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove '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": "saveDevice", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "accessToken", + "in": "query", + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, "schema": { "type": "string" } + }, + { + "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": { + "description": "A JSON value representing the device.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } }, "400": { "description": "Bad Request", @@ -33572,7 +30820,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -33668,40 +30916,91 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device/{deviceId}/credentials": { - "get": { + "/api/device-with-credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", - "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", - "operationId": "getDeviceCredentialsByDeviceId", + "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: \"Access token\" with device profile ID 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: \"Access token\" with device profile default 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: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (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: \"MQTT_BASIC\" with device profile ID 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 LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> 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", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "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/SaveDeviceWithCredentialsRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "$ref": "#/components/schemas/Device" } } } @@ -33718,7 +31017,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -33814,116 +31113,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceInfos/all": { - "get": { + "/api/device/bulk_import": { + "post": { "tags": [ "device-controller" ], - "summary": "Get All Device Infos for current user (getAllDeviceInfos)", - "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. 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": "getAllDeviceInfos", - "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": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device 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", - "deviceProfileName", - "label", - "customerTitle" - ] + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -33940,7 +31162,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -34036,46 +31258,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/devices": { - "get": { + "/api/device/credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Devices By Ids (getDevicesByIds)", - "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \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": "getDevicesByIds", - "parameters": [ - { - "name": "deviceIds", - "in": "query", - "description": "A list of devices ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device ID and with device ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -34092,7 +31307,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -34188,40 +31403,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/device/info/{deviceId}": { + "get": { "tags": [ "device-controller" ], - "summary": "Find related devices (findByQuery)", - "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", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" - } + "summary": "Get Device (getDeviceInfoById)", + "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \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": "getDeviceInfoById", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/DeviceInfo" } } } @@ -34238,7 +31453,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -34334,54 +31549,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/devices/count/{otaPackageType}/{deviceProfileId}": { + "/api/device/types": { "get": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\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": "countByDeviceProfileAndEmptyOtaPackage", - "parameters": [ - { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "deviceProfileId", - "in": "path", - "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -34492,49 +31685,30 @@ } } }, + "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { + "/api/device/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\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": "countByDeviceGroupAndEmptyOtaPackage", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. \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": "getDeviceById", "parameters": [ { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "otaPackageId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupId", + "name": "deviceId", "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -34547,8 +31721,7 @@ "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/Device" } } } @@ -34661,101 +31834,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/devices": { - "get": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", - "description": "Returns a page of Device objects that belongs to specified Entity Group 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": "getDevicesByEntityGroupId", + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id 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 'DELETE' permission for the entity (entities).", + "operationId": "deleteDevice", "parameters": [ { - "name": "entityGroupId", + "name": "deviceId", "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 device 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 device 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", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "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/PageDataDevice" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -34865,27 +31971,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/device": { + "/api/device/{deviceId}/credentials": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device (getTenantDevice)", - "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDeviceByName", + "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", + "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", + "operationId": "getDeviceCredentialsByDeviceId", "parameters": [ { - "name": "deviceName", - "in": "query", - "description": "A string value representing the Device name.", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -34898,7 +32004,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -35011,22 +32117,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/devices": { + "/api/deviceInfos/all": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Devices (getTenantDevices)", - "description": "Returns a page of devices 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. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDevices", + "summary": "Get All Device Infos for current user (getAllDeviceInfos)", + "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. 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": "getAllDeviceInfos", "parameters": [ { "name": "pageSize", @@ -35049,14 +32155,32 @@ } }, { - "name": "type", + "name": "includeCustomers", "in": "query", - "description": "Device type as the name of the device profile", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "textSearch", "in": "query", @@ -35102,7 +32226,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -35215,39 +32339,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/{tenantId}/device/{deviceId}": { - "post": { + "/api/devices": { + "get": { "tags": [ "device-controller" ], - "summary": "Assign device to tenant (assignDeviceToTenant)", - "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", - "operationId": "assignDeviceToTenant", + "summary": "Get Devices By Ids (getDevicesByIds)", + "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \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": "getDevicesByIds", "parameters": [ { - "name": "tenantId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "deviceIds", + "in": "query", + "description": "A list of devices ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -35257,7 +32375,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -35274,7 +32395,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -35370,98 +32491,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/user/devices": { - "get": { + }, + "post": { "tags": [ "device-controller" ], - "summary": "Get Devices (getUserDevices)", - "description": "Returns a page of devices 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": "getUserDevices", - "parameters": [ - { - "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", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device 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", - "deviceProfileName", - "label", - "customerTitle" - ] + "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": "findDevicesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceSearchQuery" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -35478,7 +32541,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -35574,38 +32637,54 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceGroupOtaPackage": { - "post": { + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "saveDeviceGroupOtaPackage", - "operationId": "saveDeviceGroupOtaPackage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" - } + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\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": "countByDeviceProfileAndEmptyOtaPackage", + "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] } }, - "required": true - }, + { + "name": "deviceProfileId", + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "type": "integer", + "format": "int64" } } } @@ -35622,7 +32701,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -35718,24 +32797,38 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { + "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "getFirmwareById", - "operationId": "getFirmwareById", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\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": "countByDeviceGroupAndEmptyOtaPackage", "parameters": [ { - "name": "groupId", + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "otaPackageId", "in": "path", "required": true, "schema": { @@ -35743,7 +32836,7 @@ } }, { - "name": "firmwareType", + "name": "entityGroupId", "in": "path", "required": true, "schema": { @@ -35757,7 +32850,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "type": "integer", + "format": "int64" } } } @@ -35870,34 +32964,101 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceGroupOtaPackage/{id}": { - "delete": { + "/api/entityGroup/{entityGroupId}/devices": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "deleteDeviceGroupOtaPackage", - "operationId": "deleteDeviceGroupOtaPackage", + "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", + "description": "Returns a page of Device objects that belongs to specified Entity Group 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": "getDevicesByEntityGroupId", "parameters": [ { - "name": "id", + "name": "entityGroupId", "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", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device 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", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDevice" + } + } + } }, "400": { "description": "Bad Request", @@ -36007,39 +33168,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile": { - "post": { + "/api/tenant/device": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Create Or Update Device Profile (saveDeviceProfile)", - "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides 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: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter 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.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', '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. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveDeviceProfile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } + "summary": "Get Tenant Device (getTenantDevice)", + "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDeviceByName", + "parameters": [ + { + "name": "deviceName", + "in": "query", + "description": "A string value representing the Device name.", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/Device" } } } @@ -36056,7 +33218,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -36152,31 +33314,89 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/devices/keys/attributes": { + "/api/tenant/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get attribute keys (getAttributesKeys)", - "description": "Get a set of unique attribute 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": "getAttributesKeys", + "summary": "Get Tenant Devices (getTenantDevices)", + "description": "Returns a page of devices 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. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDevices", "parameters": [ { - "name": "deviceProfileId", + "name": "pageSize", "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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": "Device type as the name of the device profile", "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device 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", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -36185,10 +33405,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -36301,28 +33518,37 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/devices/keys/timeseries": { - "get": { + "/api/tenant/{tenantId}/device/{deviceId}": { + "post": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get time series keys (getTimeseriesKeys)", - "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", + "summary": "Assign device to tenant (assignDeviceToTenant)", + "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", + "operationId": "assignDeviceToTenant", "parameters": [ { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -36334,10 +33560,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/Device" } } } @@ -36354,7 +33577,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -36450,31 +33673,88 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/names": { + "/api/user/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile names (getDeviceProfileNames)", - "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileNames", + "summary": "Get Devices (getUserDevices)", + "description": "Returns a page of devices 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": "getUserDevices", "parameters": [ { - "name": "activeOnly", + "name": "pageSize", "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "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", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device 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", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -36484,10 +33764,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -36600,49 +33877,38 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/{deviceProfileId}": { - "get": { + "/api/deviceGroupOtaPackage": { + "post": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get Device Profile (getDeviceProfileById)", - "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileById", - "parameters": [ - { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "saveDeviceGroupOtaPackage", + "operationId": "saveDeviceGroupOtaPackage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -36659,7 +33925,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -36755,25 +34021,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { + "get": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Delete device profile (deleteDeviceProfile)", - "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDeviceProfile", + "summary": "getFirmwareById", + "operationId": "getFirmwareById", "parameters": [ { - "name": "deviceProfileId", + "name": "groupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "firmwareType", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -36782,7 +34056,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } + } + } }, "400": { "description": "Bad Request", @@ -36892,27 +34173,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/{deviceProfileId}/default": { - "post": { + "/api/deviceGroupOtaPackage/{id}": { + "delete": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Make Device Profile Default (setDefaultDeviceProfile)", - "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultDeviceProfile", + "summary": "deleteDeviceGroupOtaPackage", + "operationId": "deleteDeviceGroupOtaPackage", "parameters": [ { - "name": "deviceProfileId", + "name": "id", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -36921,14 +34200,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -36942,7 +34214,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -37038,29 +34310,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfo/default": { - "get": { + "/api/deviceProfile": { + "post": { "tags": [ "device-profile-controller" ], - "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", - "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultDeviceProfileInfo", + "summary": "Create Or Update Device Profile (saveDeviceProfile)", + "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides 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: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter 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.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou 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 device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', '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. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveDeviceProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -37077,7 +34359,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -37173,28 +34455,28 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { + "/api/deviceProfile/devices/keys/attributes": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Info (getDeviceProfileInfoById)", - "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfoById", + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute 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": "getAttributesKeys", "parameters": [ { "name": "deviceProfileId", - "in": "path", + "in": "query", "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "required": false, "schema": { "type": "string" } @@ -37206,7 +34488,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -37319,97 +34604,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfos": { + "/api/deviceProfile/devices/keys/timeseries": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", - "description": "Returns a page of devices profile 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. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfos", + "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": "getDeviceProfileTimeseriesKeys", "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": "textSearch", + "name": "deviceProfileId", "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "transportType", - "in": "query", - "description": "Type of the transport", - "required": false, - "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] - } } ], "responses": { @@ -37418,7 +34637,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -37531,33 +34753,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfos/list": { + "/api/deviceProfile/names": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2)", - "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", + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", "parameters": [ { - "name": "deviceProfileIds", + "name": "activeOnly", "in": "query", - "description": "A list of device profile ids, separated by comma ','", - "required": true, + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean", + "default": false } } ], @@ -37569,7 +34789,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -37683,80 +34903,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfiles": { + "/api/deviceProfile/{deviceProfileId}": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles (getDeviceProfiles)", - "description": "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfiles", + "summary": "Get Device Profile (getDeviceProfileById)", + "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileById", "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", + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile 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", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", + "name": "inlineImages", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Inline images as a data URL (Base64)", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "boolean" } } ], @@ -37766,7 +34945,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -37879,56 +35058,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/domain": { - "post": { + }, + "delete": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Save or Update Domain (saveDomain)", - "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDomain", + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", "parameters": [ { - "name": "oauth2ClientIds", - "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", - "required": false, + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -37942,7 +35099,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -38038,30 +35195,30 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/info/{id}": { - "get": { + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfoById", + "summary": "Make Device Profile Default (setDefaultDeviceProfile)", + "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultDeviceProfile", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -38071,7 +35228,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -38088,7 +35245,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38184,78 +35341,29 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/infos": { + "/api/deviceProfileInfo/default": { "get": { "tags": [ - "domain-controller" - ], - "summary": "Get Domain infos (getDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfos", - "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": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - } + "device-profile-controller" ], + "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", + "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -38368,36 +35476,43 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/{id}": { - "delete": { + "/api/deviceProfileInfo/{deviceProfileId}": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Delete Domain by ID (deleteDomain)", - "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDomain", + "summary": "Get Device Profile Info (getDeviceProfileInfoById)", + "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfoById", "parameters": [ { - "name": "id", + "name": "deviceProfileId", "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -38507,51 +35622,110 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/{id}/oauth2Clients": { - "put": { + "/api/deviceProfileInfos": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "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", + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile 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. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", "parameters": [ { - "name": "id", - "in": "path", + "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 case insensitive 'substring' filter based on the device profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -38660,106 +35834,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/edgeInfos": { + "/api/deviceProfileInfos/list": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edge info objects owned by the specified 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEdgeInfos", + "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": "getDeviceProfileInfosByIds", "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": "deviceProfileIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of device profile ids, separated by comma ','", "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": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge 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", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -38769,7 +35870,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } } } } @@ -38882,32 +35986,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/edges": { + "/api/deviceProfiles": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edges (getCustomerEdges)", - "description": "Returns a page of edges 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": "getCustomerEdges", + "summary": "Get Device Profiles (getDeviceProfiles)", + "description": "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfiles", "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", @@ -38928,19 +36023,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" @@ -38957,8 +36043,9 @@ "createdTime", "name", "type", - "label", - "customerTitle" + "transportType", + "description", + "isDefault" ] } }, @@ -38982,7 +36069,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } @@ -39095,35 +36182,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge": { + "/api/domain": { "post": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Create Or Update Edge (saveEdge)", - "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", - "operationId": "saveEdge", + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDomain", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupIds", + "name": "oauth2ClientIds", "in": "query", - "description": "A list of entity group ids, separated by comma ','", + "description": "A list of oauth2 client registration ids, separated by comma ','", "required": false, "schema": { "type": "array", @@ -39137,7 +36216,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/Domain" } } }, @@ -39149,7 +36228,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/Domain" } } } @@ -39262,39 +36341,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/bulk_import": { - "post": { + "/api/domain/info/{id}": { + "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Import the bulk of edges (processEdgesBulkImport)", - "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "processEdgesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfoById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultEdge" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -39311,7 +36391,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39407,28 +36487,66 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/info/{edgeId}": { + "/api/domain/infos": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Info (getEdgeInfoById)", - "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInfoById", + "summary": "Get Domain infos (getDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfos", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge 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": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on domain's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string" } @@ -39440,7 +36558,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -39553,58 +36671,190 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/domain/{id}": { + "delete": { + "tags": [ + "domain-controller" + ], + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDomain", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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": [ + { + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/instructions/install/{edgeId}/{method}": { - "get": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInstallInstructions", + "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", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "method", + "name": "id", "in": "path", - "description": "Installation method ('docker', 'ubuntu' or 'centos')", "required": true, "schema": { "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -39713,43 +36963,105 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { + "/api/customer/{customerId}/edgeInfos": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeUpgradeInstructions", + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edge info objects owned by the specified 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEdgeInfos", "parameters": [ { - "name": "edgeVersion", + "name": "customerId", "in": "path", - "description": "Edge version", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "method", - "in": "path", - "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "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": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", "enum": [ - "docker", - "ubuntu", - "centos" + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" ] } } @@ -39760,7 +37072,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -39873,31 +37185,98 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { + "/api/customer/{customerId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", - "description": "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.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findMissingToRelatedRuleChains", + "summary": "Get Customer Edges (getCustomerEdges)", + "description": "Returns a page of edges 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": "getCustomerEdges", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge 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", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -39906,7 +37285,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -40019,40 +37398,61 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/sync/{edgeId}": { + "/api/edge": { "post": { "tags": [ "edge-controller" ], - "summary": "Sync edge (syncEdge)", - "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "syncEdge", + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", + "operationId": "saveEdge", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "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" + } + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Edge" } } } @@ -40165,32 +37565,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/types": { - "get": { + "/api/edge/bulk_import": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edge Types (getEdgeTypes)", - "description": "Returns a set of unique edge types based on edges 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": "getEdgeTypes", + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -40207,7 +37614,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40303,22 +37710,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}": { + "/api/edge/info/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge (getEdgeById)", - "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeById", + "summary": "Get Edge Info (getEdgeInfoById)", + "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInfoById", "parameters": [ { "name": "edgeId", @@ -40336,7 +37743,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -40449,20 +37856,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/instructions/install/{edgeId}/{method}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Delete edge (deleteEdge)", - "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEdge", + "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInstallInstructions", "parameters": [ { "name": "edgeId", @@ -40472,11 +37881,32 @@ "schema": { "type": "string" } + }, + { + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeInstructions" + } + } + } }, "400": { "description": "Bad Request", @@ -40586,31 +38016,45 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/upgrade/available": { + "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", + "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeUpgradeInstructions", "parameters": [ { - "name": "edgeId", + "name": "edgeVersion", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Edge version", "required": true, "schema": { "type": "string" } + }, + { + "name": "method", + "in": "path", + "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } } ], "responses": { @@ -40619,7 +38063,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -40732,22 +38176,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { - "post": { + "/api/edge/missingToRelatedRuleChains/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", - "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeRootRuleChain", + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "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.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", "parameters": [ { "name": "edgeId", @@ -40757,15 +38201,6 @@ "schema": { "type": "string" } - }, - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -40774,7 +38209,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "type": "string" } } } @@ -40791,7 +38226,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40887,98 +38322,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edgeInfos/all": { - "get": { + "/api/edge/sync/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", - "description": "Returns a page of edge 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. \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": "getAllEdgeInfos", + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", "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", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge 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", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -40987,7 +38355,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "type": "string" } } } @@ -41004,7 +38372,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41100,89 +38468,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edges": { + "/api/edge/types": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getEdges)", - "description": "Returns a page of edges 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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdges", - "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": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge 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", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Edge Types (getEdgeTypes)", + "description": "Returns a set of unique edge types based on edges 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": "getEdgeTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -41295,43 +38606,180 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edge/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Find related edges (findByQuery)", - "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", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeSearchQuery" - } + "summary": "Get Edge (getEdgeById)", + "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeById", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/Edge" + } + } + } + }, + "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": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "edge-controller" + ], + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -41345,7 +38793,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41441,22 +38889,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edges/enabled": { + "/api/edge/{edgeId}/upgrade/available": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -41576,33 +39035,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edges/list": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edges By Ids (getEdgeList)", - "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeList", + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", "parameters": [ { - "name": "edgeIds", - "in": "query", - "description": "A list of edges ids, separated by comma ','", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], @@ -41612,10 +39077,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "$ref": "#/components/schemas/Edge" } } } @@ -41632,7 +39094,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41728,40 +39190,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/edges": { + "/api/edgeInfos/all": { "get": { "tags": [ "edge-controller" ], - "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", - "description": "Returns a page of Edge objects that belongs to specified Entity Group 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": "getEdgesByEntityGroupId", + "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", + "description": "Returns a page of edge 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. \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": "getAllEdgeInfos", "parameters": [ - { - "name": "entityGroupId", - "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 + "type": "integer", + "format": "int32" } }, { @@ -41770,8 +39223,26 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 1 + "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": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" } }, { @@ -41819,7 +39290,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -41932,38 +39403,80 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/license/activateInstance": { - "post": { + "/api/edges": { + "get": { "tags": [ "edge-controller" ], - "summary": "Activate edge instance (activateInstance)", - "description": "Activates edge license on license portal.", - "operationId": "activateInstance", + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges 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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdges", "parameters": [ { - "name": "licenseSecret", + "name": "pageSize", "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "releaseDate", + "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 case insensitive 'substring' filter based on the edge 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", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -41972,7 +39485,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -41989,7 +39502,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42085,27 +39598,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/license/checkInstance": { + }, "post": { "tags": [ "edge-controller" ], - "summary": "Check edge license (checkInstance)", - "description": "Checks license request from edge service by forwarding request to license portal.", - "operationId": "checkInstance", + "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": "findEdgesByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/EdgeSearchQuery" } } }, @@ -42117,7 +39628,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -42230,40 +39744,29 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/edge": { + "/api/edges/enabled": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge by name (getTenantEdgeByName)", - "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeByName", - "parameters": [ - { - "name": "edgeName", - "in": "query", - "description": "Unique name of the edge", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "type": "boolean" } } } @@ -42376,88 +39879,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/edges": { + "/api/edges/list": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getTenantEdges)", - "description": "Returns a page of edges 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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdges", + "summary": "Get Edges By Ids (getEdgeList)", + "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeList", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "edgeIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of edges ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge 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", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -42467,7 +39915,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -42580,23 +40031,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/user/edges": { + "/api/entityGroup/{entityGroupId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edges (getUserEdges)", - "description": "Returns a page of edges available for 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": "getUserEdges", + "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", + "description": "Returns a page of Edge objects that belongs to specified Entity Group 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": "getEdgesByEntityGroupId", "parameters": [ + { + "name": "entityGroupId", + "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", @@ -42614,16 +40074,7 @@ "required": true, "schema": { "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" + "minimum": 1 } }, { @@ -42784,109 +40235,38 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/events": { - "get": { + "/api/license/activateInstance": { + "post": { "tags": [ - "edge-event-controller" + "edge-controller" ], - "summary": "Get Edge Events (getEdgeEvents)", - "description": "Returns a page of edge events for the requested edge. 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": "getEdgeEvents", + "summary": "Activate edge instance (activateInstance)", + "description": "Activates edge license on license portal.", + "operationId": "activateInstance", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", + "name": "licenseSecret", "in": "query", - "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", + "name": "releaseDate", "in": "query", - "description": "Sequence number of page starting from 0", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge event type 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", - "label", - "customerTitle" - ] - } - }, - { - "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. Edge events with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Edge events with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -42895,7 +40275,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" + "$ref": "#/components/schemas/JsonNode" } } } @@ -42912,7 +40292,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -43008,32 +40388,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/branches": { - "get": { + "/api/license/checkInstance": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List branches (listBranches)", - "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", - "operationId": "listBranches", + "summary": "Check edge license (checkInstance)", + "description": "Checks license request from edge service by forwarding request to license portal.", + "operationId": "checkInstance", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -43050,7 +40437,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -43146,46 +40533,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { + "/api/tenant/edge": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Compare entity data to version (compareEntityDataToVersion)", - "description": "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "compareEntityDataToVersion", + "summary": "Get Tenant Edge by name (getTenantEdgeByName)", + "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeByName", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "internalEntityUuid", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "versionId", + "name": "edgeName", "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "description": "Unique name of the edge", "required": true, "schema": { "type": "string" @@ -43198,7 +40566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "$ref": "#/components/schemas/Edge" } } } @@ -43311,40 +40679,98 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity": { - "post": { + "/api/tenant/edges": { + "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Load entities version (loadEntitiesVersion)", - "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "loadEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionLoadRequest" - } + "summary": "Get Tenant Edges (getTenantEdges)", + "description": "Returns a page of edges 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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge 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", + "label", + "customerTitle" + ] + } + }, + { + "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": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -43361,7 +40787,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -43457,40 +40883,89 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity/{entityType}/{versionId}": { + "/api/user/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entities at version (listEntitiesAtVersion)", - "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntitiesAtVersion", + "summary": "Get Edges (getUserEdges)", + "description": "Returns a page of edges available for 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": "getUserEdges", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string", + "minimum": 1 } }, { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge 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", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -43499,10 +40974,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -43615,31 +41087,108 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity/{requestId}/status": { + "/api/edge/{edgeId}/events": { "get": { "tags": [ - "entities-version-control-controller" + "edge-event-controller" ], - "summary": "Get version load request status (getVersionLoadRequestStatus)", - "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionLoadRequestStatus", + "summary": "Get Edge Events (getEdgeEvents)", + "description": "Returns a page of edge events for the requested edge. 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": "getEdgeEvents", "parameters": [ { - "name": "requestId", + "name": "edgeId", "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge 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 case insensitive 'substring' filter based on the edge event type name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "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. Edge events with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Edge events with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } } ], @@ -43649,7 +41198,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -43762,33 +41311,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity/{versionId}": { + "/api/entities/vc/branches": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List all entities at version (listAllEntitiesAtVersion)", - "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listAllEntitiesAtVersion", - "parameters": [ - { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "List branches (listBranches)", + "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", + "operationId": "listBranches", "responses": { "200": { "description": "OK", @@ -43797,7 +41335,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" + "$ref": "#/components/schemas/BranchInfo" } } } @@ -43911,32 +41449,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Get entity data info (getEntityDataInfo)", - "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEntityDataInfo", + "summary": "Compare entity data to version (compareEntityDataToVersion)", + "description": "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "compareEntityDataToVersion", "parameters": [ - { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "entityType", "in": "path", @@ -43947,9 +41476,9 @@ } }, { - "name": "externalEntityUuid", + "name": "internalEntityUuid", "in": "path", - "description": "A string value representing external entity id", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", @@ -43957,13 +41486,12 @@ } }, { - "name": "internalEntityId", + "name": "versionId", "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -43973,7 +41501,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "$ref": "#/components/schemas/EntityDataDiff" } } } @@ -44086,84 +41614,185 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/version": { - "get": { + "/api/entities/vc/entity": { + "post": { "tags": [ "entities-version-control-controller" ], - "summary": "List all versions (listVersions)", - "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listVersions", - "parameters": [ - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" + "summary": "Load entities version (loadEntitiesVersion)", + "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "loadEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadRequest" + } } }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "uuid" + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "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 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, - "schema": { - "type": "string" + "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": [ { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entities/vc/entity/{entityType}/{versionId}": { + "get": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { - "type": "string", - "enum": [ - "timestamp" - ] + "$ref": "#/components/schemas/EntityType" } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -44173,7 +41802,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -44286,38 +41918,41 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/entities/vc/entity/{requestId}/status": { + "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Save entities version (saveEntitiesVersion)", - "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCreateRequest" - } + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionLoadRequestStatus", + "parameters": [ + { + "name": "requestId", + "in": "path", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/VersionLoadResult" } } } @@ -44334,7 +41969,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -44430,93 +42065,208 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/version/{entityType}": { + "/api/entities/vc/entity/{versionId}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity type versions (listEntityTypeVersions)", - "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityTypeVersions", + "summary": "List all entities at version (listAllEntitiesAtVersion)", + "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listAllEntitiesAtVersion", "parameters": [ { - "name": "entityType", + "name": "versionId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } + } + } } }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "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": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "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": { + "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": [ { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "get": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id", + "required": true, "schema": { "type": "string", - "enum": [ - "timestamp" - ] + "format": "uuid" } }, { - "name": "sortOrder", + "name": "internalEntityId", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -44526,7 +42276,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -44639,42 +42389,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/version": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. 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\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \u003Cjohndoe@gmail.com\u003E\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityVersions", + "summary": "List all versions (listVersions)", + "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listVersions", "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, { "name": "branch", "in": "query", @@ -44684,15 +42415,6 @@ "type": "string" } }, - { - "name": "internalEntityId", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, { "name": "pageSize", "in": "query", @@ -44867,41 +42589,38 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entities/vc/version/{requestId}/status": { - "get": { + }, + "post": { "tags": [ "entities-version-control-controller" ], - "summary": "Get version create request status (getVersionCreateRequestStatus)", - "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionCreateRequestStatus", - "parameters": [ - { - "name": "requestId", - "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save entities version (saveEntitiesVersion)", + "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreateRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "type": "string", + "format": "uuid" } } } @@ -44918,7 +42637,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -45014,45 +42733,92 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "/api/entities/vc/version/{entityType}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. 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 the entity (entities).", - "operationId": "getAllEdgeEntityGroups", + "summary": "List entity type versions (listEntityTypeVersions)", + "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityTypeVersions", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } }, { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", + "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 case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" ] } } @@ -45063,10 +42829,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -45179,56 +42942,113 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { - "post": { + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Assign entity group to edge (assignEntityGroupToEdge)", - "description": "Creates assignment of an existing entity group 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 group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\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": "assignEntityGroupToEdge", + "summary": "List entity versions (listEntityVersions)", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. 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\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "groupType", + "name": "externalEntityUuid", "in": "path", - "description": "EntityGroup type", + "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", "required": true, "schema": { "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "format": "uuid" } }, { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "internalEntityId", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "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 case insensitive 'substring' filter based on the entity version name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -45237,7 +43057,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -45254,7 +43074,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -45350,53 +43170,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entities/vc/version/{requestId}/status": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", - "description": "Clears assignment of the entity group 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 group (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 group and entities inside this group locally.\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": "unassignEntityGroupFromEdge", + "summary": "Get version create request status (getVersionCreateRequestStatus)", + "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionCreateRequestStatus", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", + "name": "requestId", "in": "path", - "description": "EntityGroup type", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] - } - }, - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "format": "uuid" } } ], @@ -45406,7 +43204,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "$ref": "#/components/schemas/VersionCreationResult" } } } @@ -45519,39 +43317,59 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup": { - "post": { + "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Create Or Update Entity Group (saveEntityGroup)", - "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "saveEntityGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroup" - } + "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. 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 the entity (entities).", + "operationId": "getAllEdgeEntityGroups", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -45568,7 +43386,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -45664,63 +43482,56 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", - "description": "Fetch reserved group 'All' 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": "getEntityGroupAllByOwnerAndType", + "summary": "Assign entity group to edge (assignEntityGroupToEdge)", + "description": "Creates assignment of an existing entity group 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 group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\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": "assignEntityGroupToEdge", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, { "name": "groupType", "in": "path", - "description": "Entity Group type", + "description": "EntityGroup type", "required": true, "schema": { "type": "string", "enum": [ - "CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", - "DASHBOARD", - "EDGE" + "DASHBOARD" ] } + }, + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -45729,7 +43540,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -45746,7 +43557,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -45842,23 +43653,46 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Info (getEntityGroupById)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. 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\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \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": "getEntityGroupById", + "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", + "description": "Clears assignment of the entity group 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 group (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 group and entities inside this group locally.\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": "unassignEntityGroupFromEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, { "name": "entityGroupId", "in": "path", @@ -45875,7 +43709,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -45988,34 +43822,42 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entityGroup": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Delete Entity Group (deleteEntityGroup)", - "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id 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 'DELETE' permission for specified group.", - "operationId": "deleteEntityGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Entity Group (saveEntityGroup)", + "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "saveEntityGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -46029,7 +43871,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -46125,51 +43967,76 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/addEntities": { - "post": { + "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Add entities to the group (addEntitiesToEntityGroup)", - "description": "Add entities to the specified entity group. 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", - "operationId": "addEntitiesToEntityGroup", + "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", + "description": "Fetch reserved group 'All' 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": "getEntityGroupAllByOwnerAndType", "parameters": [ { - "name": "entityGroupId", + "name": "ownerType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", "required": true, "schema": { "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -46182,7 +44049,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -46278,22 +44145,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/deleteEntities": { - "post": { + "/api/entityGroup/{entityGroupId}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", - "description": "Removes entities from the specified entity group. 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", - "operationId": "removeEntitiesFromEntityGroup", + "summary": "Get Entity Group Info (getEntityGroupById)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. 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\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \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": "getEntityGroupById", "parameters": [ { "name": "entityGroupId", @@ -46305,24 +44172,17 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -46335,7 +44195,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -46431,22 +44291,20 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/entities": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entities (getEntities)", - "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.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": "getEntities", + "summary": "Delete Entity Group (deleteEntityGroup)", + "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id 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 'DELETE' permission for specified group.", + "operationId": "deleteEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -46456,69 +44314,11 @@ "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", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "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/PageDataShortEntityView" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -46628,22 +44428,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/makePrivate": { + "/api/entityGroup/{entityGroupId}/addEntities": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Make Entity Group Private (makeEntityGroupPrivate)", - "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPrivate", + "summary": "Add entities to the group (addEntitiesToEntityGroup)", + "description": "Add entities to the specified entity group. 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", + "operationId": "addEntitiesToEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -46655,6 +44455,20 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK" @@ -46767,22 +44581,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/makePublic": { + "/api/entityGroup/{entityGroupId}/deleteEntities": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", - "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPublic", + "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", + "description": "Removes entities from the specified entity group. 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", + "operationId": "removeEntitiesFromEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -46794,6 +44608,20 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK" @@ -46906,22 +44734,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/share": { - "post": { + "/api/entityGroup/{entityGroupId}/entities": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group (shareEntityGroup)", - "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroup", + "summary": "Get Group Entities (getEntities)", + "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.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": "getEntities", "parameters": [ { "name": "entityGroupId", @@ -46931,21 +44759,69 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareGroupRequest" - } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataShortEntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -46959,7 +44835,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -47055,22 +44931,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/{entityId}": { - "get": { + "/api/entityGroup/{entityGroupId}/makePrivate": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entity (getGroupEntity)", - "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\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": "getGroupEntity", + "summary": "Make Entity Group Private (makeEntityGroupPrivate)", + "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPrivate", "parameters": [ { "name": "entityGroupId", @@ -47080,11 +44956,141 @@ "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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": [ { - "name": "entityId", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/makePublic": { + "post": { + "tags": [ + "entity-group-controller" + ], + "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", + "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPublic", + "parameters": [ + { + "name": "entityGroupId", "in": "path", - "description": "A string value representing the entity 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" @@ -47093,14 +45099,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShortEntityView" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -47114,7 +45113,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -47210,45 +45209,185 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "/api/entityGroup/{entityGroupId}/share": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroupToChildOwnerUserGroup", + "summary": "Share the Entity Group (shareEntityGroup)", + "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroup", "parameters": [ { "name": "entityGroupId", "in": "path", - "description": "A string value representing the Entity Group Id that you would like to share. 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" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareGroupRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "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": [ + { + "HttpLoginForm": [] }, { - "name": "userGroupId", + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/{entityId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Group Entity (getGroupEntity)", + "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\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": "getGroupEntity", + "parameters": [ + { + "name": "entityGroupId", "in": "path", - "description": "A string value representing the Entity(User) Group Id that you would like to share with. 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" } }, { - "name": "roleId", + "name": "entityId", "in": "path", - "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -47257,7 +45396,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShortEntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -47271,7 +45417,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -47367,68 +45513,45 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { - "get": { + "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. 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\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \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": "getEntityGroupByOwnerAndNameAndType", + "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", + "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroupToChildOwnerUserGroup", "parameters": [ { - "name": "ownerType", + "name": "entityGroupId", "in": "path", - "description": "Tenant or Customer", + "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "type": "string" } }, { - "name": "ownerId", + "name": "userGroupId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] } }, { - "name": "groupName", + "name": "roleId", "in": "path", - "description": "Entity Group name", + "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -47437,14 +45560,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -47458,7 +45574,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -47554,27 +45670,68 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupInfo/{entityGroupId}": { + "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", - "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \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": "getEntityGroupEntityInfoById", + "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. 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\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \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": "getEntityGroupByOwnerAndNameAndType", "parameters": [ { - "name": "entityGroupId", + "name": "ownerType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "groupName", + "in": "path", + "description": "Entity Group name", "required": true, "schema": { "type": "string" @@ -47587,7 +45744,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -47700,33 +45857,30 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupInfos": { + "/api/entityGroupInfo/{entityGroupId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", - "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \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": "getEntityGroupEntityInfosByIds", + "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", + "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \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": "getEntityGroupEntityInfoById", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -47736,10 +45890,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/EntityInfo" } } } @@ -47852,99 +46003,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupInfos/{groupType}": { + "/api/entityGroupInfos": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", + "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \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": "getEntityGroupEntityInfosByIds", "parameters": [ { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "entityGroupIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of group ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -47954,7 +46039,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -48067,22 +46155,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupInfos/{groupType}/shared": { + "/api/entityGroupInfos/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -48102,6 +46190,15 @@ ] } }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "pageSize", "in": "query", @@ -48273,46 +46370,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfos/{groupType}/shared": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getSharedEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -48502,22 +46576,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -48731,45 +46805,61 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/edge/{edgeId}/{groupType}": { + "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. 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.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": "getEdgeEntityGroups", + "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. 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": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", "parameters": [ { - "name": "edgeId", + "name": "ownerType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, { "name": "groupType", "in": "path", - "description": "EntityGroup type", + "description": "Entity Group type", "required": true, "schema": { "type": "string", "enum": [ + "CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", - "DASHBOARD" + "DASHBOARD", + "EDGE" ] } }, @@ -48831,7 +46921,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -48944,33 +47034,97 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/list": { + "/api/entityGroups/edge/{edgeId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIdsV2)", - "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", + "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. 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.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": "getEdgeEntityGroups", "parameters": [ { - "name": "entityGroupIds", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of group ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -48980,10 +47134,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -49096,48 +47247,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/{entityType}/{entityId}": { + "/api/entityGroups/list": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", - "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.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": "getEntityGroupsForEntity", + "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": "getEntityGroupsByIds", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "entityGroupIds", + "in": "query", + "description": "A list of group ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -49149,7 +47285,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityGroupId" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -49263,25 +47399,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/{groupType}": { + "/api/entityGroups/{entityType}/{entityId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. 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.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": "getEntityGroupsByTypeAndPageLink", + "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", + "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.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": "getEntityGroupsForEntity", "parameters": [ { - "name": "groupType", + "name": "entityType", "in": "path", "description": "Entity Group type", "required": true, @@ -49299,64 +47435,13 @@ } }, { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "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", + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -49365,7 +47450,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupId" + } } } } @@ -49478,22 +47566,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/{groupType}/all": { + "/api/entityGroups/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", - "description": "Fetch the list of 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.\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": "getAllEntityGroupsByType", + "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. 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.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": "getEntityGroupsByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -49521,164 +47609,6 @@ "schema": { "type": "boolean" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } - } - }, - "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": [] - } - ] - } - }, - "/api/entityGroups/{groupType}/shared": { - "get": { - "tags": [ - "entity-group-controller" - ], - "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. 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.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": "getSharedEntityGroupsByTypeAndPageLink", - "parameters": [ - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } }, { "name": "pageSize", @@ -49851,22 +47781,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/{groupType}/shared/all": { + "/api/entityGroups/{groupType}/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", - "description": "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.\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": "getAllSharedEntityGroups", + "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", + "description": "Fetch the list of 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.\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": "getAllEntityGroupsByType", "parameters": [ { "name": "groupType", @@ -49885,6 +47815,15 @@ "EDGE" ] } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -50009,46 +47948,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroups/{groupType}/shared": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. 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.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": "getEntityGroupsByOwnerAndTypeAndPageLink", + "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. 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.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": "getSharedEntityGroupsByTypeAndPageLink", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -50238,46 +48154,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "/api/entityGroups/{groupType}/shared/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndTypeList)", - "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", + "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", + "description": "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.\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": "getAllSharedEntityGroups", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -50419,22 +48312,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. 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.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": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -50648,22 +48541,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/ownerInfo/{ownerType}/{ownerId}": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Info (getOwnerInfo)", - "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \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": "getOwnerInfo", + "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": [ { "name": "ownerType", @@ -50687,6 +48580,24 @@ "type": "string" }, "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } } ], "responses": { @@ -50695,7 +48606,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -50808,23 +48722,64 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/ownerInfos": { + "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Infos (getOwnerInfos)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\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": "getOwnerInfos", + "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. 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.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": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, { "name": "pageSize", "in": "query", @@ -50883,7 +48838,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -50996,73 +48951,45 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/owners": { + "/api/ownerInfo/{ownerType}/{ownerId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owners (getOwners)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\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": "getOwners", + "summary": "Get Owner Info (getOwnerInfo)", + "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \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": "getOwnerInfo", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", "required": true, "schema": { "type": "string", - "minimum": 1 + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" } ], "responses": { @@ -51071,7 +48998,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataContactBasedObject" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -51184,40 +49111,82 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/alarmsQuery/count": { - "post": { + "/api/ownerInfos": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Count Alarms by Query (countAlarmsByQuery)", - "description": "Returns the number of alarms that match the query definition.", - "operationId": "countAlarmsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmCountQuery" - } + "summary": "Get Owner Infos (getOwnerInfos)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\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": "getOwnerInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -51234,7 +49203,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -51330,39 +49299,82 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/alarmsQuery/find": { - "post": { + "/api/owners": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Alarms by Query", - "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature \u003E 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", - "operationId": "findAlarmDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmDataQuery" - } + "summary": "Get Owners (getOwners)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\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": "getOwners", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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/PageDataAlarmData" + "$ref": "#/components/schemas/PageDataContactBasedObject" } } } @@ -51379,7 +49391,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -51475,28 +49487,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edqs/state": { - "get": { + "/api/alarmsQuery/count": { + "post": { "tags": [ "entity-query-controller" ], - "summary": "getEdqsState", - "operationId": "getEdqsState", + "summary": "Count Alarms by Query (countAlarmsByQuery)", + "description": "Returns the number of alarms that match the query definition.", + "operationId": "countAlarmsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmCountQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdqsState" + "type": "integer", + "format": "int64" } } } @@ -51513,7 +49537,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -51609,26 +49633,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edqs/system/request": { + "/api/alarmsQuery/find": { "post": { "tags": [ "entity-query-controller" ], - "summary": "processSystemEdqsRequest", - "operationId": "processSystemEdqsRequest", + "summary": "Find Alarms by Query", + "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", + "operationId": "findAlarmDataByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToCoreEdqsRequest" + "$ref": "#/components/schemas/AlarmDataQuery" } } }, @@ -51636,7 +49661,14 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAlarmData" + } + } + } }, "400": { "description": "Bad Request", @@ -51746,40 +49778,28 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entitiesQuery/count": { - "post": { + "/api/edqs/state": { + "get": { "tags": [ "entity-query-controller" ], - "summary": "Count Entities by Query", - "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **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'\"\n\nOptional **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 \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn 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':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n 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': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\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```\n\n## Api Usage Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows 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 \u003E 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'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows 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 \u003E 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.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows 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 \u003E 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows 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 \u003E 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows 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 \u003E 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.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey 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:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter 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: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides 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: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter 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.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E '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: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "countEntitiesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityCountQuery" - } - } - }, - "required": true - }, + "summary": "getEdqsState", + "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/EdqsState" } } } @@ -51796,7 +49816,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -51892,27 +49912,26 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entitiesQuery/find": { + "/api/edqs/system/request": { "post": { "tags": [ "entity-query-controller" ], - "summary": "Find Entity Data by Query", - "description": "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.\n\n# Query Definition\n\n\n\nMain **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'\"\n\nOptional **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 \u003E 20 or temperature\u003C 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' \u003E 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn 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':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n 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': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\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```\n\n## Api Usage Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows 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 \u003E 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'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows 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 \u003E 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.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows 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 \u003E 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows 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 \u003E 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows 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 \u003E 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.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey 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:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter 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: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides 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: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter 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.\n\nSimple predicate example to check 'value \u003C 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value \u003C 10 or value \u003E 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value \u003C 10 or (value \u003E 50 && value \u003C 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature \u003E 20) with the more dynamic expression (for example, temperature \u003E '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: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEntityDataByQuery", + "summary": "processSystemEdqsRequest", + "operationId": "processSystemEdqsRequest", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataQuery" + "$ref": "#/components/schemas/ToCoreEdqsRequest" } } }, @@ -51920,14 +49939,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityData" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -52037,61 +50049,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entitiesQuery/find/keys": { + "/api/entitiesQuery/count": { "post": { "tags": [ "entity-query-controller" ], - "summary": "Find Available Entity Keys by Query (deprecated)", - "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\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": "findAvailableEntityKeysByQuery", - "parameters": [ - { - "name": "timeseries", - "in": "query", - "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "attributes", - "in": "query", - "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "scope", - "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" - ] - } - } - ], + "summary": "Count Entities by Query", + "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **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'\"\n\nOptional **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\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn 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':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n 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': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\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```\n\n## Api Usage Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows 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'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows 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.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows 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.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey 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:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter 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: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides 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: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter 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.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n 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: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "countEntitiesByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataQuery" + "$ref": "#/components/schemas/EntityCountQuery" } } }, @@ -52103,7 +50081,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeys" + "type": "integer", + "format": "int64" } } } @@ -52214,71 +50193,24 @@ } } }, - "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/v2/entitiesQuery/find/keys": { + "/api/entitiesQuery/find": { "post": { "tags": [ "entity-query-controller" ], - "summary": "Find Available Entity Keys By Query", - "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\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": "findAvailableEntityKeysByQueryV2", - "parameters": [ - { - "name": "includeTimeseries", - "in": "query", - "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "includeAttributes", - "in": "query", - "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "scopes", - "in": "query", - "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "SERVER_SCOPE", - "SHARED_SCOPE", - "CLIENT_SCOPE" - ] - } - }, - { - "name": "includeSamples", - "in": "query", - "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], + "summary": "Find Entity Data by Query", + "description": "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.\n\n# Query Definition\n\n\n\nMain **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'\"\n\nOptional **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\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn 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':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n 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': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\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```\n\n## Api Usage Filter\n\nAllows 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':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows 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'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows 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.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows 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.\n\nFor 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:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows 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.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey 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:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter 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: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides 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: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter 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.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n 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: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n 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.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityDataByQuery", "requestBody": { "content": { "application/json": { @@ -52295,7 +50227,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeysV2" + "$ref": "#/components/schemas/PageDataEntityData" } } } @@ -52408,85 +50340,73 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relation": { - "get": { + "/api/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Get Relation (getRelation)", - "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \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": "getRelation", + "summary": "Find Available Entity Keys by Query (deprecated)", + "description": "**Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead.\n\nReturns unique time series and/or attribute key names from entities matching the query.\n\nExecutes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names.\n\nPrimarily used for UI features like autocomplete suggestions.\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": "findAvailableEntityKeysByQuery", "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", + "name": "timeseries", "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "When true, includes unique time series key names in the response.\nWhen false, the 'timeseries' list will be empty.", "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "relationType", + "name": "attributes", "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "description": "When true, includes unique attribute key names in the response.\nWhen false, the 'attribute' list will be empty. Use 'scope' parameter to filter by attribute scope.", "required": true, "schema": { - "type": "string" + "type": "boolean" } }, { - "name": "relationTypeGroup", + "name": "scope", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", + "description": "Filters attribute keys by scope. Only applies when 'attributes' is true.\nIf not specified, returns attribute keys from all scopes.", "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" + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/AvailableEntityKeys" } } } @@ -52503,7 +50423,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -52597,27 +50517,76 @@ } } }, + "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/v2/entitiesQuery/find/keys": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" + ], + "summary": "Find Available Entity Keys By Query", + "description": "Discovers unique time series and/or attribute key names available on entities that match the given query.\nWorks in two steps: first, the request body (an Entity Data Query) is executed to find matching entities\n(page size is capped at 100); then, all distinct key names are collected from those entities.\n\nOptionally, each key can include a sample — the most recent value (by timestamp) for that key\nacross all matched entities.\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": "findAvailableEntityKeysByQueryV2", + "parameters": [ + { + "name": "includeTimeseries", + "in": "query", + "description": "When true, includes unique time series keys in the response.\nWhen false, the 'timeseries' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "includeAttributes", + "in": "query", + "description": "When true, includes unique attribute keys in the response.\nWhen false, the 'attributes' field is omitted. At least one of 'includeTimeseries' or 'includeAttributes' must be true.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "scopes", + "in": "query", + "description": "Filters attribute keys by scope. Only applies when 'includeAttributes' is true.\nWhen not specified, scopes are auto-determined: all three scopes (server, client, shared) for device entities,\nserver scope only for other entity types.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + }, + { + "name": "includeSamples", + "in": "query", + "description": "When true, each key entry includes a 'sample' object with the most recent value and timestamp.\nWhen false, only key names are returned (sample is omitted from JSON).", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } ], - "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" + "$ref": "#/components/schemas/EntityDataQuery" } } }, @@ -52625,7 +50594,14 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailableEntityKeysV2" + } + } + } }, "400": { "description": "Bad Request", @@ -52735,20 +50711,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relation": { + "get": { "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": "Get Relation (getRelation)", + "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \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": "getRelation", "parameters": [ { "name": "fromId", @@ -52807,7 +50785,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } }, "400": { "description": "Bad Request", @@ -52917,10 +50902,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52930,9 +50915,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Find related entities (findByQuery)", + "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": "findByQuery", + "operationId": "findEntityRelationsByQuery", "requestBody": { "content": { "application/json": { @@ -53065,10 +51050,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -53076,7 +51061,7 @@ "tags": [ "entity-relation-controller" ], - "summary": "Delete common relations (deleteCommonRelations)", + "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": [ @@ -53211,10 +51196,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53224,9 +51209,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromV2)", + "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": "findByFromV2", + "operationId": "findEntityRelationsByFrom", "parameters": [ { "name": "fromType", @@ -53378,10 +51363,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53391,9 +51376,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromAndRelationType)", + "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": "findByFromAndRelationType", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { "name": "fromType", @@ -53554,10 +51539,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53567,9 +51552,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Find related entity infos (findInfoByQuery)", + "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": "findInfoByQuery", + "operationId": "findEntityRelationInfosByQuery", "requestBody": { "content": { "application/json": { @@ -53702,10 +51687,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53715,9 +51700,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByFromV2)", + "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": "findInfoByFromV2", + "operationId": "findEntityRelationInfosByFrom", "parameters": [ { "name": "fromType", @@ -53869,10 +51854,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53882,9 +51867,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByToV2)", + "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": "findInfoByToV2", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { "name": "toType", @@ -54036,10 +52021,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54049,9 +52034,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToV2)", + "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": "findByToV2", + "operationId": "findEntityRelationsByTo", "parameters": [ { "name": "toType", @@ -54203,10 +52188,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54216,9 +52201,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToAndRelationType)", + "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": "findByToAndRelationType", + "operationId": "findEntityRelationsByToAndRelationType", "parameters": [ { "name": "toType", @@ -54379,10 +52364,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54392,9 +52377,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelationV2)", + "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": "saveRelationV2", + "operationId": "saveRelation", "requestBody": { "content": { "application/json": { @@ -54524,10 +52509,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -54535,9 +52520,9 @@ "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelationV2)", + "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": "deleteRelationV2", + "operationId": "deleteRelation", "parameters": [ { "name": "fromId", @@ -54713,10 +52698,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54933,10 +52918,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55144,10 +53129,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55346,10 +53331,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55543,10 +53528,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55689,10 +53674,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55827,166 +53812,22 @@ }, "security": [ { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/api/entityView/{entityViewId}": { - "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", - "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": { - "$ref": "#/components/schemas/EntityView" - } - } - } - }, - "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": [] } ] - }, - "delete": { + } + }, + "/api/entityView/{entityViewId}": { + "get": { "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", + "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", @@ -56000,7 +53841,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -56110,108 +53958,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityViewInfos/all": { - "get": { + }, + "delete": { "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", + "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": "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", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -56321,42 +54095,105 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityViews": { - "post": { + "/api/entityViewInfos/all": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Find related entity views (findByQuery)", - "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", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityViewSearchQuery" - } + "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" } }, - "required": true - }, + { + "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": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -56373,7 +54210,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -56469,36 +54306,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityViews/list": { - "get": { + "/api/entityViews": { + "post": { "tags": [ "entity-view-controller" ], - "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", - "parameters": [ - { - "name": "entityViewIds", - "in": "query", - "description": "A list of entity view ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "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": "findEntityViewsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewSearchQuery" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -56525,7 +54358,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -56621,30 +54454,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/entityView": { + "/api/entityViews/list": { "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", + "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": "getEntityViewsByIds", "parameters": [ { - "name": "entityViewName", + "name": "entityViewIds", "in": "query", - "description": "Entity View name", + "description": "A list of entity view ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -56654,7 +54490,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } } } } @@ -56767,87 +54606,31 @@ }, "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": { @@ -56856,7 +54639,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -56969,22 +54752,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", @@ -56992,8 +54775,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -57002,8 +54785,8 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" } }, { @@ -57171,74 +54954,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" @@ -57252,8 +55017,9 @@ "schema": { "type": "string", "enum": [ - "ts", - "id" + "createdTime", + "name", + "type" ] } }, @@ -57269,26 +55035,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": { @@ -57297,7 +55043,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -57410,20 +55156,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", @@ -57657,10 +55405,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57835,10 +55583,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57848,9 +55596,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 +55832,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58233,10 +55981,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58378,10 +56126,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58533,10 +56281,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58679,10 +56427,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -58816,10 +56564,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58968,10 +56716,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59117,10 +56865,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59275,10 +57023,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59419,10 +57167,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59634,10 +57382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59795,10 +57543,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59970,10 +57718,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60144,10 +57892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60308,10 +58056,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60466,10 +58214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60624,10 +58372,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60790,10 +58538,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60965,10 +58713,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61131,10 +58879,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61623,10 +59371,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61769,10 +59517,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61922,10 +59670,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -62073,10 +59821,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62281,10 +60029,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62489,10 +60237,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62634,10 +60382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62772,10 +60520,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62918,10 +60666,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63064,10 +60812,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -63201,10 +60949,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63410,10 +61158,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63619,10 +61367,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63757,10 +61505,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63770,9 +61518,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 +61657,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64055,10 +61803,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -64191,10 +61939,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64330,10 +62078,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64469,10 +62217,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64709,10 +62457,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64813,7 +62561,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "SZZenhqJPiyw1DSvqR4nIJXGaQzIiK" + "resetToken": "pBst60jGfdgPiPfUdrdXYuhT5sRT97" } } } @@ -64837,9 +62585,7 @@ "application/json": { "schema": { "properties": { - "refreshToken": { - - } + "refreshToken": {} } } } @@ -64923,7 +62669,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "SZZenhqJPiyw1DSvqR4nIJXGaQzIiK" + "resetToken": "pBst60jGfdgPiPfUdrdXYuhT5sRT97" } } } @@ -65022,8 +62768,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", @@ -65039,9 +62786,7 @@ "application/json": { "schema": { "type": "object", - "additionalProperties": { - - } + "additionalProperties": {} } } }, @@ -65166,10 +62911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65312,10 +63057,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65327,7 +63072,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 +63192,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65606,10 +63351,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65752,10 +63497,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65936,10 +63681,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66075,10 +63820,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66088,9 +63833,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 +63973,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66387,10 +64132,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66400,7 +64145,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 +64325,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -66723,10 +64468,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66736,7 +64481,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 +64614,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -67006,10 +64751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67294,10 +65039,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67445,10 +65190,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67590,10 +65335,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67748,10 +65493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67894,10 +65639,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68031,10 +65776,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68215,10 +65960,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68359,10 +66104,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68494,10 +66239,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68637,10 +66382,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68771,10 +66516,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68913,10 +66658,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69052,10 +66797,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69191,10 +66936,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69398,10 +67143,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69541,10 +67286,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69692,10 +67437,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69837,10 +67582,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69983,10 +67728,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70120,10 +67865,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70304,10 +68049,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70449,10 +68194,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70616,10 +68361,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70762,10 +68507,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70899,10 +68644,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71083,10 +68828,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71096,9 +68841,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 +68980,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71248,9 +68993,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 +69173,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71585,10 +69330,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71730,10 +69475,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71876,10 +69621,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72013,10 +69758,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72209,10 +69954,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72222,9 +69967,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 +70092,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72490,10 +70235,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72630,10 +70375,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72930,10 +70675,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73114,10 +70859,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73127,9 +70872,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 +71011,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73412,10 +71157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73549,10 +71294,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73684,10 +71429,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73829,10 +71574,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73975,10 +71720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74121,10 +71866,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74311,10 +72056,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74448,10 +72193,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74595,10 +72340,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74794,10 +72539,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75015,10 +72760,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75028,9 +72773,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 +72981,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75406,10 +73151,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75576,10 +73321,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75711,10 +73456,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75724,7 +73469,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 +73591,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75859,7 +73604,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 +73726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -75992,7 +73737,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 +73869,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76606,10 +74351,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76766,10 +74511,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76912,10 +74657,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77058,10 +74803,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77195,10 +74940,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77386,10 +75131,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77399,9 +75144,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 +75283,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77684,10 +75429,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77840,10 +75585,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77984,10 +75729,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77997,7 +75742,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 +75875,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78276,10 +76021,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -78413,10 +76158,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78559,10 +76304,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78572,8 +76317,8 @@ "tags": [ "report-controller" ], - "summary": "getReports", - "operationId": "getReports_1", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { "name": "strReportIds", @@ -78710,10 +76455,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78922,10 +76667,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79105,10 +76850,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79250,10 +76995,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79396,10 +77141,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79542,10 +77287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -79679,10 +77424,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79913,10 +77658,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80065,10 +77810,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80210,10 +77955,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80356,10 +78101,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80493,10 +78238,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80700,10 +78445,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80713,9 +78458,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 +78597,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80865,9 +78610,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 +78754,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81022,9 +78767,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 +78911,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81179,9 +78924,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 +79066,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81542,10 +79287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81688,10 +79433,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -81825,10 +79570,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81838,9 +79583,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 +79725,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82133,10 +79878,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -82284,10 +80029,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82486,10 +80231,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82631,10 +80376,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82769,10 +80514,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82782,9 +80527,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 +80659,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83071,10 +80816,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83206,10 +80951,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83221,7 +80966,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 +81108,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83509,10 +81254,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -83646,10 +81391,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83792,10 +81537,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -83936,10 +81681,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84082,10 +81827,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84228,10 +81973,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84378,10 +82123,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84527,10 +82272,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84673,10 +82418,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -84879,10 +82624,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85026,10 +82771,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85186,10 +82931,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85199,9 +82944,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 +83083,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85484,10 +83229,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85497,9 +83242,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 +83375,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85643,9 +83388,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 +83541,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85809,9 +83554,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 +83726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -85994,9 +83739,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 +83902,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86306,10 +84051,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86461,10 +84206,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -86614,10 +84359,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -86811,10 +84556,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87028,10 +84773,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87173,10 +84918,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87319,10 +85064,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87465,10 +85210,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -87602,10 +85347,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87757,10 +85502,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87960,10 +85705,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -87973,9 +85718,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 +85854,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88122,9 +85867,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 +86006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88449,10 +86194,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88594,10 +86339,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -88737,10 +86482,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -88875,10 +86620,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89021,10 +86766,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89178,10 +86923,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89324,10 +87069,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89482,10 +87227,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -89673,10 +87418,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -90248,10 +87993,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -90391,10 +88136,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -90516,10 +88261,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91413,10 +89158,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91548,10 +89293,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91683,10 +89428,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91818,10 +89563,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -91964,10 +89709,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92102,10 +89847,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92248,10 +89993,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92387,10 +90132,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92533,10 +90278,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -92755,10 +90500,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -92899,10 +90644,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93045,10 +90790,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93200,10 +90945,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93355,10 +91100,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93368,8 +91113,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 +91251,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93684,10 +91429,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -93879,10 +91624,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94034,10 +91779,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94189,10 +91934,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94202,7 +91947,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 +92128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94554,10 +92299,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94719,10 +92464,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -94875,10 +92620,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95022,10 +92767,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -95174,10 +92919,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95321,10 +93066,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95334,7 +93079,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 +93250,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95680,10 +93425,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -95838,10 +93583,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -96004,10 +93749,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96171,10 +93916,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96329,10 +94074,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96501,10 +94246,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96659,10 +94404,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -96872,10 +94617,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97038,10 +94783,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97214,10 +94959,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97392,10 +95137,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97584,10 +95329,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -97775,10 +95520,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -97945,10 +95690,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98231,10 +95976,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98398,10 +96143,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -98573,10 +96318,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98718,10 +96463,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -98864,10 +96609,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99010,10 +96755,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -99147,10 +96892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99349,10 +97094,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99550,10 +97295,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99563,9 +97308,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 +97447,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99847,10 +97592,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -99993,10 +97738,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -100130,10 +97875,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100276,10 +98021,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100411,10 +98156,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100557,10 +98302,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100749,10 +98494,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -100943,10 +98688,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101094,10 +98839,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101383,10 +99128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101518,10 +99263,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101663,10 +99408,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101818,10 +99563,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -101965,10 +99710,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102103,10 +99848,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102238,10 +99983,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102373,10 +100118,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102567,10 +100312,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102713,10 +100458,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -102848,10 +100593,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -102991,10 +100736,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103126,10 +100871,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103261,10 +101006,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103389,10 +101134,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103524,10 +101269,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -103679,10 +101424,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -103832,10 +101577,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -103975,10 +101720,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104121,10 +101866,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104259,10 +102004,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104394,10 +102139,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104407,9 +102152,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 +102277,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104667,10 +102412,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -104810,10 +102555,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104945,10 +102690,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -104958,9 +102703,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 +102828,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105236,10 +102981,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105374,10 +103119,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105509,10 +103254,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105643,10 +103388,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -105837,10 +103582,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106049,10 +103794,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106252,10 +103997,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106455,10 +104200,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106658,10 +104403,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106834,10 +104579,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -106989,10 +104734,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107135,10 +104880,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107270,10 +105015,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107414,10 +105159,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -107559,10 +105304,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -107694,10 +105439,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107833,10 +105578,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107978,10 +105723,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -107991,7 +105736,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 +105858,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -108124,7 +105869,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 +105994,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108262,9 +106007,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 +106133,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108534,10 +106279,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -108545,7 +106290,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 +106426,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108694,9 +106439,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 +106574,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -108964,10 +106709,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109158,10 +106903,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109304,10 +107049,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -109441,10 +107186,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109587,10 +107332,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109733,10 +107478,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -109879,10 +107624,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110027,10 +107772,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110230,10 +107975,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110433,10 +108178,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110627,10 +108372,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110640,9 +108385,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 +108524,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -110966,10 +108711,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111101,10 +108846,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111374,10 +109119,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -111511,10 +109256,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111657,10 +109402,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -111794,10 +109539,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -111929,10 +109674,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112064,10 +109809,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112220,10 +109965,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112367,10 +110112,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -112511,10 +110256,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112656,10 +110401,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -112791,10 +110536,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -112945,10 +110690,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113091,10 +110836,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -113245,10 +110990,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113400,10 +111145,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -113537,10 +111282,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113686,10 +111431,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -113832,10 +111577,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114085,10 +111830,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114243,10 +111988,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -114488,22 +112233,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,167 +112382,20 @@ }, "security": [ { - "http_login_form": [] - }, - { - "api_key_form": [] - } - ] - } - }, - "/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", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WidgetsBundle" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WidgetsBundle" - } - } - } - }, - "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": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/widgetsBundle/{widgetsBundleId}": { - "get": { + }, + "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", + "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", @@ -114807,17 +112405,160 @@ "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "Ordered list of widget type Ids to be included by widgets bundle", + "items": { + "type": "string" + } + } + } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "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": [ + { + "HttpLoginForm": [] + }, + { + "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", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -114841,7 +112582,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -114937,20 +112678,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 +112703,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 +112833,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 +112858,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 +112874,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -115227,22 +112970,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 +113002,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 +113123,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115600,10 +113343,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115613,9 +113356,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 +113481,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -115890,10 +113633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -116276,6 +114019,16 @@ "provider" ] }, + "AiModelExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AiModelId": { "type": "object", "properties": { @@ -116511,8 +114264,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 +114491,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 +115273,6 @@ ] }, "AlarmRuleBooleanFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -117630,7 +115427,6 @@ ] }, "AlarmRuleDurationCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -117675,7 +115471,6 @@ ] }, "AlarmRuleNoDataFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -117698,7 +115493,6 @@ ] }, "AlarmRuleNumericFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -117721,7 +115515,6 @@ ] }, "AlarmRuleRepeatingCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -117759,7 +115552,6 @@ ] }, "AlarmRuleSimpleCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -117801,7 +115593,6 @@ ] }, "AlarmRuleStringFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -118420,6 +116211,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": [ { @@ -118476,9 +116290,7 @@ "TS_ROLLING" ] }, - "ArrayNode": { - - }, + "ArrayNode": {}, "Asset": { "type": "object", "properties": { @@ -118540,6 +116352,16 @@ "name" ] }, + "AssetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetId": { "type": "object", "properties": { @@ -118696,6 +116518,16 @@ } } }, + "AssetProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetProfileId": { "type": "object", "properties": { @@ -119777,12 +117609,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -119797,12 +117632,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -119817,12 +117655,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -120742,9 +118583,7 @@ "ContactBasedObject": { "type": "object", "properties": { - "id": { - - }, + "id": {}, "createdTime": { "type": "integer", "format": "int64", @@ -120852,6 +118691,16 @@ "type" ] }, + "ConverterExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "ConverterId": { "type": "object", "properties": { @@ -121343,6 +119192,16 @@ "title" ] }, + "CustomerExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "CustomerId": { "type": "object", "properties": { @@ -121631,6 +119490,16 @@ "type" ] }, + "DashboardExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DashboardId": { "type": "object", "properties": { @@ -122140,7 +120009,6 @@ ] }, "DefaultDeviceConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/DeviceConfiguration" @@ -122251,35 +120119,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 +120664,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 +121134,16 @@ } } }, + "DeviceProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DeviceProfileId": { "type": "object", "properties": { @@ -123694,7 +121566,6 @@ ] }, "DummyJobConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/JobConfiguration" @@ -124009,6 +121880,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 +121933,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 +122516,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 +122586,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 +122842,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 +123772,16 @@ "type" ] }, + "EntityViewExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "EntityViewId": { "type": "object", "properties": { @@ -126179,7 +124162,6 @@ ] }, "EscalatedNotificationRuleRecipientsConfig": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" @@ -126346,13 +124328,13 @@ "FeaturesInfo": { "type": "object", "properties": { - "smsEnabled": { + "whiteLabelingEnabled": { "type": "boolean" }, - "oauthEnabled": { + "smsEnabled": { "type": "boolean" }, - "whiteLabelingEnabled": { + "oauthEnabled": { "type": "boolean" }, "notificationEnabled": { @@ -126506,7 +124488,6 @@ ] }, "GeofencingCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -126907,16 +124888,6 @@ "serviceAccountKey" ] }, - "GroupEntityExportData": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - } - ], - "required": [ - "entityType" - ] - }, "GroupPermission": { "type": "object", "description": "A JSON value representing the group permission.", @@ -127069,9 +125040,7 @@ "HasIdObject": { "type": "object", "properties": { - "id": { - - } + "id": {} } }, "HeaderFooter": { @@ -127522,6 +125491,16 @@ } } }, + "IntegrationExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "IntegrationId": { "type": "object", "properties": { @@ -127655,6 +125634,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": [ @@ -127899,9 +125901,7 @@ }, "JsonNode": { "description": "A value representing the any type (object or primitive)", - "example": { - - } + "example": {} }, "JsonTransportPayloadConfiguration": { "allOf": [ @@ -128941,9 +126941,7 @@ "useOldApi": { "type": "boolean" }, - "id": { - - }, + "id": {}, "title": { "type": "string" }, @@ -129640,6 +127638,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 +128101,7 @@ "sent": { "type": "object", "additionalProperties": { + "type": "integer", "format": "int32" } }, @@ -130093,6 +128115,7 @@ } }, "totalErrors": { + "type": "integer", "format": "int32" }, "error": { @@ -130167,6 +128190,16 @@ } } }, + "NotificationRuleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationRuleId": { "type": "object", "properties": { @@ -130251,21 +128284,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 +128434,16 @@ "type" ] }, + "NotificationTargetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTargetId": { "type": "object", "properties": { @@ -130484,6 +128527,16 @@ "deliveryMethodsTemplates" ] }, + "NotificationTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTemplateId": { "type": "object", "properties": { @@ -131362,7 +129415,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1 + "example": 1.0 }, "tag": { "type": "string", @@ -131526,7 +129579,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1 + "example": 1.0 }, "tag": { "type": "string", @@ -131669,9 +129722,7 @@ "type" ] }, - "OutputStrategy": { - - }, + "OutputStrategy": {}, "PSKLwM2MBootstrapServerCredential": { "allOf": [ { @@ -134118,7 +132169,6 @@ ] }, "PropagationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -134558,6 +132608,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 +132698,6 @@ } }, "RelatedEntitiesAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -135504,15 +133576,15 @@ "$ref": "#/components/schemas/Filter" } }, + "namePattern": { + "type": "string" + }, "components": { "type": "array", "items": { "$ref": "#/components/schemas/ReportComponent" } }, - "namePattern": { - "type": "string" - }, "timeDataPattern": { "type": "string" } @@ -135521,6 +133593,16 @@ "format" ] }, + "ReportTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "ReportTemplateId": { "type": "object", "properties": { @@ -135678,15 +133760,15 @@ "legendValueColor": { "type": "string" }, + "xaxis": { + "$ref": "#/components/schemas/TimeSeriesChartXAxisSettings" + }, "yaxes": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TimeSeriesChartYAxisSettings" } }, - "xaxis": { - "$ref": "#/components/schemas/TimeSeriesChartXAxisSettings" - }, "thresholds": { "type": "array", "items": { @@ -135906,6 +133988,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 +134165,16 @@ "type" ] }, + "RoleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "RoleId": { "type": "object", "properties": { @@ -136527,6 +134642,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": { @@ -136749,7 +134887,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1 + "example": 1.0 }, "tag": { "type": "string", @@ -137162,7 +135300,6 @@ } }, "ScriptCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -137390,6 +135527,12 @@ "homeDashboard": { "$ref": "#/components/schemas/HomeDashboardParams" }, + "notificationRecipient": { + "$ref": "#/components/schemas/NotificationTargetId" + }, + "captcha": { + "$ref": "#/components/schemas/CaptchaParams" + }, "signUpFields": { "type": "array", "items": { @@ -137407,12 +135550,6 @@ }, "customerGroupId": { "$ref": "#/components/schemas/EntityGroupId" - }, - "notificationRecipient": { - "$ref": "#/components/schemas/NotificationTargetId" - }, - "captcha": { - "$ref": "#/components/schemas/CaptchaParams" } }, "required": [ @@ -137648,7 +135785,6 @@ ] }, "SimpleCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -138551,9 +136687,7 @@ } } }, - "SystemLevelUsersFilter": { - - }, + "SystemLevelUsersFilter": {}, "TableSortOrder": { "type": "object", "properties": { @@ -138575,6 +136709,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": { @@ -138770,11 +136927,11 @@ "public": { "type": "boolean" }, - "publicLink": { + "link": { "type": "string", "readOnly": true }, - "link": { + "publicLink": { "type": "string", "readOnly": true } @@ -138797,6 +136954,16 @@ } } }, + "TbResourceExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "TbResourceId": { "type": "object", "properties": { @@ -138891,11 +137058,11 @@ "public": { "type": "boolean" }, - "publicLink": { + "link": { "type": "string", "readOnly": true }, - "link": { + "publicLink": { "type": "string", "readOnly": true } @@ -139647,7 +137814,23 @@ }, "ThingsboardErrorCode": { "description": "Platform error code", - "enum": [2, 10, 11, 15, 20, 30, 31, 32, 33, 34, 35, 40, 41, 45, 46] + "enum": [ + 2, + 10, + 11, + 15, + 20, + 30, + 31, + 32, + 33, + 34, + 35, + 40, + 41, + 45, + 46 + ] }, "ThingsboardErrorResponse": { "properties": { @@ -140456,39 +138639,27 @@ "properties": { "metricSummaryItems": { "type": "array", - "items": { - - } + "items": {} }, "anomalyModelSummaryItems": { "type": "array", - "items": { - - } + "items": {} }, "calculationFieldSummaryItems": { "type": "array", - "items": { - - } + "items": {} }, "predictionModelSummaryItems": { "type": "array", - "items": { - - } + "items": {} }, "viewSummaryItems": { "type": "array", - "items": { - - } + "items": {} }, "aiSummaryItems": { "type": "array", - "items": { - - } + "items": {} } } }, @@ -140571,9 +138742,7 @@ }, "runtimeFilters": { "type": "array", - "items": { - - } + "items": {} } } }, @@ -140613,22 +138782,23 @@ "type": "integer", "format": "int64" }, - "value": { - - }, + "value": {}, "key": { "type": "string" }, - "doubleValue": { - "type": "number", - "format": "double" + "booleanValue": { + "type": "boolean" + }, + "valueAsString": { + "type": "string" }, "longValue": { "type": "integer", "format": "int64" }, - "booleanValue": { - "type": "boolean" + "doubleValue": { + "type": "number", + "format": "double" }, "dataType": { "$ref": "#/components/schemas/DataType" @@ -140639,9 +138809,6 @@ "strValue": { "type": "string" }, - "valueAsString": { - "type": "string" - }, "version": { "type": "integer", "format": "int64" @@ -141417,9 +139584,7 @@ } } }, - "Version": { - - }, + "Version": {}, "VersionCreateConfig": { "type": "object", "properties": { @@ -142423,18 +140588,18 @@ } }, "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", + "description": "Enter the API key value with 'ApiKey' prefix in format: **ApiKey **\n\nExample: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**\n\n
**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.
\n", "name": "X-Authorization", "in": "header" } } } -} \ No newline at end of file +} 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..2d7bd185 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(); @@ -35062,157 +34538,6 @@ private HttpRequest.Builder getDefaultTenantProfileInfoRequestBuilder(Map headers) throws ApiException { - ApiResponse localVarResponse = getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, headers); - return localVarResponse.getData(); - } - - /** - * Get attributes (getDeviceAttributes) - * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` 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 clientKeys Comma separated key names for attribute with client scope (required) - * @param sharedKeys Comma separated key names for attribute with shared scope (required) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys) throws ApiException { - return getDeviceAttributesWithHttpInfo(deviceToken, clientKeys, sharedKeys, null); - } - - /** - * Get attributes (getDeviceAttributes) - * Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` 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 clientKeys Comma separated key names for attribute with client scope (required) - * @param sharedKeys Comma separated key names for attribute with shared scope (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDeviceAttributesRequestBuilder(deviceToken, clientKeys, sharedKeys, 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("getDeviceAttributes", 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 getDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String clientKeys, @javax.annotation.Nonnull String sharedKeys, 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 getDeviceAttributes"); - } - // verify the required parameter 'clientKeys' is set - if (clientKeys == null) { - throw new ApiException(400, "Missing the required parameter 'clientKeys' when calling getDeviceAttributes"); - } - // verify the required parameter 'sharedKeys' is set - if (sharedKeys == null) { - throw new ApiException(400, "Missing the required parameter 'sharedKeys' when calling getDeviceAttributes"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/attributes" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "clientKeys"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("clientKeys", clientKeys)); - localVarQueryParameterBaseName = "sharedKeys"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sharedKeys", sharedKeys)); - - 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 (getDeviceById) * Fetch the Device object based on the provided Device Id. 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). @@ -35989,50 +35314,182 @@ private HttpRequest.Builder getDeviceProfileInfosRequestBuilder(@javax.annotatio } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) - * 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> + * 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 getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIds(deviceProfileIds, null); + } + + /** + * 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 getDeviceProfileInfosByIds(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, headers); + return localVarResponse.getData(); + } + + /** + * 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> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { + return getDeviceProfileInfosByIdsWithHttpInfo(deviceProfileIds, null); + } + + /** + * 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> getDeviceProfileInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileInfosByIdsRequestBuilder(deviceProfileIds, 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("getDeviceProfileInfosByIds", 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 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 getDeviceProfileInfosByIds"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/deviceProfileInfos/list"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "deviceProfileIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "deviceProfileIds", deviceProfileIds)); + + 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 Profile names (getDeviceProfileNames) + * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) + * @return List<EntityInfo> * @throws ApiException if fails to make API call */ - public List getDeviceProfileInfosByIdsV2(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2(deviceProfileIds, null); + public List getDeviceProfileNames(@javax.annotation.Nullable Boolean activeOnly) throws ApiException { + return getDeviceProfileNames(activeOnly, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) - * 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) + * Get Device Profile names (getDeviceProfileNames) + * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) * @param headers Optional headers to include in the request - * @return List<DeviceProfileInfo> + * @return List<EntityInfo> * @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 getDeviceProfileNames(@javax.annotation.Nullable Boolean activeOnly, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileNamesWithHttpInfo(activeOnly, headers); return localVarResponse.getData(); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) - * 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>> + * Get Device Profile names (getDeviceProfileNames) + * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) + * @return ApiResponse<List<EntityInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List deviceProfileIds) throws ApiException { - return getDeviceProfileInfosByIdsV2WithHttpInfo(deviceProfileIds, null); + public ApiResponse> getDeviceProfileNamesWithHttpInfo(@javax.annotation.Nullable Boolean activeOnly) throws ApiException { + return getDeviceProfileNamesWithHttpInfo(activeOnly, null); } /** - * Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) - * 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) + * Get Device Profile names (getDeviceProfileNames) + * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) * @param headers Optional headers to include in the request - * @return ApiResponse<List<DeviceProfileInfo>> + * @return ApiResponse<List<EntityInfo>> * @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> getDeviceProfileNamesWithHttpInfo(@javax.annotation.Nullable Boolean activeOnly, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDeviceProfileNamesRequestBuilder(activeOnly, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -36043,11 +35500,11 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDeviceProfileInfosByIdsV2", localVarResponse); + throw getApiException("getDeviceProfileNames", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -36057,10 +35514,10 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp 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 @@ -36079,21 +35536,17 @@ public ApiResponse> getDeviceProfileInfosByIdsV2WithHttp } } - private HttpRequest.Builder getDeviceProfileInfosByIdsV2RequestBuilder(@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"); - } + private HttpRequest.Builder getDeviceProfileNamesRequestBuilder(@javax.annotation.Nullable Boolean activeOnly, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/deviceProfileInfos/list"; + String localVarPath = "/api/deviceProfile/names"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "deviceProfileIds"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "deviceProfileIds", deviceProfileIds)); + localVarQueryParameterBaseName = "activeOnly"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("activeOnly", activeOnly)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -36121,50 +35574,50 @@ private HttpRequest.Builder getDeviceProfileInfosByIdsV2RequestBuilder(@javax.an } /** - * Get Device Profile names (getDeviceProfileNames) - * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) - * @return List<EntityInfo> + * 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 getDeviceProfileNames(@javax.annotation.Nullable Boolean activeOnly) throws ApiException { - return getDeviceProfileNames(activeOnly, null); + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeys(deviceProfileId, null); } /** - * Get Device Profile names (getDeviceProfileNames) - * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) + * 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<EntityInfo> + * @return List<String> * @throws ApiException if fails to make API call */ - public List getDeviceProfileNames(@javax.annotation.Nullable Boolean activeOnly, Map headers) throws ApiException { - ApiResponse> localVarResponse = getDeviceProfileNamesWithHttpInfo(activeOnly, headers); + public List getDeviceProfileTimeseriesKeys(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, headers); return localVarResponse.getData(); } /** - * Get Device Profile names (getDeviceProfileNames) - * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) - * @return ApiResponse<List<EntityInfo>> + * 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> getDeviceProfileNamesWithHttpInfo(@javax.annotation.Nullable Boolean activeOnly) throws ApiException { - return getDeviceProfileNamesWithHttpInfo(activeOnly, null); + public ApiResponse> getDeviceProfileTimeseriesKeysWithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { + return getDeviceProfileTimeseriesKeysWithHttpInfo(deviceProfileId, null); } /** - * Get Device Profile names (getDeviceProfileNames) - * Returns a set of unique device profile names owned by the tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param activeOnly Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices. (optional, default to false) + * 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<EntityInfo>> + * @return ApiResponse<List<String>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDeviceProfileNamesWithHttpInfo(@javax.annotation.Nullable Boolean activeOnly, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDeviceProfileNamesRequestBuilder(activeOnly, headers); + 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(), @@ -36175,11 +35628,11 @@ public ApiResponse> getDeviceProfileNamesWithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDeviceProfileNames", localVarResponse); + throw getApiException("getDeviceProfileTimeseriesKeys", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -36189,10 +35642,10 @@ public ApiResponse> getDeviceProfileNamesWithHttpInfo(@javax.an 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 @@ -36211,17 +35664,17 @@ public ApiResponse> getDeviceProfileNamesWithHttpInfo(@javax.an } } - private HttpRequest.Builder getDeviceProfileNamesRequestBuilder(@javax.annotation.Nullable Boolean activeOnly, Map headers) throws ApiException { + private HttpRequest.Builder getDeviceProfileTimeseriesKeysRequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/deviceProfile/names"; + String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "activeOnly"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("activeOnly", activeOnly)); + localVarQueryParameterBaseName = "deviceProfileId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -41457,50 +40910,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 +40964,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 +41000,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(); @@ -42785,8 +42238,8 @@ private HttpRequest.Builder getEntityViewsByEntityGroupIdRequestBuilder(@javax.a * @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); } /** @@ -42797,8 +42250,8 @@ public List getEntityViewsByIdsV2(@javax.annotation.Nonnull 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(); } @@ -42809,8 +42262,8 @@ public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List> 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); } /** @@ -42821,8 +42274,8 @@ public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.an * @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(), @@ -42833,7 +42286,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) { @@ -42869,10 +42322,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(); @@ -42911,207 +42364,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, 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 +42380,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 +42402,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 +42424,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 +42446,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 +42458,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 +42494,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 +42578,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 +42594,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 +42616,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 +42638,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 +42660,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 +42672,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 +42708,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(); @@ -43642,169 +42895,6 @@ private HttpRequest.Builder getFeaturesInfoRequestBuilder(Map he return localVarRequestBuilder; } - /** - * Get Device Firmware (getFirmware) - * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) - * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @return String - * @throws ApiException if fails to make API call - */ - public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { - return getFirmware(deviceToken, title, version, size, chunk, null); - } - - /** - * Get Device Firmware (getFirmware) - * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) - * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String getFirmware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { - ApiResponse localVarResponse = getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); - return localVarResponse.getData(); - } - - /** - * Get Device Firmware (getFirmware) - * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) - * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { - return getFirmwareWithHttpInfo(deviceToken, title, version, size, chunk, null); - } - - /** - * Get Device Firmware (getFirmware) - * Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) - * @param version Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without chunks. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getFirmwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getFirmwareRequestBuilder(deviceToken, title, version, size, chunk, 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("getFirmware", 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 getFirmwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, 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 getFirmware"); - } - // verify the required parameter 'title' is set - if (title == null) { - throw new ApiException(400, "Missing the required parameter 'title' when calling getFirmware"); - } - // verify the required parameter 'version' is set - if (version == null) { - throw new ApiException(400, "Missing the required parameter 'version' when calling getFirmware"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/firmware" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "title"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); - localVarQueryParameterBaseName = "version"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); - localVarQueryParameterBaseName = "size"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); - localVarQueryParameterBaseName = "chunk"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); - - 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; - } - /** * getFirmwareById * @@ -44051,7 +43141,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 +43151,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 +43163,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 +45159,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 +45213,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 +45249,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(); @@ -48374,66 +47464,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; + } + + /** + * 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 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 String getMailOAuth2AuthorizationUrl() throws ApiException { + return getMailOAuth2AuthorizationUrl(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) + * 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 List<LwM2mObject> + * @return String * @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 String getMailOAuth2AuthorizationUrl(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailOAuth2AuthorizationUrlWithHttpInfo(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>> + * 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> 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 getMailOAuth2AuthorizationUrlWithHttpInfo() throws ApiException { + return getMailOAuth2AuthorizationUrlWithHttpInfo(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) + * 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<List<LwM2mObject>> + * @return ApiResponse<String> * @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 getMailOAuth2AuthorizationUrlWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailOAuth2AuthorizationUrlRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -48444,11 +47674,11 @@ public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getLwm2mListObjectsPage", localVarResponse); + throw getApiException("getMailOAuth2AuthorizationUrl", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -48458,10 +47688,10 @@ public ApiResponse> getLwm2mListObjectsPageWithHttpInfo(@javax 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 @@ -48480,46 +47710,15 @@ 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"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getLwm2mListObjectsPage"); - } + private HttpRequest.Builder getMailOAuth2AuthorizationUrlRequestBuilder(Map headers) throws ApiException { 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)); + String localVarPath = "/api/admin/mail/oauth2/authorize"; - 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("Accept", "application/json"); + localVarRequestBuilder.header("Accept", "application/text, application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -48998,7 +48197,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 +48207,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 +48219,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 +48229,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 +48424,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 +48435,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 +48448,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 +49850,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 +49904,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 +49940,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 +49982,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 +49993,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 +50010,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 +50027,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 +50044,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 +50056,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 +50092,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(); @@ -51236,74 +50435,222 @@ private HttpRequest.Builder getNotificationTemplatesRequestBuilder(@javax.annota } /** - * Get notifications (getNotifications) - * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param unreadOnly To search for unread notifications only (optional, default to false) - * @param deliveryMethod Delivery method (optional) - * @return PageDataNotification + * Get notifications (getNotifications) + * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param unreadOnly To search for unread notifications only (optional, default to false) + * @param deliveryMethod Delivery method (optional) + * @return PageDataNotification + * @throws ApiException if fails to make API call + */ + public PageDataNotification getNotifications(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod) throws ApiException { + return getNotifications(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, null); + } + + /** + * Get notifications (getNotifications) + * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param unreadOnly To search for unread notifications only (optional, default to false) + * @param deliveryMethod Delivery method (optional) + * @param headers Optional headers to include in the request + * @return PageDataNotification + * @throws ApiException if fails to make API call + */ + public PageDataNotification getNotifications(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod, Map headers) throws ApiException { + ApiResponse localVarResponse = getNotificationsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, headers); + return localVarResponse.getData(); + } + + /** + * Get notifications (getNotifications) + * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param unreadOnly To search for unread notifications only (optional, default to false) + * @param deliveryMethod Delivery method (optional) + * @return ApiResponse<PageDataNotification> + * @throws ApiException if fails to make API call + */ + public ApiResponse getNotificationsWithHttpInfo(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod) throws ApiException { + return getNotificationsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, null); + } + + /** + * Get notifications (getNotifications) + * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param unreadOnly To search for unread notifications only (optional, default to false) + * @param deliveryMethod Delivery method (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<PageDataNotification> + * @throws ApiException if fails to make API call + */ + public ApiResponse getNotificationsWithHttpInfo(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationsRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, 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("getNotifications", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + PageDataNotification 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 getNotificationsRequestBuilder(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod, 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 getNotifications"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getNotifications"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/notifications"; + + 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 = "unreadOnly"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("unreadOnly", unreadOnly)); + localVarQueryParameterBaseName = "deliveryMethod"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deliveryMethod", deliveryMethod)); + + 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 OAuth2 Client by id (getOAuth2ClientById) + * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param id (required) + * @return OAuth2Client * @throws ApiException if fails to make API call */ - public PageDataNotification getNotifications(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod) throws ApiException { - return getNotifications(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, null); + public OAuth2Client getOAuth2ClientById(@javax.annotation.Nonnull UUID id) throws ApiException { + return getOAuth2ClientById(id, null); } /** - * Get notifications (getNotifications) - * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param unreadOnly To search for unread notifications only (optional, default to false) - * @param deliveryMethod Delivery method (optional) + * Get OAuth2 Client by id (getOAuth2ClientById) + * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param id (required) * @param headers Optional headers to include in the request - * @return PageDataNotification + * @return OAuth2Client * @throws ApiException if fails to make API call */ - public PageDataNotification getNotifications(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod, Map headers) throws ApiException { - ApiResponse localVarResponse = getNotificationsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, headers); + public OAuth2Client getOAuth2ClientById(@javax.annotation.Nonnull UUID id, Map headers) throws ApiException { + ApiResponse localVarResponse = getOAuth2ClientByIdWithHttpInfo(id, headers); return localVarResponse.getData(); } /** - * Get notifications (getNotifications) - * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param unreadOnly To search for unread notifications only (optional, default to false) - * @param deliveryMethod Delivery method (optional) - * @return ApiResponse<PageDataNotification> + * Get OAuth2 Client by id (getOAuth2ClientById) + * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param id (required) + * @return ApiResponse<OAuth2Client> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationsWithHttpInfo(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod) throws ApiException { - return getNotificationsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, null); + public ApiResponse getOAuth2ClientByIdWithHttpInfo(@javax.annotation.Nonnull UUID id) throws ApiException { + return getOAuth2ClientByIdWithHttpInfo(id, null); } /** - * Get notifications (getNotifications) - * Returns the page of notifications for 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 any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch Case-insensitive 'substring' filter based on notification subject or text (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param unreadOnly To search for unread notifications only (optional, default to false) - * @param deliveryMethod Delivery method (optional) + * Get OAuth2 Client by id (getOAuth2ClientById) + * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param id (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataNotification> + * @return ApiResponse<OAuth2Client> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationsWithHttpInfo(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationsRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, unreadOnly, deliveryMethod, headers); + public ApiResponse getOAuth2ClientByIdWithHttpInfo(@javax.annotation.Nonnull UUID id, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientByIdRequestBuilder(id, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -51314,11 +50661,11 @@ public ApiResponse getNotificationsWithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotifications", localVarResponse); + throw getApiException("getOAuth2ClientById", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -51328,10 +50675,10 @@ public ApiResponse getNotificationsWithHttpInfo(@javax.ann String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataNotification responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + OAuth2Client responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -51350,48 +50697,18 @@ public ApiResponse getNotificationsWithHttpInfo(@javax.ann } } - private HttpRequest.Builder getNotificationsRequestBuilder(@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 Boolean unreadOnly, @javax.annotation.Nullable String deliveryMethod, 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 getNotifications"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getNotifications"); + private HttpRequest.Builder getOAuth2ClientByIdRequestBuilder(@javax.annotation.Nonnull UUID id, 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 getOAuth2ClientById"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/notifications"; - - 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 = "unreadOnly"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("unreadOnly", unreadOnly)); - localVarQueryParameterBaseName = "deliveryMethod"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deliveryMethod", deliveryMethod)); + String localVarPath = "/api/oauth2/client/{id}" + .replace("{id}", ApiClient.urlEncode(id.toString())); - 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("Accept", "application/json"); @@ -51408,50 +50725,46 @@ private HttpRequest.Builder getNotificationsRequestBuilder(@javax.annotation.Non } /** - * Get OAuth2 Client by id (getOAuth2ClientById) - * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param id (required) - * @return OAuth2Client + * 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 OAuth2Client getOAuth2ClientById(@javax.annotation.Nonnull UUID id) throws ApiException { - return getOAuth2ClientById(id, null); + public List getOAuth2ClientRegistrationTemplates() throws ApiException { + return getOAuth2ClientRegistrationTemplates(null); } /** - * Get OAuth2 Client by id (getOAuth2ClientById) - * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param id (required) + * 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 OAuth2Client + * @return List<OAuth2ClientRegistrationTemplate> * @throws ApiException if fails to make API call */ - public OAuth2Client getOAuth2ClientById(@javax.annotation.Nonnull UUID id, Map headers) throws ApiException { - ApiResponse localVarResponse = getOAuth2ClientByIdWithHttpInfo(id, headers); + public List getOAuth2ClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse> localVarResponse = getOAuth2ClientRegistrationTemplatesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get OAuth2 Client by id (getOAuth2ClientById) - * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param id (required) - * @return ApiResponse<OAuth2Client> + * 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 getOAuth2ClientByIdWithHttpInfo(@javax.annotation.Nonnull UUID id) throws ApiException { - return getOAuth2ClientByIdWithHttpInfo(id, null); + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getOAuth2ClientRegistrationTemplatesWithHttpInfo(null); } /** - * Get OAuth2 Client by id (getOAuth2ClientById) - * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param id (required) + * 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<OAuth2Client> + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> * @throws ApiException if fails to make API call */ - public ApiResponse getOAuth2ClientByIdWithHttpInfo(@javax.annotation.Nonnull UUID id, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientByIdRequestBuilder(id, headers); + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientRegistrationTemplatesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -51462,11 +50775,11 @@ public ApiResponse getOAuth2ClientByIdWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getOAuth2ClientById", localVarResponse); + throw getApiException("getOAuth2ClientRegistrationTemplates", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -51476,10 +50789,10 @@ public ApiResponse getOAuth2ClientByIdWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - OAuth2Client 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 @@ -51498,16 +50811,11 @@ public ApiResponse getOAuth2ClientByIdWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder getOAuth2ClientByIdRequestBuilder(@javax.annotation.Nonnull UUID id, 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 getOAuth2ClientById"); - } + private HttpRequest.Builder getOAuth2ClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/oauth2/client/{id}" - .replace("{id}", ApiClient.urlEncode(id.toString())); + String localVarPath = "/api/oauth2/config/template"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -52056,7 +51364,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 +51376,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 +51394,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 +51412,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 +51430,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 +51442,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 +51478,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 +52525,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 +52535,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 +52547,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 +52557,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 +52988,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 +53042,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 +53078,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 +53749,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 +54409,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 +55464,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 +55518,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 +55554,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 +56234,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 +56288,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 +56324,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 +56952,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 +57006,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 +57042,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(); @@ -59260,169 +58568,6 @@ private HttpRequest.Builder getSignUpSelfRegistrationParamsRequestBuilder(@javax return localVarRequestBuilder; } - /** - * Get Device Software (getSoftware) - * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the software, corresponds to the value of 'sw_title' attribute. (required) - * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @return String - * @throws ApiException if fails to make API call - */ - public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { - return getSoftware(deviceToken, title, version, size, chunk, null); - } - - /** - * Get Device Software (getSoftware) - * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the software, corresponds to the value of 'sw_title' attribute. (required) - * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String getSoftware(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { - ApiResponse localVarResponse = getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, headers); - return localVarResponse.getData(); - } - - /** - * Get Device Software (getSoftware) - * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the software, corresponds to the value of 'sw_title' attribute. (required) - * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk) throws ApiException { - return getSoftwareWithHttpInfo(deviceToken, title, version, size, chunk, null); - } - - /** - * Get Device Software (getSoftware) - * Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. 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 title Title of the software, corresponds to the value of 'sw_title' attribute. (required) - * @param version Version of the software, corresponds to the value of 'sw_version' attribute. (required) - * @param size Size of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @param chunk Index of the chunk. Optional. Omit to download the entire file without using chunks. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse getSoftwareWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSoftwareRequestBuilder(deviceToken, title, version, size, chunk, 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("getSoftware", 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 getSoftwareRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String title, @javax.annotation.Nonnull String version, @javax.annotation.Nullable Integer size, @javax.annotation.Nullable Integer chunk, 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 getSoftware"); - } - // verify the required parameter 'title' is set - if (title == null) { - throw new ApiException(400, "Missing the required parameter 'title' when calling getSoftware"); - } - // verify the required parameter 'version' is set - if (version == null) { - throw new ApiException(400, "Missing the required parameter 'version' when calling getSoftware"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/software" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "title"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("title", title)); - localVarQueryParameterBaseName = "version"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("version", version)); - localVarQueryParameterBaseName = "size"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("size", size)); - localVarQueryParameterBaseName = "chunk"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("chunk", chunk)); - - 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 Solution template details (getSolutionTemplateDetails) * Get a solution template details based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). @@ -59878,50 +59023,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 +59077,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 +59113,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 +59324,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 +59335,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 +59348,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 +59359,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 +59872,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 +59900,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 +59934,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 +59982,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 +59994,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 +60003,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 +60038,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 +60066,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 +60100,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 +60112,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 +60148,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 +60174,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 +61648,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 +61664,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 +61682,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 +61698,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 +62832,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 +62847,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 +62864,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 +62879,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 +63261,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 +63315,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 +63351,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 +64008,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 +68151,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 +68205,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 +68241,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 +70249,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 +70304,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 +70329,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 +70377,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 +70435,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 +70471,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 +70504,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 +70562,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 +70598,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 +70631,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 +70639,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 +70653,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 +70667,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 +70681,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 +70693,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 +70729,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 +70767,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 +70837,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 +70873,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 +70921,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 +70987,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 +71023,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 +71066,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 +71120,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 +71156,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 +71184,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 +71242,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 +71278,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 +71311,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 +71369,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 +71405,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)); @@ -76010,387 +75046,6 @@ private HttpRequest.Builder performTrendzHealthcheckRequestBuilder(Map headers) throws ApiException { - ApiResponse localVarResponse = postDeviceAttributesWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Post attributes (postDeviceAttributes) - * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` 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 JSON with attribute key-value pairs. See API call description for example. (required) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { - return postDeviceAttributesWithHttpInfo(deviceToken, body, null); - } - - /** - * Post attributes (postDeviceAttributes) - * Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` 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 JSON with attribute key-value pairs. See API call description for example. (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse postDeviceAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = postDeviceAttributesRequestBuilder(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("postDeviceAttributes", 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 postDeviceAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull 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 postDeviceAttributes"); - } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling postDeviceAttributes"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/attributes" - .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; - } - - /** - * Send the RPC command (postRpcRequest) - * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` 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 The RPC request JSON (required) - * @return String - * @throws ApiException if fails to make API call - */ - public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { - return postRpcRequest(deviceToken, body, null); - } - - /** - * Send the RPC command (postRpcRequest) - * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` 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 The RPC request JSON (required) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String postRpcRequest(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = postRpcRequestWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Send the RPC command (postRpcRequest) - * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` 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 The RPC request JSON (required) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { - return postRpcRequestWithHttpInfo(deviceToken, body, null); - } - - /** - * Send the RPC command (postRpcRequest) - * Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` 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 The RPC request JSON (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse postRpcRequestWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = postRpcRequestRequestBuilder(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("postRpcRequest", 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 postRpcRequestRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull 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 postRpcRequest"); - } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling postRpcRequest"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/rpc" - .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; - } - - /** - * Post time series data (postTelemetry) - * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` 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 (required) - * @return String - * @throws ApiException if fails to make API call - */ - public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { - return postTelemetry(deviceToken, body, null); - } - - /** - * Post time series data (postTelemetry) - * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` 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 (required) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String postTelemetry(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = postTelemetryWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Post time series data (postTelemetry) - * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` 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 (required) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { - return postTelemetryWithHttpInfo(deviceToken, body, null); - } - - /** - * Post time series data (postTelemetry) - * Post time series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` 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 (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse postTelemetryWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = postTelemetryRequestBuilder(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("postTelemetry", 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 postTelemetryRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull 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 postTelemetry"); - } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling postTelemetry"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/telemetry" - .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; - } - /** * Preview Login White Labeling configuration (saveWhiteLabelParams) * Merge the White Labeling configuration with the parent configuration and return the result. Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. @@ -77101,124 +75756,6 @@ private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annota return localVarRequestBuilder; } - /** - * Provision new device (provisionDevice) - * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` - * @param body JSON with provision request. See API call description for example. (required) - * @return String - * @throws ApiException if fails to make API call - */ - public String provisionDevice(@javax.annotation.Nonnull String body) throws ApiException { - return provisionDevice(body, null); - } - - /** - * Provision new device (provisionDevice) - * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` - * @param body JSON with provision request. See API call description for example. (required) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String provisionDevice(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = provisionDeviceWithHttpInfo(body, headers); - return localVarResponse.getData(); - } - - /** - * Provision new device (provisionDevice) - * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` - * @param body JSON with provision request. See API call description for example. (required) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { - return provisionDeviceWithHttpInfo(body, null); - } - - /** - * Provision new device (provisionDevice) - * Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` - * @param body JSON with provision request. See API call description for example. (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse provisionDeviceWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = provisionDeviceRequestBuilder(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("provisionDevice", 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 provisionDeviceRequestBuilder(@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 provisionDevice"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/provision"; - - 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; - } - /** * Public connect to Trendz (publicConnectToTrendz) * Initiates synchronization with Trendz if Trendz is not synced yet. Uses Trendz configuration from settings or falls back to environment variables. Generates API key, saves configuration, checks Trendz version, and performs initial sync. @@ -77315,7 +75852,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 +75961,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 +75972,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 +75984,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 +75996,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) @@ -78002,142 +76539,6 @@ private HttpRequest.Builder removeMobileSessionRequestBuilder(@javax.annotation. return localVarRequestBuilder; } - /** - * Reply to RPC commands (replyToCommand) - * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. 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 requestId RPC request id from the incoming RPC request (required) - * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) - * @return String - * @throws ApiException if fails to make API call - */ - public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { - return replyToCommand(deviceToken, requestId, body, null); - } - - /** - * Reply to RPC commands (replyToCommand) - * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. 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 requestId RPC request id from the incoming RPC request (required) - * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String replyToCommand(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = replyToCommandWithHttpInfo(deviceToken, requestId, body, headers); - return localVarResponse.getData(); - } - - /** - * Reply to RPC commands (replyToCommand) - * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. 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 requestId RPC request id from the incoming RPC request (required) - * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body) throws ApiException { - return replyToCommandWithHttpInfo(deviceToken, requestId, body, null); - } - - /** - * Reply to RPC commands (replyToCommand) - * Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. 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 requestId RPC request id from the incoming RPC request (required) - * @param body Reply to the RPC request, JSON. For example: {\"status\":\"success\"} (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse replyToCommandWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = replyToCommandRequestBuilder(deviceToken, requestId, 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("replyToCommand", 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 replyToCommandRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String requestId, @javax.annotation.Nonnull 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 replyToCommand"); - } - // verify the required parameter 'requestId' is set - if (requestId == null) { - throw new ApiException(400, "Missing the required parameter 'requestId' when calling replyToCommand"); - } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling replyToCommand"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/rpc/{requestId}" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())) - .replace("{requestId}", ApiClient.urlEncode(requestId.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; - } - /** * Report action of User over the dashboard (reportUserDashboardAction) * Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -81753,148 +80154,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 +80166,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 +80183,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 +80200,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 +80217,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 +80229,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 +80265,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 +82122,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 +83823,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 +83834,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 +83847,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 +83858,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 +84095,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 +84107,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 +84131,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 +84149,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 +84182,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 +84837,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 +87895,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. @@ -90793,280 +89085,6 @@ private HttpRequest.Builder submitTwoFaAccountConfigRequestBuilder(@javax.annota return localVarRequestBuilder; } - /** - * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) - * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @return String - * @throws ApiException if fails to make API call - */ - public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { - return subscribeToAttributes(deviceToken, timeout, null); - } - - /** - * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) - * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String subscribeToAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { - ApiResponse localVarResponse = subscribeToAttributesWithHttpInfo(deviceToken, timeout, headers); - return localVarResponse.getData(); - } - - /** - * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) - * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { - return subscribeToAttributesWithHttpInfo(deviceToken, timeout, null); - } - - /** - * Subscribe to attribute updates (subscribeToAttributes) (Deprecated) - * Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse subscribeToAttributesWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = subscribeToAttributesRequestBuilder(deviceToken, timeout, 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("subscribeToAttributes", 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 subscribeToAttributesRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, 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 subscribeToAttributes"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/attributes/updates" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "timeout"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); - - 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; - } - - /** - * Subscribe to RPC commands (subscribeToCommands) (Deprecated) - * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @return String - * @throws ApiException if fails to make API call - */ - public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { - return subscribeToCommands(deviceToken, timeout, null); - } - - /** - * Subscribe to RPC commands (subscribeToCommands) (Deprecated) - * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String subscribeToCommands(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { - ApiResponse localVarResponse = subscribeToCommandsWithHttpInfo(deviceToken, timeout, headers); - return localVarResponse.getData(); - } - - /** - * Subscribe to RPC commands (subscribeToCommands) (Deprecated) - * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout) throws ApiException { - return subscribeToCommandsWithHttpInfo(deviceToken, timeout, null); - } - - /** - * Subscribe to RPC commands (subscribeToCommands) (Deprecated) - * Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. 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 timeout Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. (optional, default to 0) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse subscribeToCommandsWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = subscribeToCommandsRequestBuilder(deviceToken, timeout, 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("subscribeToCommands", 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 subscribeToCommandsRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable Long timeout, 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 subscribeToCommands"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/rpc" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "timeout"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("timeout", timeout)); - - 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; - } - /** * Sync edge (syncEdge) * Starts synchronization process between edge and cloud. All entities that are assigned to particular edge are going to be send to remote edge service. Available for users with 'TENANT_ADMIN' authority. @@ -91295,54 +89313,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 +89367,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 +89403,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 +89436,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 +89494,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 +89506,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 +89530,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 +89578,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 +89632,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 +89644,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 +89667,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 +89700,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 +89758,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 +89794,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 +92052,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 +92095,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 +92107,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 +92132,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 +92176,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 +92188,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 +92200,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 +92213,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 +92225,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 +92250,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/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index a514745c..0c925166 100644 --- a/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -35,15 +35,19 @@ * FeaturesInfo */ @JsonPropertyOrder({ + FeaturesInfo.JSON_PROPERTY_WHITE_LABELING_ENABLED, FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, - FeaturesInfo.JSON_PROPERTY_WHITE_LABELING_ENABLED, FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, FeaturesInfo.JSON_PROPERTY_TWO_FA_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_WHITE_LABELING_ENABLED = "whiteLabelingEnabled"; + @javax.annotation.Nullable + private Boolean whiteLabelingEnabled; + public static final String JSON_PROPERTY_SMS_ENABLED = "smsEnabled"; @javax.annotation.Nullable private Boolean smsEnabled; @@ -52,10 +56,6 @@ public class FeaturesInfo { @javax.annotation.Nullable private Boolean oauthEnabled; - public static final String JSON_PROPERTY_WHITE_LABELING_ENABLED = "whiteLabelingEnabled"; - @javax.annotation.Nullable - private Boolean whiteLabelingEnabled; - public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; @javax.annotation.Nullable private Boolean notificationEnabled; @@ -71,6 +71,30 @@ public class FeaturesInfo { public FeaturesInfo() { } + public FeaturesInfo whiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { + this.whiteLabelingEnabled = whiteLabelingEnabled; + return this; + } + + /** + * Get whiteLabelingEnabled + * @return whiteLabelingEnabled + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWhiteLabelingEnabled() { + return whiteLabelingEnabled; + } + + + @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWhiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { + this.whiteLabelingEnabled = whiteLabelingEnabled; + } + + public FeaturesInfo smsEnabled(@javax.annotation.Nullable Boolean smsEnabled) { this.smsEnabled = smsEnabled; return this; @@ -119,30 +143,6 @@ public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { } - public FeaturesInfo whiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { - this.whiteLabelingEnabled = whiteLabelingEnabled; - return this; - } - - /** - * Get whiteLabelingEnabled - * @return whiteLabelingEnabled - */ - @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getWhiteLabelingEnabled() { - return whiteLabelingEnabled; - } - - - @JsonProperty(value = JSON_PROPERTY_WHITE_LABELING_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingEnabled(@javax.annotation.Nullable Boolean whiteLabelingEnabled) { - this.whiteLabelingEnabled = whiteLabelingEnabled; - } - - public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { this.notificationEnabled = notificationEnabled; return this; @@ -227,9 +227,9 @@ public boolean equals(Object o) { return false; } FeaturesInfo featuresInfo = (FeaturesInfo) o; - return Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && + return Objects.equals(this.whiteLabelingEnabled, featuresInfo.whiteLabelingEnabled) && + Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && - Objects.equals(this.whiteLabelingEnabled, featuresInfo.whiteLabelingEnabled) && Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && Objects.equals(this.emailEnabled, featuresInfo.emailEnabled); @@ -237,16 +237,16 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(smsEnabled, oauthEnabled, whiteLabelingEnabled, notificationEnabled, twoFaEnabled, emailEnabled); + return Objects.hash(whiteLabelingEnabled, smsEnabled, oauthEnabled, notificationEnabled, twoFaEnabled, emailEnabled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FeaturesInfo {\n"); + sb.append(" whiteLabelingEnabled: ").append(toIndentedString(whiteLabelingEnabled)).append("\n"); sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); - sb.append(" whiteLabelingEnabled: ").append(toIndentedString(whiteLabelingEnabled)).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"); @@ -297,6 +297,11 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // add `whiteLabelingEnabled` to the URL query string + if (getWhiteLabelingEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%swhiteLabelingEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWhiteLabelingEnabled())))); + } + // 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())))); @@ -307,11 +312,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); } - // add `whiteLabelingEnabled` to the URL query string - if (getWhiteLabelingEnabled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%swhiteLabelingEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWhiteLabelingEnabled())))); - } - // 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())))); diff --git a/pe/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 pe/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/pe/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/ReportBarChartWithLabelsSettings.java b/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java index 1b6bebc1..8c6f6170 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportBarChartWithLabelsSettings.java @@ -507,14 +507,14 @@ public ReportBarChartWithLabelsSettings legendValueColor(@javax.annotation.Nulla } @Override - public ReportBarChartWithLabelsSettings yaxes(@javax.annotation.Nullable Map yaxes) { - this.setYaxes(yaxes); + public ReportBarChartWithLabelsSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.setXaxis(xaxis); return this; } @Override - public ReportBarChartWithLabelsSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.setXaxis(xaxis); + public ReportBarChartWithLabelsSettings yaxes(@javax.annotation.Nullable Map yaxes) { + this.setYaxes(yaxes); return this; } @@ -748,6 +748,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -758,11 +763,6 @@ public String toUrlQueryString(String prefix) { } } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { diff --git a/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java b/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java index 62693622..f0a3cb85 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportRangeChartSettings.java @@ -429,14 +429,14 @@ public ReportRangeChartSettings legendValueColor(@javax.annotation.Nullable Stri } @Override - public ReportRangeChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { - this.setYaxes(yaxes); + public ReportRangeChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.setXaxis(xaxis); return this; } @Override - public ReportRangeChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { - this.setXaxis(xaxis); + public ReportRangeChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { + this.setYaxes(yaxes); return this; } @@ -664,6 +664,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -674,11 +679,6 @@ public String toUrlQueryString(String prefix) { } } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { 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/ReportTimeSeriesChartSettings.java b/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java index d6966038..f145248a 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java +++ b/pe/src/main/java/org/thingsboard/client/model/ReportTimeSeriesChartSettings.java @@ -70,8 +70,8 @@ ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_LABEL_COLOR, ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_VALUE_FONT, ReportTimeSeriesChartSettings.JSON_PROPERTY_LEGEND_VALUE_COLOR, - ReportTimeSeriesChartSettings.JSON_PROPERTY_YAXES, ReportTimeSeriesChartSettings.JSON_PROPERTY_XAXIS, + ReportTimeSeriesChartSettings.JSON_PROPERTY_YAXES, ReportTimeSeriesChartSettings.JSON_PROPERTY_THRESHOLDS, ReportTimeSeriesChartSettings.JSON_PROPERTY_GRID, ReportTimeSeriesChartSettings.JSON_PROPERTY_Y_AXES, @@ -158,14 +158,14 @@ public class ReportTimeSeriesChartSettings { @javax.annotation.Nullable private String legendValueColor; - public static final String JSON_PROPERTY_YAXES = "yaxes"; - @javax.annotation.Nullable - private Map yaxes = new HashMap<>(); - public static final String JSON_PROPERTY_XAXIS = "xaxis"; @javax.annotation.Nullable private TimeSeriesChartXAxisSettings xaxis; + public static final String JSON_PROPERTY_YAXES = "yaxes"; + @javax.annotation.Nullable + private Map yaxes = new HashMap<>(); + public static final String JSON_PROPERTY_THRESHOLDS = "thresholds"; @javax.annotation.Nullable private List thresholds = new ArrayList<>(); @@ -589,6 +589,30 @@ public void setLegendValueColor(@javax.annotation.Nullable String legendValueCol } + public ReportTimeSeriesChartSettings xaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.xaxis = xaxis; + return this; + } + + /** + * Get xaxis + * @return xaxis + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_XAXIS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TimeSeriesChartXAxisSettings getXaxis() { + return xaxis; + } + + + @JsonProperty(value = JSON_PROPERTY_XAXIS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setXaxis(@javax.annotation.Nullable TimeSeriesChartXAxisSettings xaxis) { + this.xaxis = xaxis; + } + + public ReportTimeSeriesChartSettings yaxes(@javax.annotation.Nullable Map yaxes) { this.yaxes = yaxes; return this; @@ -621,30 +645,6 @@ public void setYaxes(@javax.annotation.Nullable Map thresholds) { this.thresholds = thresholds; return this; @@ -913,8 +913,8 @@ public boolean equals(Object o) { Objects.equals(this.legendLabelColor, reportTimeSeriesChartSettings.legendLabelColor) && Objects.equals(this.legendValueFont, reportTimeSeriesChartSettings.legendValueFont) && Objects.equals(this.legendValueColor, reportTimeSeriesChartSettings.legendValueColor) && - Objects.equals(this.yaxes, reportTimeSeriesChartSettings.yaxes) && Objects.equals(this.xaxis, reportTimeSeriesChartSettings.xaxis) && + Objects.equals(this.yaxes, reportTimeSeriesChartSettings.yaxes) && Objects.equals(this.thresholds, reportTimeSeriesChartSettings.thresholds) && Objects.equals(this.grid, reportTimeSeriesChartSettings.grid) && Objects.equals(this.yAxes, reportTimeSeriesChartSettings.yAxes) && @@ -928,7 +928,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(showTitle, title, titleFont, titleColor, titleAlignment, stack, comparisonEnabled, timeForComparison, comparisonCustomIntervalValue, showLegend, legendColumnTitleFont, legendColumnTitleColor, legendLabelFont, legendLabelColor, legendValueFont, legendValueColor, yaxes, xaxis, thresholds, grid, yAxes, xAxis, barWidthSettings, noAggregationBarWidthSettings, states, comparisonXAxis, legendConfig); + return Objects.hash(showTitle, title, titleFont, titleColor, titleAlignment, stack, comparisonEnabled, timeForComparison, comparisonCustomIntervalValue, showLegend, legendColumnTitleFont, legendColumnTitleColor, legendLabelFont, legendLabelColor, legendValueFont, legendValueColor, xaxis, yaxes, thresholds, grid, yAxes, xAxis, barWidthSettings, noAggregationBarWidthSettings, states, comparisonXAxis, legendConfig); } @Override @@ -951,8 +951,8 @@ public String toString() { sb.append(" legendLabelColor: ").append(toIndentedString(legendLabelColor)).append("\n"); sb.append(" legendValueFont: ").append(toIndentedString(legendValueFont)).append("\n"); sb.append(" legendValueColor: ").append(toIndentedString(legendValueColor)).append("\n"); - sb.append(" yaxes: ").append(toIndentedString(yaxes)).append("\n"); sb.append(" xaxis: ").append(toIndentedString(xaxis)).append("\n"); + sb.append(" yaxes: ").append(toIndentedString(yaxes)).append("\n"); sb.append(" thresholds: ").append(toIndentedString(thresholds)).append("\n"); sb.append(" grid: ").append(toIndentedString(grid)).append("\n"); sb.append(" yAxes: ").append(toIndentedString(yAxes)).append("\n"); @@ -1089,6 +1089,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slegendValueColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLegendValueColor())))); } + // add `xaxis` to the URL query string + if (getXaxis() != null) { + joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); + } + // add `yaxes` to the URL query string if (getYaxes() != null) { for (String _key : getYaxes().keySet()) { @@ -1099,11 +1104,6 @@ public String toUrlQueryString(String prefix) { } } - // add `xaxis` to the URL query string - if (getXaxis() != null) { - joiner.add(getXaxis().toUrlQueryString(prefix + "xaxis" + suffix)); - } - // add `thresholds` to the URL query string if (getThresholds() != null) { for (int i = 0; i < getThresholds().size(); i++) { 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/TbResource.java b/pe/src/main/java/org/thingsboard/client/model/TbResource.java index d7a71331..9ee6146d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResource.java @@ -56,8 +56,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_PUBLIC_LINK, - TbResource.JSON_PROPERTY_LINK + TbResource.JSON_PROPERTY_LINK, + TbResource.JSON_PROPERTY_PUBLIC_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResource { @@ -125,14 +125,14 @@ public class TbResource { @javax.annotation.Nullable private Boolean _public; - 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 static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; + @javax.annotation.Nullable + private String publicLink; + public TbResource() { } @@ -143,8 +143,8 @@ public TbResource( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, - @JsonProperty(JSON_PROPERTY_LINK) String link + @JsonProperty(JSON_PROPERTY_LINK) String link, + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink ) { this(); this.createdTime = createdTime; @@ -152,8 +152,8 @@ public TbResource( this.customerId = customerId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -491,28 +491,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * 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; } /** - * 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; } @@ -546,13 +546,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.publicLink, tbResource.publicLink) && - Objects.equals(this.link, tbResource.link); + Objects.equals(this.link, tbResource.link) && + Objects.equals(this.publicLink, tbResource.publicLink); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); } @Override @@ -575,8 +575,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(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append("}"); return sb.toString(); } @@ -704,16 +704,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 `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())))); } + // 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())))); + } + return joiner.toString(); } } 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/TbResourceInfo.java b/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index 52a73373..23929092 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -54,8 +54,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK, - TbResourceInfo.JSON_PROPERTY_LINK + TbResourceInfo.JSON_PROPERTY_LINK, + TbResourceInfo.JSON_PROPERTY_PUBLIC_LINK }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class TbResourceInfo { @@ -115,14 +115,14 @@ public class TbResourceInfo { @javax.annotation.Nullable private Boolean _public; - 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 static final String JSON_PROPERTY_PUBLIC_LINK = "publicLink"; + @javax.annotation.Nullable + private String publicLink; + public TbResourceInfo() { } @@ -133,8 +133,8 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink, - @JsonProperty(JSON_PROPERTY_LINK) String link + @JsonProperty(JSON_PROPERTY_LINK) String link, + @JsonProperty(JSON_PROPERTY_PUBLIC_LINK) String publicLink ) { this(); this.createdTime = createdTime; @@ -142,8 +142,8 @@ public TbResourceInfo( this.customerId = customerId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -433,28 +433,28 @@ public void setPublic(@javax.annotation.Nullable Boolean _public) { /** - * 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; } /** - * 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; } @@ -486,13 +486,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.publicLink, tbResourceInfo.publicLink) && - Objects.equals(this.link, tbResourceInfo.link); + Objects.equals(this.link, tbResourceInfo.link) && + Objects.equals(this.publicLink, tbResourceInfo.publicLink); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, customerId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); } @Override @@ -513,8 +513,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(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" publicLink: ").append(toIndentedString(publicLink)).append("\n"); sb.append("}"); return sb.toString(); } @@ -632,16 +632,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 `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())))); } + // 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())))); + } + return joiner.toString(); } } 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..21ce1513 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java +++ b/pe/src/main/java/org/thingsboard/client/model/TsKvEntry.java @@ -43,13 +43,13 @@ TsKvEntry.JSON_PROPERTY_TS, TsKvEntry.JSON_PROPERTY_VALUE, TsKvEntry.JSON_PROPERTY_KEY, - TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, - TsKvEntry.JSON_PROPERTY_LONG_VALUE, TsKvEntry.JSON_PROPERTY_BOOLEAN_VALUE, + TsKvEntry.JSON_PROPERTY_VALUE_AS_STRING, + TsKvEntry.JSON_PROPERTY_LONG_VALUE, + TsKvEntry.JSON_PROPERTY_DOUBLE_VALUE, 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") @@ -65,17 +65,21 @@ public class TsKvEntry { @javax.annotation.Nullable private String key; - public static final String JSON_PROPERTY_DOUBLE_VALUE = "doubleValue"; + public static final String JSON_PROPERTY_BOOLEAN_VALUE = "booleanValue"; @javax.annotation.Nullable - private Double doubleValue; + 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_LONG_VALUE = "longValue"; @javax.annotation.Nullable private Long longValue; - public static final String JSON_PROPERTY_BOOLEAN_VALUE = "booleanValue"; + public static final String JSON_PROPERTY_DOUBLE_VALUE = "doubleValue"; @javax.annotation.Nullable - private Boolean booleanValue; + private Double doubleValue; public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; @javax.annotation.Nullable @@ -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; @@ -180,27 +180,51 @@ public void setKey(@javax.annotation.Nullable String key) { } - public TsKvEntry doubleValue(@javax.annotation.Nullable Double doubleValue) { - this.doubleValue = doubleValue; + public TsKvEntry booleanValue(@javax.annotation.Nullable Boolean booleanValue) { + this.booleanValue = booleanValue; return this; } /** - * Get doubleValue - * @return doubleValue + * Get booleanValue + * @return booleanValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getDoubleValue() { - return doubleValue; + public Boolean getBooleanValue() { + return booleanValue; } - @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDoubleValue(@javax.annotation.Nullable Double doubleValue) { - this.doubleValue = doubleValue; + public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { + this.booleanValue = 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; } @@ -228,27 +252,27 @@ public void setLongValue(@javax.annotation.Nullable Long longValue) { } - public TsKvEntry booleanValue(@javax.annotation.Nullable Boolean booleanValue) { - this.booleanValue = booleanValue; + public TsKvEntry doubleValue(@javax.annotation.Nullable Double doubleValue) { + this.doubleValue = doubleValue; return this; } /** - * Get booleanValue - * @return booleanValue + * Get doubleValue + * @return doubleValue */ @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getBooleanValue() { - return booleanValue; + public Double getDoubleValue() { + return doubleValue; } - @JsonProperty(value = JSON_PROPERTY_BOOLEAN_VALUE, required = false) + @JsonProperty(value = JSON_PROPERTY_DOUBLE_VALUE, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBooleanValue(@javax.annotation.Nullable Boolean booleanValue) { - this.booleanValue = booleanValue; + public void setDoubleValue(@javax.annotation.Nullable Double doubleValue) { + this.doubleValue = doubleValue; } @@ -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; @@ -387,13 +387,13 @@ public boolean equals(Object o) { return Objects.equals(this.ts, tsKvEntry.ts) && equalsNullable(this.value, tsKvEntry.value) && Objects.equals(this.key, tsKvEntry.key) && - 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.longValue, tsKvEntry.longValue) && + Objects.equals(this.doubleValue, tsKvEntry.doubleValue) && 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, booleanValue, valueAsString, longValue, doubleValue, dataType, jsonValue, strValue, version); } private static int hashCodeNullable(JsonNullable a) { @@ -420,13 +420,13 @@ public String toString() { sb.append(" ts: ").append(toIndentedString(ts)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); - 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(" longValue: ").append(toIndentedString(longValue)).append("\n"); + sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).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(); @@ -490,9 +490,14 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%skey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKey())))); } - // add `doubleValue` to the URL query string - if (getDoubleValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdoubleValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDoubleValue())))); + // add `booleanValue` to the URL query string + if (getBooleanValue() != null) { + 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 `longValue` to the URL query string @@ -500,9 +505,9 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slongValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLongValue())))); } - // add `booleanValue` to the URL query string - if (getBooleanValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sbooleanValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBooleanValue())))); + // add `doubleValue` to the URL query string + if (getDoubleValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdoubleValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDoubleValue())))); } // add `dataType` to the URL query string @@ -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())))); From 69417baa23e1461dfb03df9f980936ba64d59665 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 3 Mar 2026 16:57:35 +0200 Subject: [PATCH 2/2] Regenerate client --- .../client/api/ThingsboardApi.java | 123 ------------------ 1 file changed, 123 deletions(-) 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 cdc39518..2d7bd185 100644 --- a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -78915,129 +78915,6 @@ 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