From e761cd746e73efca9d53726babe626ae3e134fe6 Mon Sep 17 00:00:00 2001 From: TeamCity Date: Tue, 3 Mar 2026 13:25:16 +0000 Subject: [PATCH 1/2] Update CE OpenAPI spec --- ce/docs/AdminControllerApi.md | 68 +- ce/docs/AiModelExportData.md | 23 + ....md => AlarmAssignmentRecipientsConfig.md} | 7 +- ce/docs/AlarmCommentRecipientsConfig.md | 24 + ce/docs/AlarmControllerApi.md | 8 +- ce/docs/ApiUsageLimitRecipientsConfig.md | 24 + ce/docs/AssetControllerApi.md | 8 +- ce/docs/AssetExportData.md | 23 + ce/docs/AssetProfileControllerApi.md | 8 +- ce/docs/AssetProfileExportData.md | 23 + ce/docs/BulkImportResultAsset.md | 6 +- ce/docs/BulkImportResultDevice.md | 6 +- ce/docs/BulkImportResultEdge.md | 6 +- ce/docs/CalculatedFieldControllerApi.md | 14 +- ce/docs/CustomerControllerApi.md | 8 +- ce/docs/CustomerExportData.md | 23 + ce/docs/DashboardControllerApi.md | 30 +- ce/docs/DashboardExportData.md | 23 + ce/docs/DeviceActivityRecipientsConfig.md | 24 + ce/docs/DeviceApiControllerApi.md | 255 - ce/docs/DeviceControllerApi.md | 20 +- ce/docs/DeviceProfileControllerApi.md | 42 +- ce/docs/DeviceProfileExportData.md | 23 + ce/docs/DomainControllerApi.md | 8 +- ...dgeCommunicationFailureRecipientsConfig.md | 24 + ce/docs/EdgeConnectionRecipientsConfig.md | 24 + ce/docs/EdgeControllerApi.md | 8 +- ce/docs/EntitiesLimitRecipientsConfig.md | 24 + ce/docs/EntityActionRecipientsConfig.md | 24 + ce/docs/EntityRelationControllerApi.md | 179 +- ce/docs/EntityViewControllerApi.md | 16 +- ce/docs/EntityViewExportData.md | 23 + ce/docs/EventControllerApi.md | 46 +- ce/docs/FeaturesInfo.md | 2 +- ce/docs/Lwm2mControllerApi.md | 8 +- ce/docs/MailConfigTemplateControllerApi.md | 8 +- ce/docs/MobileAppBundleControllerApi.md | 8 +- ce/docs/MobileAppControllerApi.md | 8 +- ce/docs/NewPlatformVersionRecipientsConfig.md | 24 + ce/docs/NotificationRequestStats.md | 4 +- ce/docs/NotificationRuleExportData.md | 23 + ce/docs/NotificationTargetControllerApi.md | 16 +- ce/docs/NotificationTargetExportData.md | 26 + ce/docs/NotificationTemplateExportData.md | 23 + ce/docs/OAuth2ConfigTemplateControllerApi.md | 8 +- ce/docs/OAuth2ControllerApi.md | 8 +- ce/docs/OtaPackageControllerApi.md | 8 +- ce/docs/QrCodeSettingsControllerApi.md | 4 +- ce/docs/QueueStatsControllerApi.md | 8 +- ce/docs/RateLimitsRecipientsConfig.md | 24 + ce/docs/ResourceShortageRecipientsConfig.md | 24 + ce/docs/RpcV1ControllerApi.md | 16 +- ce/docs/RpcV2ControllerApi.md | 16 +- ce/docs/RuleChainControllerApi.md | 52 +- ...ComponentLifecycleEventRecipientsConfig.md | 24 + ce/docs/RuleEngineControllerApi.md | 38 +- .../TaskProcessingFailureRecipientsConfig.md | 24 + ce/docs/TbResourceControllerApi.md | 16 +- ce/docs/TbResourceExportData.md | 23 + ce/docs/TenantControllerApi.md | 8 +- ce/docs/TwoFactorAuthConfigControllerApi.md | 8 +- ce/docs/TwoFactorAuthControllerApi.md | 8 +- ce/docs/UserControllerApi.md | 56 +- ce/docs/WidgetTypeControllerApi.md | 42 +- ce/docs/WidgetsBundleControllerApi.md | 28 +- ce/spec/openapi.json | 11639 +++++++--------- .../client/api/ThingsboardApi.java | 7746 ++++------ .../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/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 | 22 + .../client/model/EntityViewExportData.java | 213 + ...latedNotificationRuleRecipientsConfig.java | 6 + .../client/model/FeaturesInfo.java | 78 +- ...mVersionNotificationRuleTriggerConfig.java | 6 + .../NewPlatformVersionRecipientsConfig.java | 201 + .../model/NotificationRequestStats.java | 62 +- .../model/NotificationRuleExportData.java | 213 + .../NotificationRuleRecipientsConfig.java | 52 +- .../model/NotificationTargetExportData.java | 344 + .../model/NotificationTemplateExportData.java | 213 + ...teLimitsNotificationRuleTriggerConfig.java | 6 + .../model/RateLimitsRecipientsConfig.java | 201 + .../ResourceShortageRecipientsConfig.java | 201 + ...ShortageNotificationRuleTriggerConfig.java | 6 + ...cleEventNotificationRuleTriggerConfig.java | 6 + ...mponentLifecycleEventRecipientsConfig.java | 201 + ...gFailureNotificationRuleTriggerConfig.java | 6 + ...TaskProcessingFailureRecipientsConfig.java | 201 + .../client/model/TbResourceExportData.java | 213 + 109 files changed, 13898 insertions(+), 12693 deletions(-) create mode 100644 ce/docs/AiModelExportData.md rename ce/docs/{DefaultNotificationRuleRecipientsConfig.md => AlarmAssignmentRecipientsConfig.md} (70%) create mode 100644 ce/docs/AlarmCommentRecipientsConfig.md create mode 100644 ce/docs/ApiUsageLimitRecipientsConfig.md create mode 100644 ce/docs/AssetExportData.md create mode 100644 ce/docs/AssetProfileExportData.md create mode 100644 ce/docs/CustomerExportData.md create mode 100644 ce/docs/DashboardExportData.md create mode 100644 ce/docs/DeviceActivityRecipientsConfig.md delete mode 100644 ce/docs/DeviceApiControllerApi.md create mode 100644 ce/docs/DeviceProfileExportData.md create mode 100644 ce/docs/EdgeCommunicationFailureRecipientsConfig.md create mode 100644 ce/docs/EdgeConnectionRecipientsConfig.md create mode 100644 ce/docs/EntitiesLimitRecipientsConfig.md create mode 100644 ce/docs/EntityActionRecipientsConfig.md create mode 100644 ce/docs/EntityViewExportData.md create mode 100644 ce/docs/NewPlatformVersionRecipientsConfig.md create mode 100644 ce/docs/NotificationRuleExportData.md create mode 100644 ce/docs/NotificationTargetExportData.md create mode 100644 ce/docs/NotificationTemplateExportData.md create mode 100644 ce/docs/RateLimitsRecipientsConfig.md create mode 100644 ce/docs/ResourceShortageRecipientsConfig.md create mode 100644 ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md create mode 100644 ce/docs/TaskProcessingFailureRecipientsConfig.md create mode 100644 ce/docs/TbResourceExportData.md create mode 100644 ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/AssetExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java rename ce/src/main/java/org/thingsboard/client/model/{DefaultNotificationRuleRecipientsConfig.java => EdgeCommunicationFailureRecipientsConfig.java} (70%) create mode 100644 ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java create mode 100644 ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java diff --git a/ce/docs/AdminControllerApi.md b/ce/docs/AdminControllerApi.md index e8a95a8d..8ceacde1 100644 --- a/ce/docs/AdminControllerApi.md +++ b/ce/docs/AdminControllerApi.md @@ -5,19 +5,19 @@ | [**autoCommitSettingsExists**](#autoCommitSettingsExists) | **GET** /api/admin/autoCommitSettings/exists | Check auto commit settings exists (autoCommitSettingsExists) | | [**checkRepositoryAccess**](#checkRepositoryAccess) | **POST** /api/admin/repositorySettings/checkAccess | Check repository access (checkRepositoryAccess) | | [**checkUpdates**](#checkUpdates) | **GET** /api/admin/updates | Check for new Platform Releases (checkUpdates) | -| [**codeProcessingUrl**](#codeProcessingUrl) | **GET** /api/admin/mail/oauth2/code | codeProcessingUrl | | [**deleteAutoCommitSettings**](#deleteAutoCommitSettings) | **DELETE** /api/admin/autoCommitSettings | Delete auto commit settings (deleteAutoCommitSettings) | | [**deleteRepositorySettings**](#deleteRepositorySettings) | **DELETE** /api/admin/repositorySettings | Delete repository settings (deleteRepositorySettings) | | [**getAdminSettings**](#getAdminSettings) | **GET** /api/admin/settings/{key} | Get the Administration Settings object using key (getAdminSettings) | -| [**getAuthorizationUrl**](#getAuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getAutoCommitSettings**](#getAutoCommitSettings) | **GET** /api/admin/autoCommitSettings | Get auto commit settings (getAutoCommitSettings) | | [**getFeaturesInfo**](#getFeaturesInfo) | **GET** /api/admin/featuresInfo | Get features info (getFeaturesInfo) | | [**getJwtSettings**](#getJwtSettings) | **GET** /api/admin/jwtSettings | Get the JWT Settings object (getJwtSettings) | +| [**getMailOAuth2AuthorizationUrl**](#getMailOAuth2AuthorizationUrl) | **GET** /api/admin/mail/oauth2/authorize | Redirect user to mail provider login page. | | [**getMailProcessingUrl**](#getMailProcessingUrl) | **GET** /api/admin/mail/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getMailProcessingUrl) | | [**getRepositorySettings**](#getRepositorySettings) | **GET** /api/admin/repositorySettings | Get repository settings (getRepositorySettings) | | [**getRepositorySettingsInfo**](#getRepositorySettingsInfo) | **GET** /api/admin/repositorySettings/info | getRepositorySettingsInfo | | [**getSecuritySettings**](#getSecuritySettings) | **GET** /api/admin/securitySettings | Get the Security Settings object (getSecuritySettings) | | [**getSystemInfo**](#getSystemInfo) | **GET** /api/admin/systemInfo | Get system info (getSystemInfo) | +| [**handleMailOAuth2Callback**](#handleMailOAuth2Callback) | **GET** /api/admin/mail/oauth2/code | handleMailOAuth2Callback | | [**repositorySettingsExists**](#repositorySettingsExists) | **GET** /api/admin/repositorySettings/exists | Check repository settings exists (repositorySettingsExists) | | [**saveAdminSettings**](#saveAdminSettings) | **POST** /api/admin/settings | Creates or Updates the Administration Settings (saveAdminSettings) | | [**saveAutoCommitSettings**](#saveAutoCommitSettings) | **POST** /api/admin/autoCommitSettings | Creates or Updates the auto commit settings (saveAutoCommitSettings) | @@ -75,25 +75,6 @@ Check notifications about new platform releases. Available for users with 'SYS **UpdateMessage** -## codeProcessingUrl - -> codeProcessingUrl(code, state) - -codeProcessingUrl - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String** | | | -| **state** | **String** | | | - -### Return type - -null (empty response body) - - ## deleteAutoCommitSettings > deleteAutoCommitSettings() @@ -140,19 +121,6 @@ Get the Administration Settings object using specified string key. Referencing n **AdminSettings** -## getAuthorizationUrl - -> String getAuthorizationUrl() - -Redirect user to mail provider login page. - -After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - -### Return type - -**String** - - ## getAutoCommitSettings > Map getAutoCommitSettings() @@ -192,6 +160,19 @@ Get the JWT Settings object that contains JWT token policy, etc. Available for **JwtSettings** +## getMailOAuth2AuthorizationUrl + +> String getMailOAuth2AuthorizationUrl() + +Redirect user to mail provider login page. + +After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + +### Return type + +**String** + + ## getMailProcessingUrl > String getMailProcessingUrl() @@ -255,6 +236,25 @@ Get main information about system. Available for users with 'SYS_ADMIN' author **SystemInfo** +## handleMailOAuth2Callback + +> handleMailOAuth2Callback(code, state) + +handleMailOAuth2Callback + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **code** | **String** | | | +| **state** | **String** | | | + +### Return type + +null (empty response body) + + ## repositorySettingsExists > Boolean repositorySettingsExists() diff --git a/ce/docs/AiModelExportData.md b/ce/docs/AiModelExportData.md new file mode 100644 index 00000000..4b2f43c7 --- /dev/null +++ b/ce/docs/AiModelExportData.md @@ -0,0 +1,23 @@ + +# AiModelExportData + +`org.thingsboard.client.model.AiModelExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DefaultNotificationRuleRecipientsConfig.md b/ce/docs/AlarmAssignmentRecipientsConfig.md similarity index 70% rename from ce/docs/DefaultNotificationRuleRecipientsConfig.md rename to ce/docs/AlarmAssignmentRecipientsConfig.md index 358dfc01..c394d83e 100644 --- a/ce/docs/DefaultNotificationRuleRecipientsConfig.md +++ b/ce/docs/AlarmAssignmentRecipientsConfig.md @@ -1,9 +1,7 @@ -# DefaultNotificationRuleRecipientsConfig +# AlarmAssignmentRecipientsConfig -`org.thingsboard.client.model.DefaultNotificationRuleRecipientsConfig` - -Default notification rule recipients configuration +`org.thingsboard.client.model.AlarmAssignmentRecipientsConfig` **Extends:** **NotificationRuleRecipientsConfig** @@ -11,7 +9,6 @@ Default notification rule recipients configuration | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **triggerType** | **NotificationRuleTriggerType** | | | | **targets** | **List\** | | | diff --git a/ce/docs/AlarmCommentRecipientsConfig.md b/ce/docs/AlarmCommentRecipientsConfig.md new file mode 100644 index 00000000..863bb32d --- /dev/null +++ b/ce/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/ce/docs/AlarmControllerApi.md b/ce/docs/AlarmControllerApi.md index 52a2da83..7c575305 100644 --- a/ce/docs/AlarmControllerApi.md +++ b/ce/docs/AlarmControllerApi.md @@ -9,7 +9,7 @@ | [**getAlarmById**](#getAlarmById) | **GET** /api/alarm/{alarmId} | Get Alarm (getAlarmById) | | [**getAlarmInfoById**](#getAlarmInfoById) | **GET** /api/alarm/info/{alarmId} | Get Alarm Info (getAlarmInfoById) | | [**getAlarmTypes**](#getAlarmTypes) | **GET** /api/alarm/types | Get Alarm Types (getAlarmTypes) | -| [**getAlarms**](#getAlarms) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarms) | +| [**getAlarmsByEntity**](#getAlarmsByEntity) | **GET** /api/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsByEntity) | | [**getAlarmsV2**](#getAlarmsV2) | **GET** /api/v2/alarm/{entityType}/{entityId} | Get Alarms (getAlarmsV2) | | [**getAllAlarms**](#getAllAlarms) | **GET** /api/alarms | Get All Alarms (getAllAlarms) | | [**getAllAlarmsV2**](#getAllAlarmsV2) | **GET** /api/v2/alarms | Get All Alarms (getAllAlarmsV2) | @@ -163,11 +163,11 @@ Returns a set of unique alarm types based on alarms that are either owned by the **PageDataEntitySubtype** -## getAlarms +## getAlarmsByEntity -> PageDataAlarmInfo getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) +> PageDataAlarmInfo getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator) -Get Alarms (getAlarms) +Get Alarms (getAlarmsByEntity) Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/ApiUsageLimitRecipientsConfig.md b/ce/docs/ApiUsageLimitRecipientsConfig.md new file mode 100644 index 00000000..6a24d1e0 --- /dev/null +++ b/ce/docs/ApiUsageLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ApiUsageLimitRecipientsConfig + +`org.thingsboard.client.model.ApiUsageLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/AssetControllerApi.md b/ce/docs/AssetControllerApi.md index 02b84ad7..6fd247fc 100644 --- a/ce/docs/AssetControllerApi.md +++ b/ce/docs/AssetControllerApi.md @@ -6,7 +6,7 @@ | [**assignAssetToEdge**](#assignAssetToEdge) | **POST** /api/edge/{edgeId}/asset/{assetId} | Assign asset to edge (assignAssetToEdge) | | [**assignAssetToPublicCustomer**](#assignAssetToPublicCustomer) | **POST** /api/customer/public/asset/{assetId} | Make asset publicly available (assignAssetToPublicCustomer) | | [**deleteAsset**](#deleteAsset) | **DELETE** /api/asset/{assetId} | Delete asset (deleteAsset) | -| [**findByQuery4**](#findByQuery4) | **POST** /api/assets | Find related assets (findByQuery) | +| [**findAssetsByQuery**](#findAssetsByQuery) | **POST** /api/assets | Find related assets (findAssetsByQuery) | | [**getAssetById**](#getAssetById) | **GET** /api/asset/{assetId} | Get Asset (getAssetById) | | [**getAssetInfoById**](#getAssetInfoById) | **GET** /api/asset/info/{assetId} | Get Asset Info (getAssetInfoById) | | [**getAssetTypes**](#getAssetTypes) | **GET** /api/asset/types | Get Asset Types (getAssetTypes) | @@ -106,11 +106,11 @@ Deletes the asset and all the relations (from and to the asset). Referencing non null (empty response body) -## findByQuery4 +## findAssetsByQuery -> List findByQuery4(assetSearchQuery) +> List findAssetsByQuery(assetSearchQuery) -Find related assets (findByQuery) +Find related assets (findAssetsByQuery) Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. diff --git a/ce/docs/AssetExportData.md b/ce/docs/AssetExportData.md new file mode 100644 index 00000000..3985a421 --- /dev/null +++ b/ce/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/ce/docs/AssetProfileControllerApi.md b/ce/docs/AssetProfileControllerApi.md index 4618ae1f..56247d66 100644 --- a/ce/docs/AssetProfileControllerApi.md +++ b/ce/docs/AssetProfileControllerApi.md @@ -8,7 +8,7 @@ | [**getAssetProfileInfos**](#getAssetProfileInfos) | **GET** /api/assetProfileInfos | Get Asset Profile infos (getAssetProfileInfos) | | [**getAssetProfileNames**](#getAssetProfileNames) | **GET** /api/assetProfile/names | Get Asset Profile names (getAssetProfileNames) | | [**getAssetProfiles**](#getAssetProfiles) | **GET** /api/assetProfiles | Get Asset Profiles (getAssetProfiles) | -| [**getAssetProfilesByIdsV2**](#getAssetProfilesByIdsV2) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIdsV2) | +| [**getAssetProfilesByIds**](#getAssetProfilesByIds) | **GET** /api/assetProfileInfos/list | Get Asset Profiles By Ids (getAssetProfilesByIds) | | [**getDefaultAssetProfileInfo**](#getDefaultAssetProfileInfo) | **GET** /api/assetProfileInfo/default | Get Default Asset Profile (getDefaultAssetProfileInfo) | | [**saveAssetProfile**](#saveAssetProfile) | **POST** /api/assetProfile | Create Or Update Asset Profile (saveAssetProfile) | | [**setDefaultAssetProfile**](#setDefaultAssetProfile) | **POST** /api/assetProfile/{assetProfileId}/default | Make Asset Profile Default (setDefaultAssetProfile) | @@ -144,11 +144,11 @@ Returns a page of asset profile objects owned by tenant. You can specify paramet **PageDataAssetProfile** -## getAssetProfilesByIdsV2 +## getAssetProfilesByIds -> List getAssetProfilesByIdsV2(assetProfileIds) +> List getAssetProfilesByIds(assetProfileIds) -Get Asset Profiles By Ids (getAssetProfilesByIdsV2) +Get Asset Profiles By Ids (getAssetProfilesByIds) Requested asset profiles must be owned by tenant which is performing the request. diff --git a/ce/docs/AssetProfileExportData.md b/ce/docs/AssetProfileExportData.md new file mode 100644 index 00000000..8507f2a9 --- /dev/null +++ b/ce/docs/AssetProfileExportData.md @@ -0,0 +1,23 @@ + +# AssetProfileExportData + +`org.thingsboard.client.model.AssetProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/BulkImportResultAsset.md b/ce/docs/BulkImportResultAsset.md index 49d23019..67309837 100644 --- a/ce/docs/BulkImportResultAsset.md +++ b/ce/docs/BulkImportResultAsset.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/ce/docs/BulkImportResultDevice.md b/ce/docs/BulkImportResultDevice.md index e1532d49..be195ee7 100644 --- a/ce/docs/BulkImportResultDevice.md +++ b/ce/docs/BulkImportResultDevice.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/ce/docs/BulkImportResultEdge.md b/ce/docs/BulkImportResultEdge.md index bdf755a6..91d73829 100644 --- a/ce/docs/BulkImportResultEdge.md +++ b/ce/docs/BulkImportResultEdge.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **created** | **Object** | | [optional] | -| **updated** | **Object** | | [optional] | -| **errors** | **Object** | | [optional] | +| **created** | **Integer** | | [optional] | +| **updated** | **Integer** | | [optional] | +| **errors** | **Integer** | | [optional] | | **errorsList** | **List\** | | [optional] | diff --git a/ce/docs/CalculatedFieldControllerApi.md b/ce/docs/CalculatedFieldControllerApi.md index c6882fb6..4cb39ea6 100644 --- a/ce/docs/CalculatedFieldControllerApi.md +++ b/ce/docs/CalculatedFieldControllerApi.md @@ -6,10 +6,10 @@ | [**getCalculatedFieldById**](#getCalculatedFieldById) | **GET** /api/calculatedField/{calculatedFieldId} | Get Calculated Field (getCalculatedFieldById) | | [**getCalculatedFieldNames**](#getCalculatedFieldNames) | **GET** /api/calculatedFields/names | Get calculated field names (getCalculatedFieldNames) | | [**getCalculatedFields**](#getCalculatedFields) | **GET** /api/calculatedFields | Get calculated fields (getCalculatedFields) | -| [**getCalculatedFieldsByEntityIdV2**](#getCalculatedFieldsByEntityIdV2) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) | +| [**getCalculatedFieldsByEntityId**](#getCalculatedFieldsByEntityId) | **GET** /api/calculatedField/{entityType}/{entityId} | Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) | | [**getLatestCalculatedFieldDebugEvent**](#getLatestCalculatedFieldDebugEvent) | **GET** /api/calculatedField/{calculatedFieldId}/debug | Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent) | | [**saveCalculatedField**](#saveCalculatedField) | **POST** /api/calculatedField | Create Or Update Calculated Field (saveCalculatedField) | -| [**testScript1**](#testScript1) | **POST** /api/calculatedField/testScript | Test Script expression | +| [**testCalculatedFieldScript**](#testCalculatedFieldScript) | **POST** /api/calculatedField/testScript | Test Script expression | @@ -105,11 +105,11 @@ Fetch tenant calculated fields based on the filter. **PageDataCalculatedFieldInfo** -## getCalculatedFieldsByEntityIdV2 +## getCalculatedFieldsByEntityId -> PageDataCalculatedField getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) +> PageDataCalculatedField getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder) -Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) +Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) Fetch the Calculated Fields based on the provided Entity Id. @@ -172,9 +172,9 @@ Creates or Updates the Calculated Field. When creating calculated field, platfor **CalculatedField** -## testScript1 +## testCalculatedFieldScript -> com.fasterxml.jackson.databind.JsonNode testScript1(body) +> com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(body) Test Script expression diff --git a/ce/docs/CustomerControllerApi.md b/ce/docs/CustomerControllerApi.md index 32fc76b5..4b9254bb 100644 --- a/ce/docs/CustomerControllerApi.md +++ b/ce/docs/CustomerControllerApi.md @@ -6,7 +6,7 @@ | [**getCustomerById**](#getCustomerById) | **GET** /api/customer/{customerId} | Get Customer (getCustomerById) | | [**getCustomerTitleById**](#getCustomerTitleById) | **GET** /api/customer/{customerId}/title | Get Customer Title (getCustomerTitleById) | | [**getCustomers**](#getCustomers) | **GET** /api/customers | Get Tenant Customers (getCustomers) | -| [**getCustomersByIdsV2**](#getCustomersByIdsV2) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIdsV2) | +| [**getCustomersByIds**](#getCustomersByIds) | **GET** /api/customers/list | Get customers by Customer Ids (getCustomersByIds) | | [**getShortCustomerInfoById**](#getShortCustomerInfoById) | **GET** /api/customer/{customerId}/shortInfo | Get short Customer info (getShortCustomerInfoById) | | [**getTenantCustomer**](#getTenantCustomer) | **GET** /api/tenant/customers | Get Tenant Customer by Customer title (getTenantCustomer) | | [**saveCustomer**](#saveCustomer) | **POST** /api/customer | Create or update Customer (saveCustomer) | @@ -97,11 +97,11 @@ Returns a page of customers owned by tenant. You can specify parameters to filte **PageDataCustomer** -## getCustomersByIdsV2 +## getCustomersByIds -> List getCustomersByIdsV2(customerIds) +> List getCustomersByIds(customerIds) -Get customers by Customer Ids (getCustomersByIdsV2) +Get customers by Customer Ids (getCustomersByIds) Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/CustomerExportData.md b/ce/docs/CustomerExportData.md new file mode 100644 index 00000000..c5c441b9 --- /dev/null +++ b/ce/docs/CustomerExportData.md @@ -0,0 +1,23 @@ + +# CustomerExportData + +`org.thingsboard.client.model.CustomerExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DashboardControllerApi.md b/ce/docs/DashboardControllerApi.md index cf42555d..7e7c3bb6 100644 --- a/ce/docs/DashboardControllerApi.md +++ b/ce/docs/DashboardControllerApi.md @@ -10,14 +10,14 @@ | [**getCustomerDashboards**](#getCustomerDashboards) | **GET** /api/customer/{customerId}/dashboards | Get Customer Dashboards (getCustomerDashboards) | | [**getDashboardById**](#getDashboardById) | **GET** /api/dashboard/{dashboardId} | Get Dashboard (getDashboardById) | | [**getDashboardInfoById**](#getDashboardInfoById) | **GET** /api/dashboard/info/{dashboardId} | Get Dashboard Info (getDashboardInfoById) | -| [**getDashboardsByIdsV2**](#getDashboardsByIdsV2) | **GET** /api/dashboards/list | Get dashboards by Dashboard Ids (getDashboardsByIdsV2) | +| [**getDashboardsByIds**](#getDashboardsByIds) | **GET** /api/dashboards/list | Get dashboards by Dashboard Ids (getDashboardsByIds) | | [**getEdgeDashboards**](#getEdgeDashboards) | **GET** /api/edge/{edgeId}/dashboards | Get Edge Dashboards (getEdgeDashboards) | | [**getHomeDashboard**](#getHomeDashboard) | **GET** /api/dashboard/home | Get Home Dashboard (getHomeDashboard) | | [**getHomeDashboardInfo**](#getHomeDashboardInfo) | **GET** /api/dashboard/home/info | Get Home Dashboard Info (getHomeDashboardInfo) | | [**getMaxDatapointsLimit**](#getMaxDatapointsLimit) | **GET** /api/dashboard/maxDatapointsLimit | Get max data points limit (getMaxDatapointsLimit) | | [**getServerTime**](#getServerTime) | **GET** /api/dashboard/serverTime | Get server time (getServerTime) | -| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboards) | -| [**getTenantDashboards1**](#getTenantDashboards1) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboards**](#getTenantDashboards) | **GET** /api/tenant/dashboards | Get Tenant Dashboards (getTenantDashboards) | +| [**getTenantDashboardsByTenantId**](#getTenantDashboardsByTenantId) | **GET** /api/tenant/{tenantId}/dashboards | Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) | | [**getTenantHomeDashboardInfo**](#getTenantHomeDashboardInfo) | **GET** /api/tenant/dashboard/home/info | Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo) | | [**removeDashboardCustomers**](#removeDashboardCustomers) | **POST** /api/dashboard/{dashboardId}/customers/remove | Remove the Dashboard Customers (removeDashboardCustomers) | | [**saveDashboard**](#saveDashboard) | **POST** /api/dashboard | Create Or Update Dashboard (saveDashboard) | @@ -200,11 +200,11 @@ Get the information about the dashboard based on 'dashboardId' parameter. The Da **DashboardInfo** -## getDashboardsByIdsV2 +## getDashboardsByIds -> List getDashboardsByIdsV2(dashboardIds) +> List getDashboardsByIds(dashboardIds) -Get dashboards by Dashboard Ids (getDashboardsByIdsV2) +Get dashboards by Dashboard Ids (getDashboardsByIds) Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -306,20 +306,20 @@ Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust vie ## getTenantDashboards -> PageDataDashboardInfo getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards by System Administrator (getTenantDashboards) +Get Tenant Dashboards (getTenantDashboards) -Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. +Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | +| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -329,22 +329,22 @@ Returns a page of dashboard info objects owned by tenant. The Dashboard Info obj **PageDataDashboardInfo** -## getTenantDashboards1 +## getTenantDashboardsByTenantId -> PageDataDashboardInfo getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder) +> PageDataDashboardInfo getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder) -Get Tenant Dashboards (getTenantDashboards) +Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) -Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **mobile** | **Boolean** | Exclude dashboards that are hidden for mobile | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/ce/docs/DashboardExportData.md b/ce/docs/DashboardExportData.md new file mode 100644 index 00000000..2356ec28 --- /dev/null +++ b/ce/docs/DashboardExportData.md @@ -0,0 +1,23 @@ + +# DashboardExportData + +`org.thingsboard.client.model.DashboardExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DeviceActivityRecipientsConfig.md b/ce/docs/DeviceActivityRecipientsConfig.md new file mode 100644 index 00000000..1b3164d4 --- /dev/null +++ b/ce/docs/DeviceActivityRecipientsConfig.md @@ -0,0 +1,24 @@ + +# DeviceActivityRecipientsConfig + +`org.thingsboard.client.model.DeviceActivityRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DeviceApiControllerApi.md b/ce/docs/DeviceApiControllerApi.md deleted file mode 100644 index 43fe8257..00000000 --- a/ce/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/ce/docs/DeviceControllerApi.md b/ce/docs/DeviceControllerApi.md index e94955d3..7dfe190c 100644 --- a/ce/docs/DeviceControllerApi.md +++ b/ce/docs/DeviceControllerApi.md @@ -6,10 +6,10 @@ | [**assignDeviceToEdge**](#assignDeviceToEdge) | **POST** /api/edge/{edgeId}/device/{deviceId} | Assign device to edge (assignDeviceToEdge) | | [**assignDeviceToPublicCustomer**](#assignDeviceToPublicCustomer) | **POST** /api/customer/public/device/{deviceId} | Make device publicly available (assignDeviceToPublicCustomer) | | [**assignDeviceToTenant**](#assignDeviceToTenant) | **POST** /api/tenant/{tenantId}/device/{deviceId} | Assign device to tenant (assignDeviceToTenant) | -| [**claimDevice1**](#claimDevice1) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | +| [**claimDevice**](#claimDevice) | **POST** /api/customer/device/{deviceName}/claim | Claim device (claimDevice) | | [**countByDeviceProfileAndEmptyOtaPackage**](#countByDeviceProfileAndEmptyOtaPackage) | **GET** /api/devices/count/{otaPackageType}/{deviceProfileId} | Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage) | | [**deleteDevice**](#deleteDevice) | **DELETE** /api/device/{deviceId} | Delete device (deleteDevice) | -| [**findByQuery3**](#findByQuery3) | **POST** /api/devices | Find related devices (findByQuery) | +| [**findDevicesByQuery**](#findDevicesByQuery) | **POST** /api/devices | Find related devices (findDevicesByQuery) | | [**getCustomerDeviceInfos**](#getCustomerDeviceInfos) | **GET** /api/customer/{customerId}/deviceInfos | Get Customer Device Infos (getCustomerDeviceInfos) | | [**getCustomerDevices**](#getCustomerDevices) | **GET** /api/customer/{customerId}/devices | Get Customer Devices (getCustomerDevices) | | [**getDeviceById**](#getDeviceById) | **GET** /api/device/{deviceId} | Get Device (getDeviceById) | @@ -24,7 +24,7 @@ | [**processDevicesBulkImport**](#processDevicesBulkImport) | **POST** /api/device/bulk_import | Import the bulk of devices (processDevicesBulkImport) | | [**reClaimDevice**](#reClaimDevice) | **DELETE** /api/customer/device/{deviceName}/claim | Reclaim device (reClaimDevice) | | [**saveDevice**](#saveDevice) | **POST** /api/device | Create Or Update Device (saveDevice) | -| [**saveDeviceWithCredentials1**](#saveDeviceWithCredentials1) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | +| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/device-with-credentials | Create Device (saveDevice) with credentials | | [**unassignDeviceFromCustomer**](#unassignDeviceFromCustomer) | **DELETE** /api/customer/device/{deviceId} | Unassign device from customer (unassignDeviceFromCustomer) | | [**unassignDeviceFromEdge**](#unassignDeviceFromEdge) | **DELETE** /api/edge/{edgeId}/device/{deviceId} | Unassign device from edge (unassignDeviceFromEdge) | | [**updateDeviceCredentials**](#updateDeviceCredentials) | **POST** /api/device/credentials | Update device credentials (updateDeviceCredentials) | @@ -114,9 +114,9 @@ Creates assignment of the device to tenant. Thereafter tenant will be able to re **Device** -## claimDevice1 +## claimDevice -> String claimDevice1(deviceName, claimRequest) +> String claimDevice(deviceName, claimRequest) Claim device (claimDevice) @@ -176,11 +176,11 @@ Deletes the device, it's credentials and all the relations (from and to the devi null (empty response body) -## findByQuery3 +## findDevicesByQuery -> List findByQuery3(deviceSearchQuery) +> List findDevicesByQuery(deviceSearchQuery) -Find related devices (findByQuery) +Find related devices (findDevicesByQuery) Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -509,9 +509,9 @@ Create or update the Device. When creating device, platform generates Device Id **Device** -## saveDeviceWithCredentials1 +## saveDeviceWithCredentials -> Device saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) +> Device saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy) Create Device (saveDevice) with credentials diff --git a/ce/docs/DeviceProfileControllerApi.md b/ce/docs/DeviceProfileControllerApi.md index 2ab61239..54f5a640 100644 --- a/ce/docs/DeviceProfileControllerApi.md +++ b/ce/docs/DeviceProfileControllerApi.md @@ -8,10 +8,10 @@ | [**getDeviceProfileById**](#getDeviceProfileById) | **GET** /api/deviceProfile/{deviceProfileId} | Get Device Profile (getDeviceProfileById) | | [**getDeviceProfileInfoById**](#getDeviceProfileInfoById) | **GET** /api/deviceProfileInfo/{deviceProfileId} | Get Device Profile Info (getDeviceProfileInfoById) | | [**getDeviceProfileInfos**](#getDeviceProfileInfos) | **GET** /api/deviceProfileInfos | Get Device Profiles for transport type (getDeviceProfileInfos) | -| [**getDeviceProfileInfosByIdsV2**](#getDeviceProfileInfosByIdsV2) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) | +| [**getDeviceProfileInfosByIds**](#getDeviceProfileInfosByIds) | **GET** /api/deviceProfileInfos/list | Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) | | [**getDeviceProfileNames**](#getDeviceProfileNames) | **GET** /api/deviceProfile/names | Get Device Profile names (getDeviceProfileNames) | +| [**getDeviceProfileTimeseriesKeys**](#getDeviceProfileTimeseriesKeys) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getDeviceProfileTimeseriesKeys) | | [**getDeviceProfiles**](#getDeviceProfiles) | **GET** /api/deviceProfiles | Get Device Profiles (getDeviceProfiles) | -| [**getTimeseriesKeys1**](#getTimeseriesKeys1) | **GET** /api/deviceProfile/devices/keys/timeseries | Get time series keys (getTimeseriesKeys) | | [**saveDeviceProfile**](#saveDeviceProfile) | **POST** /api/deviceProfile | Create Or Update Device Profile (saveDeviceProfile) | | [**setDefaultDeviceProfile**](#setDefaultDeviceProfile) | **POST** /api/deviceProfile/{deviceProfileId}/default | Make Device Profile Default (setDefaultDeviceProfile) | @@ -136,11 +136,11 @@ Returns a page of devices profile info objects owned by tenant. You can specify **PageDataDeviceProfileInfo** -## getDeviceProfileInfosByIdsV2 +## getDeviceProfileInfosByIds -> List getDeviceProfileInfosByIdsV2(deviceProfileIds) +> List getDeviceProfileInfosByIds(deviceProfileIds) -Get Device Profile Infos By Ids (getDeviceProfileInfosByIdsV2) +Get Device Profile Infos By Ids (getDeviceProfileInfosByIds) Requested device profiles must be owned by tenant which is performing the request. @@ -176,48 +176,48 @@ Returns a set of unique device profile names owned by the tenant. Available for **List** -## getDeviceProfiles +## getDeviceProfileTimeseriesKeys -> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) +> List getDeviceProfileTimeseriesKeys(deviceProfileId) -Get Device Profiles (getDeviceProfiles) +Get time series keys (getDeviceProfileTimeseriesKeys) -Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. +Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | +| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | ### Return type -**PageDataDeviceProfile** +**List** -## getTimeseriesKeys1 +## getDeviceProfiles -> List getTimeseriesKeys1(deviceProfileId) +> PageDataDeviceProfile getDeviceProfiles(pageSize, page, textSearch, sortProperty, sortOrder) -Get time series keys (getTimeseriesKeys) +Get Device Profiles (getDeviceProfiles) -Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. +Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the device profile name. | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, transportType, description, isDefault] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | ### Return type -**List** +**PageDataDeviceProfile** ## saveDeviceProfile diff --git a/ce/docs/DeviceProfileExportData.md b/ce/docs/DeviceProfileExportData.md new file mode 100644 index 00000000..505aa2ee --- /dev/null +++ b/ce/docs/DeviceProfileExportData.md @@ -0,0 +1,23 @@ + +# DeviceProfileExportData + +`org.thingsboard.client.model.DeviceProfileExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/DomainControllerApi.md b/ce/docs/DomainControllerApi.md index fefc1c7e..e2e6ce50 100644 --- a/ce/docs/DomainControllerApi.md +++ b/ce/docs/DomainControllerApi.md @@ -6,7 +6,7 @@ | [**getDomainInfoById**](#getDomainInfoById) | **GET** /api/domain/info/{id} | Get Domain info by Id (getDomainInfoById) | | [**getTenantDomainInfos**](#getTenantDomainInfos) | **GET** /api/domain/infos | Get Domain infos (getTenantDomainInfos) | | [**saveDomain**](#saveDomain) | **POST** /api/domain | Save or Update Domain (saveDomain) | -| [**updateOauth2Clients1**](#updateOauth2Clients1) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateDomainOauth2Clients**](#updateDomainOauth2Clients) | **PUT** /api/domain/{id}/oauth2Clients | Update oauth2 clients (updateDomainOauth2Clients) | @@ -95,11 +95,11 @@ Create or update the Domain. When creating domain, platform generates Domain Id **Domain** -## updateOauth2Clients1 +## updateDomainOauth2Clients -> updateOauth2Clients1(id, UUID) +> updateDomainOauth2Clients(id, UUID) -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateDomainOauth2Clients) Update oauth2 clients for the specified domain. diff --git a/ce/docs/EdgeCommunicationFailureRecipientsConfig.md b/ce/docs/EdgeCommunicationFailureRecipientsConfig.md new file mode 100644 index 00000000..6ae93da1 --- /dev/null +++ b/ce/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/ce/docs/EdgeConnectionRecipientsConfig.md b/ce/docs/EdgeConnectionRecipientsConfig.md new file mode 100644 index 00000000..0c69a5e5 --- /dev/null +++ b/ce/docs/EdgeConnectionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EdgeConnectionRecipientsConfig + +`org.thingsboard.client.model.EdgeConnectionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EdgeControllerApi.md b/ce/docs/EdgeControllerApi.md index fc10b679..f498cbb9 100644 --- a/ce/docs/EdgeControllerApi.md +++ b/ce/docs/EdgeControllerApi.md @@ -5,7 +5,7 @@ | [**assignEdgeToCustomer**](#assignEdgeToCustomer) | **POST** /api/customer/{customerId}/edge/{edgeId} | Assign edge to customer (assignEdgeToCustomer) | | [**assignEdgeToPublicCustomer**](#assignEdgeToPublicCustomer) | **POST** /api/customer/public/edge/{edgeId} | Make edge publicly available (assignEdgeToPublicCustomer) | | [**deleteEdge**](#deleteEdge) | **DELETE** /api/edge/{edgeId} | Delete edge (deleteEdge) | -| [**findByQuery2**](#findByQuery2) | **POST** /api/edges | Find related edges (findByQuery) | +| [**findEdgesByQuery**](#findEdgesByQuery) | **POST** /api/edges | Find related edges (findEdgesByQuery) | | [**findMissingToRelatedRuleChains**](#findMissingToRelatedRuleChains) | **GET** /api/edge/missingToRelatedRuleChains/{edgeId} | Find missing rule chains (findMissingToRelatedRuleChains) | | [**getCustomerEdgeInfos**](#getCustomerEdgeInfos) | **GET** /api/customer/{customerId}/edgeInfos | Get Customer Edge Infos (getCustomerEdgeInfos) | | [**getCustomerEdges**](#getCustomerEdges) | **GET** /api/customer/{customerId}/edges | Get Customer Edges (getCustomerEdges) | @@ -90,11 +90,11 @@ Deletes the edge. Referencing non-existing edge Id will cause an error. Availab null (empty response body) -## findByQuery2 +## findEdgesByQuery -> List findByQuery2(edgeSearchQuery) +> List findEdgesByQuery(edgeSearchQuery) -Find related edges (findByQuery) +Find related edges (findEdgesByQuery) Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/EntitiesLimitRecipientsConfig.md b/ce/docs/EntitiesLimitRecipientsConfig.md new file mode 100644 index 00000000..521fb923 --- /dev/null +++ b/ce/docs/EntitiesLimitRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntitiesLimitRecipientsConfig + +`org.thingsboard.client.model.EntitiesLimitRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EntityActionRecipientsConfig.md b/ce/docs/EntityActionRecipientsConfig.md new file mode 100644 index 00000000..d1f26540 --- /dev/null +++ b/ce/docs/EntityActionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# EntityActionRecipientsConfig + +`org.thingsboard.client.model.EntityActionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EntityRelationControllerApi.md b/ce/docs/EntityRelationControllerApi.md index 42321be0..7c55d128 100644 --- a/ce/docs/EntityRelationControllerApi.md +++ b/ce/docs/EntityRelationControllerApi.md @@ -2,57 +2,30 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**deleteRelation**](#deleteRelation) | **DELETE** /api/relation | Delete Relation (deleteRelation) | -| [**deleteRelationV2**](#deleteRelationV2) | **DELETE** /api/v2/relation | Delete Relation (deleteRelationV2) | -| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteCommonRelations) | -| [**findByFromAndRelationType**](#findByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findByFromAndRelationType) | -| [**findByFromV2**](#findByFromV2) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findByFromV2) | -| [**findByQuery**](#findByQuery) | **POST** /api/relations | Find related entities (findByQuery) | -| [**findByToAndRelationType**](#findByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findByToAndRelationType) | -| [**findByToV2**](#findByToV2) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findByToV2) | -| [**findInfoByFromV2**](#findInfoByFromV2) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findInfoByFromV2) | -| [**findInfoByQuery**](#findInfoByQuery) | **POST** /api/relations/info | Find related entity infos (findInfoByQuery) | -| [**findInfoByToV2**](#findInfoByToV2) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findInfoByToV2) | +| [**deleteRelation**](#deleteRelation) | **DELETE** /api/v2/relation | Delete Relation (deleteRelation) | +| [**deleteRelations**](#deleteRelations) | **DELETE** /api/relations | Delete common relations (deleteRelations) | +| [**findEntityRelationInfosByFrom**](#findEntityRelationInfosByFrom) | **GET** /api/relations/info/from/{fromType}/{fromId} | Get List of Relation Infos (findEntityRelationInfosByFrom) | +| [**findEntityRelationInfosByQuery**](#findEntityRelationInfosByQuery) | **POST** /api/relations/info | Find related entity infos (findEntityRelationInfosByQuery) | +| [**findEntityRelationInfosByTo**](#findEntityRelationInfosByTo) | **GET** /api/relations/info/to/{toType}/{toId} | Get List of Relation Infos (findEntityRelationInfosByTo) | +| [**findEntityRelationsByFrom**](#findEntityRelationsByFrom) | **GET** /api/relations/from/{fromType}/{fromId} | Get List of Relations (findEntityRelationsByFrom) | +| [**findEntityRelationsByFromAndRelationType**](#findEntityRelationsByFromAndRelationType) | **GET** /api/relations/from/{fromType}/{fromId}/{relationType} | Get List of Relations (findEntityRelationsByFromAndRelationType) | +| [**findEntityRelationsByQuery**](#findEntityRelationsByQuery) | **POST** /api/relations | Find related entities (findEntityRelationsByQuery) | +| [**findEntityRelationsByTo**](#findEntityRelationsByTo) | **GET** /api/relations/to/{toType}/{toId} | Get List of Relations (findEntityRelationsByTo) | +| [**findEntityRelationsByToAndRelationType**](#findEntityRelationsByToAndRelationType) | **GET** /api/relations/to/{toType}/{toId}/{relationType} | Get List of Relations (findEntityRelationsByToAndRelationType) | | [**getRelation**](#getRelation) | **GET** /api/relation | Get Relation (getRelation) | -| [**saveRelation**](#saveRelation) | **POST** /api/relation | Create Relation (saveRelation) | -| [**saveRelationV2**](#saveRelationV2) | **POST** /api/v2/relation | Create Relation (saveRelationV2) | +| [**saveRelation**](#saveRelation) | **POST** /api/v2/relation | Create Relation (saveRelation) | ## deleteRelation -> deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) +> EntityRelation deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup) Delete Relation (deleteRelation) Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | - -### Return type - -null (empty response body) - - -## deleteRelationV2 - -> EntityRelation deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup) - -Delete Relation (deleteRelationV2) - -Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | @@ -73,7 +46,7 @@ Deletes a relation between two entities in the platform. If the user has the a > deleteRelations(entityId, entityType) -Delete common relations (deleteCommonRelations) +Delete common relations (deleteRelations) Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. @@ -90,13 +63,13 @@ Deletes all the relations ('from' and 'to' direction) for the specified entity a null (empty response body) -## findByFromAndRelationType +## findEntityRelationInfosByFrom -> List findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) +> List findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByFromAndRelationType) +Get List of Relation Infos (findEntityRelationInfosByFrom) -Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters @@ -105,72 +78,70 @@ Returns list of relation objects for the specified entity by the 'from' directio |------------- | ------------- | ------------- | -------------| | **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByFromV2 +## findEntityRelationInfosByQuery -> List findByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationInfosByQuery(entityRelationsQuery) -Get List of Relations (findByFromV2) +Find related entity infos (findEntityRelationInfosByQuery) -Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findByQuery +## findEntityRelationInfosByTo -> List findByQuery(entityRelationsQuery) +> List findEntityRelationInfosByTo(toType, toId, relationTypeGroup) -Find related entities (findByQuery) +Get List of Relation Infos (findEntityRelationInfosByTo) -Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. +Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findByToAndRelationType +## findEntityRelationsByFrom -> List findByToAndRelationType(toType, toId, relationType, relationTypeGroup) +> List findEntityRelationsByFrom(fromType, fromId, relationTypeGroup) -Get List of Relations (findByToAndRelationType) +Get List of Relations (findEntityRelationsByFrom) -Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -178,21 +149,22 @@ Returns list of relation objects for the specified entity by the 'to' direction **List** -## findByToV2 +## findEntityRelationsByFromAndRelationType -> List findByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup) -Get List of Relations (findByToV2) +Get List of Relations (findEntityRelationsByFromAndRelationType) -Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. +Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type @@ -200,55 +172,55 @@ Returns list of relation objects for the specified entity by the 'to' direction. **List** -## findInfoByFromV2 +## findEntityRelationsByQuery -> List findInfoByFromV2(fromType, fromId, relationTypeGroup) +> List findEntityRelationsByQuery(entityRelationsQuery) -Get List of Relation Infos (findInfoByFromV2) +Find related entities (findEntityRelationsByQuery) -Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **fromType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **fromId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | +| **entityRelationsQuery** | **EntityRelationsQuery** | | | ### Return type -**List** +**List** -## findInfoByQuery +## findEntityRelationsByTo -> List findInfoByQuery(entityRelationsQuery) +> List findEntityRelationsByTo(toType, toId, relationTypeGroup) -Find related entity infos (findInfoByQuery) +Get List of Relations (findEntityRelationsByTo) -Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityRelationsQuery** | **EntityRelationsQuery** | | | +| **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** -## findInfoByToV2 +## findEntityRelationsByToAndRelationType -> List findInfoByToV2(toType, toId, relationTypeGroup) +> List findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup) -Get List of Relation Infos (findInfoByToV2) +Get List of Relations (findEntityRelationsByToAndRelationType) -Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. +Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. ### Parameters @@ -257,11 +229,12 @@ Returns list of relation info objects for the specified entity by the 'to' direc |------------- | ------------- | ------------- | -------------| | **toType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **toId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **relationType** | **String** | A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. | | | **relationTypeGroup** | **String** | A string value representing relation type group. For example, 'COMMON' | [optional] | ### Return type -**List** +**List** ## getRelation @@ -291,33 +264,13 @@ Returns relation object between two specified entities if present. Otherwise thr ## saveRelation -> saveRelation(entityRelation) +> EntityRelation saveRelation(entityRelation) Create Relation (saveRelation) Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityRelation** | **EntityRelation** | | | - -### Return type - -null (empty response body) - - -## saveRelationV2 - -> EntityRelation saveRelationV2(entityRelation) - -Create Relation (saveRelationV2) - -Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - - ### Parameters | Name | Type | Description | Notes | diff --git a/ce/docs/EntityViewControllerApi.md b/ce/docs/EntityViewControllerApi.md index f3b86e9b..b68c7e33 100644 --- a/ce/docs/EntityViewControllerApi.md +++ b/ce/docs/EntityViewControllerApi.md @@ -6,14 +6,14 @@ | [**assignEntityViewToEdge**](#assignEntityViewToEdge) | **POST** /api/edge/{edgeId}/entityView/{entityViewId} | Assign entity view to edge (assignEntityViewToEdge) | | [**assignEntityViewToPublicCustomer**](#assignEntityViewToPublicCustomer) | **POST** /api/customer/public/entityView/{entityViewId} | Make entity view publicly available (assignEntityViewToPublicCustomer) | | [**deleteEntityView**](#deleteEntityView) | **DELETE** /api/entityView/{entityViewId} | Delete entity view (deleteEntityView) | -| [**findByQuery1**](#findByQuery1) | **POST** /api/entityViews | Find related entity views (findByQuery) | +| [**findEntityViewsByQuery**](#findEntityViewsByQuery) | **POST** /api/entityViews | Find related entity views (findEntityViewsByQuery) | | [**getCustomerEntityViewInfos**](#getCustomerEntityViewInfos) | **GET** /api/customer/{customerId}/entityViewInfos | Get Customer Entity View info (getCustomerEntityViewInfos) | | [**getCustomerEntityViews**](#getCustomerEntityViews) | **GET** /api/customer/{customerId}/entityViews | Get Customer Entity Views (getCustomerEntityViews) | | [**getEdgeEntityViews**](#getEdgeEntityViews) | **GET** /api/edge/{edgeId}/entityViews | getEdgeEntityViews | | [**getEntityViewById**](#getEntityViewById) | **GET** /api/entityView/{entityViewId} | Get entity view (getEntityViewById) | | [**getEntityViewInfoById**](#getEntityViewInfoById) | **GET** /api/entityView/info/{entityViewId} | Get Entity View info (getEntityViewInfoById) | | [**getEntityViewTypes**](#getEntityViewTypes) | **GET** /api/entityView/types | Get Entity View Types (getEntityViewTypes) | -| [**getEntityViewsByIdsV2**](#getEntityViewsByIdsV2) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIdsV2) | +| [**getEntityViewsByIds**](#getEntityViewsByIds) | **GET** /api/entityViews/list | Get Entity Views By Ids (getEntityViewsByIds) | | [**getTenantEntityViewByName**](#getTenantEntityViewByName) | **GET** /api/tenant/entityView | Get Entity View by name (getTenantEntityViewByName) | | [**getTenantEntityViewInfos**](#getTenantEntityViewInfos) | **GET** /api/tenant/entityViewInfos | Get Tenant Entity Views (getTenantEntityViews) | | [**getTenantEntityViews**](#getTenantEntityViews) | **GET** /api/tenant/entityViews | Get Tenant Entity Views (getTenantEntityViews) | @@ -105,11 +105,11 @@ Delete the EntityView object based on the provided entity view id. Available f null (empty response body) -## findByQuery1 +## findEntityViewsByQuery -> List findByQuery1(entityViewSearchQuery) +> List findEntityViewsByQuery(entityViewSearchQuery) -Find related entity views (findByQuery) +Find related entity views (findEntityViewsByQuery) Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -256,11 +256,11 @@ Returns a set of unique entity view types based on entity views that are either **List** -## getEntityViewsByIdsV2 +## getEntityViewsByIds -> List getEntityViewsByIdsV2(entityViewIds) +> List getEntityViewsByIds(entityViewIds) -Get Entity Views By Ids (getEntityViewsByIdsV2) +Get Entity Views By Ids (getEntityViewsByIds) Requested entity views must be owned by tenant or assigned to customer which user is performing the request. diff --git a/ce/docs/EntityViewExportData.md b/ce/docs/EntityViewExportData.md new file mode 100644 index 00000000..bc849104 --- /dev/null +++ b/ce/docs/EntityViewExportData.md @@ -0,0 +1,23 @@ + +# EntityViewExportData + +`org.thingsboard.client.model.EntityViewExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/EventControllerApi.md b/ce/docs/EventControllerApi.md index 9fd38f85..5832492f 100644 --- a/ce/docs/EventControllerApi.md +++ b/ce/docs/EventControllerApi.md @@ -3,9 +3,8 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**clearEvents**](#clearEvents) | **POST** /api/events/{entityType}/{entityId}/clear | Clear Events (clearEvents) | -| [**getEvents**](#getEvents) | **GET** /api/events/{entityType}/{entityId} | Get Events (Deprecated) | -| [**getEvents1**](#getEvents1) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEvents) | -| [**getEvents2**](#getEvents2) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEvents) | +| [**getEventsByFilter**](#getEventsByFilter) | **POST** /api/events/{entityType}/{entityId} | Get Events by event filter (getEventsByFilter) | +| [**getEventsByType**](#getEventsByType) | **GET** /api/events/{entityType}/{entityId}/{eventType} | Get Events by type (getEventsByType) | @@ -33,40 +32,11 @@ Clears events by filter for specified entity. null (empty response body) -## getEvents +## getEventsByFilter -> PageDataEventInfo getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events (Deprecated) - -Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | -| **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **tenantId** | **String** | A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **pageSize** | **Integer** | Maximum amount of entities in a one page | | -| **page** | **Integer** | Sequence number of page starting from 0 | | -| **textSearch** | **String** | The value is not used in searching. | [optional] | -| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: ts, id] | -| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | -| **startTime** | **Long** | Timestamp. Events with creation time before it won't be queried. | [optional] | -| **endTime** | **Long** | Timestamp. Events with creation time after it won't be queried. | [optional] | - -### Return type - -**PageDataEventInfo** - - -## getEvents1 - -> PageDataEventInfo getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime) - -Get Events by event filter (getEvents) +Get Events by event filter (getEventsByFilter) Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. @@ -92,11 +62,11 @@ Returns a page of events for the chosen entity by specifying the event filter. Y **PageDataEventInfo** -## getEvents2 +## getEventsByType -> PageDataEventInfo getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) +> PageDataEventInfo getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime) -Get Events by type (getEvents) +Get Events by type (getEventsByType) Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. diff --git a/ce/docs/FeaturesInfo.md b/ce/docs/FeaturesInfo.md index 117e5fd6..6ad1b21c 100644 --- a/ce/docs/FeaturesInfo.md +++ b/ce/docs/FeaturesInfo.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **notificationEnabled** | **Boolean** | | [optional] | | **twoFaEnabled** | **Boolean** | | [optional] | | **emailEnabled** | **Boolean** | | [optional] | | **smsEnabled** | **Boolean** | | [optional] | | **oauthEnabled** | **Boolean** | | [optional] | +| **notificationEnabled** | **Boolean** | | [optional] | diff --git a/ce/docs/Lwm2mControllerApi.md b/ce/docs/Lwm2mControllerApi.md index 0210faff..6f6e905a 100644 --- a/ce/docs/Lwm2mControllerApi.md +++ b/ce/docs/Lwm2mControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getLwm2mBootstrapSecurityInfo**](#getLwm2mBootstrapSecurityInfo) | **GET** /api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer} | Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo) | -| [**saveDeviceWithCredentials**](#saveDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save device with credentials (Deprecated) | +| [**saveLwm2mDeviceWithCredentials**](#saveLwm2mDeviceWithCredentials) | **POST** /api/lwm2m/device-credentials | Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) | @@ -27,11 +27,11 @@ Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the **LwM2MServerSecurityConfigDefault** -## saveDeviceWithCredentials +## saveLwm2mDeviceWithCredentials -> Device saveDeviceWithCredentials(requestBody) +> Device saveLwm2mDeviceWithCredentials(requestBody) -Save device with credentials (Deprecated) +Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) ### Parameters diff --git a/ce/docs/MailConfigTemplateControllerApi.md b/ce/docs/MailConfigTemplateControllerApi.md index 16e82199..3161d437 100644 --- a/ce/docs/MailConfigTemplateControllerApi.md +++ b/ce/docs/MailConfigTemplateControllerApi.md @@ -2,15 +2,15 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getClientRegistrationTemplates1**](#getClientRegistrationTemplates1) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getMailConfigTemplates**](#getMailConfigTemplates) | **GET** /api/mail/config/template | Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | -## getClientRegistrationTemplates1 +## getMailConfigTemplates -> com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() +> com.fasterxml.jackson.databind.JsonNode getMailConfigTemplates() -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Mail configuration template is set of default smtp settings for mail server that specific provider supports diff --git a/ce/docs/MobileAppBundleControllerApi.md b/ce/docs/MobileAppBundleControllerApi.md index abcd08eb..40de3c73 100644 --- a/ce/docs/MobileAppBundleControllerApi.md +++ b/ce/docs/MobileAppBundleControllerApi.md @@ -6,7 +6,7 @@ | [**getMobileAppBundleInfoById**](#getMobileAppBundleInfoById) | **GET** /api/mobile/bundle/info/{id} | Get mobile app bundle info by id (getMobileAppBundleInfoById) | | [**getTenantMobileAppBundleInfos**](#getTenantMobileAppBundleInfos) | **GET** /api/mobile/bundle/infos | Get mobile app bundle infos (getTenantMobileAppBundleInfos) | | [**saveMobileAppBundle**](#saveMobileAppBundle) | **POST** /api/mobile/bundle | Save Or update Mobile app bundle (saveMobileAppBundle) | -| [**updateOauth2Clients**](#updateOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateOauth2Clients) | +| [**updateMobileAppBundleOauth2Clients**](#updateMobileAppBundleOauth2Clients) | **PUT** /api/mobile/bundle/{id}/oauth2Clients | Update oauth2 clients (updateMobileAppBundleOauth2Clients) | @@ -95,11 +95,11 @@ Create or update the Mobile app bundle that represents tha pair of ANDROID and I **MobileAppBundle** -## updateOauth2Clients +## updateMobileAppBundleOauth2Clients -> updateOauth2Clients(id, UUID) +> updateMobileAppBundleOauth2Clients(id, UUID) -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateMobileAppBundleOauth2Clients) Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/MobileAppControllerApi.md b/ce/docs/MobileAppControllerApi.md index 08f713ba..4aad90c2 100644 --- a/ce/docs/MobileAppControllerApi.md +++ b/ce/docs/MobileAppControllerApi.md @@ -4,8 +4,8 @@ |------------- | ------------- | -------------| | [**deleteMobileApp**](#deleteMobileApp) | **DELETE** /api/mobile/app/{id} | Delete Mobile App by ID (deleteMobileApp) | | [**getLoginMobileInfo**](#getLoginMobileInfo) | **GET** /api/noauth/mobile | Get mobile app login info (getLoginMobileInfo) | -| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppInfoById) | -| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileAppInfos) | +| [**getMobileAppById**](#getMobileAppById) | **GET** /api/mobile/app/{id} | Get mobile info by id (getMobileAppById) | +| [**getTenantMobileApps**](#getTenantMobileApps) | **GET** /api/mobile/app | Get mobile app infos (getTenantMobileApps) | | [**getUserMobileInfo**](#getUserMobileInfo) | **GET** /api/mobile | Get user mobile app basic info (getUserMobileInfo) | | [**saveMobileApp**](#saveMobileApp) | **POST** /api/mobile/app | Save Or update Mobile app (saveMobileApp) | @@ -54,7 +54,7 @@ Get mobile app login info (getLoginMobileInfo) > MobileApp getMobileAppById(id) -Get mobile info by id (getMobileAppInfoById) +Get mobile info by id (getMobileAppById) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -74,7 +74,7 @@ Get mobile info by id (getMobileAppInfoById) > PageDataMobileApp getTenantMobileApps(pageSize, page, platformType, textSearch, sortProperty, sortOrder) -Get mobile app infos (getTenantMobileAppInfos) +Get mobile app infos (getTenantMobileApps) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/NewPlatformVersionRecipientsConfig.md b/ce/docs/NewPlatformVersionRecipientsConfig.md new file mode 100644 index 00000000..07ba72bb --- /dev/null +++ b/ce/docs/NewPlatformVersionRecipientsConfig.md @@ -0,0 +1,24 @@ + +# NewPlatformVersionRecipientsConfig + +`org.thingsboard.client.model.NewPlatformVersionRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/NotificationRequestStats.md b/ce/docs/NotificationRequestStats.md index 8a389f6a..88e271ba 100644 --- a/ce/docs/NotificationRequestStats.md +++ b/ce/docs/NotificationRequestStats.md @@ -9,9 +9,9 @@ Notification request processing statistics | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **sent** | **Map\** | Number of successfully sent notifications per delivery method | [optional] | +| **sent** | **Map\** | Number of successfully sent notifications per delivery method | [optional] | | **errors** | **Map\\>** | Errors per delivery method. Each entry maps recipient name to error message | [optional] | -| **totalErrors** | **Object** | | [optional] | +| **totalErrors** | **Integer** | Total number of errors across all delivery methods | [optional] | | **error** | **String** | General error message if the entire request failed | [optional] | diff --git a/ce/docs/NotificationRuleExportData.md b/ce/docs/NotificationRuleExportData.md new file mode 100644 index 00000000..87087bd9 --- /dev/null +++ b/ce/docs/NotificationRuleExportData.md @@ -0,0 +1,23 @@ + +# NotificationRuleExportData + +`org.thingsboard.client.model.NotificationRuleExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/NotificationTargetControllerApi.md b/ce/docs/NotificationTargetControllerApi.md index 2965783c..c9341cff 100644 --- a/ce/docs/NotificationTargetControllerApi.md +++ b/ce/docs/NotificationTargetControllerApi.md @@ -5,8 +5,8 @@ | [**deleteNotificationTargetById**](#deleteNotificationTargetById) | **DELETE** /api/notification/target/{id} | Delete notification target by id (deleteNotificationTargetById) | | [**getNotificationTargetById**](#getNotificationTargetById) | **GET** /api/notification/target/{id} | Get notification target by id (getNotificationTargetById) | | [**getNotificationTargets**](#getNotificationTargets) | **GET** /api/notification/targets | Get notification targets (getNotificationTargets) | -| [**getNotificationTargetsByIdsV2**](#getNotificationTargetsByIdsV2) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIdsV2) | -| [**getNotificationTargetsBySupportedNotificationTypeV2**](#getNotificationTargetsBySupportedNotificationTypeV2) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) | +| [**getNotificationTargetsByIds**](#getNotificationTargetsByIds) | **GET** /api/notification/targets/list | Get notification targets by ids (getNotificationTargetsByIds) | +| [**getNotificationTargetsBySupportedNotificationType**](#getNotificationTargetsBySupportedNotificationType) | **GET** /api/notification/targets/notificationType/{notificationType} | Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) | | [**getRecipientsForNotificationTargetConfig**](#getRecipientsForNotificationTargetConfig) | **POST** /api/notification/target/recipients | Get recipients for notification target config (getRecipientsForNotificationTargetConfig) | | [**saveNotificationTarget**](#saveNotificationTarget) | **POST** /api/notification/target | Save notification target (saveNotificationTarget) | @@ -76,11 +76,11 @@ Returns the page of notification targets owned by sysadmin or tenant. You can s **PageDataNotificationTarget** -## getNotificationTargetsByIdsV2 +## getNotificationTargetsByIds -> List getNotificationTargetsByIdsV2(ids) +> List getNotificationTargetsByIds(ids) -Get notification targets by ids (getNotificationTargetsByIdsV2) +Get notification targets by ids (getNotificationTargetsByIds) Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -96,11 +96,11 @@ Returns the list of notification targets found by provided ids. Available for u **List** -## getNotificationTargetsBySupportedNotificationTypeV2 +## getNotificationTargetsBySupportedNotificationType -> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder) -Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) +Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) Returns the page of notification targets filtered by notification type that they can be used for. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/NotificationTargetExportData.md b/ce/docs/NotificationTargetExportData.md new file mode 100644 index 00000000..bec4f95a --- /dev/null +++ b/ce/docs/NotificationTargetExportData.md @@ -0,0 +1,26 @@ + +# NotificationTargetExportData + +`org.thingsboard.client.model.NotificationTargetExportData` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **entityType** | **EntityType** | | | +| **entity** | **ExportableEntity** | | [optional] | +| **relations** | **List\** | | [optional] | +| **attributes** | **Map\\>** | Map of attributes where key is the scope of attributes and value is the list of attributes for that scope | [optional] | +| **calculatedFields** | **List\** | | [optional] | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/NotificationTemplateExportData.md b/ce/docs/NotificationTemplateExportData.md new file mode 100644 index 00000000..8bd15980 --- /dev/null +++ b/ce/docs/NotificationTemplateExportData.md @@ -0,0 +1,23 @@ + +# NotificationTemplateExportData + +`org.thingsboard.client.model.NotificationTemplateExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/OAuth2ConfigTemplateControllerApi.md b/ce/docs/OAuth2ConfigTemplateControllerApi.md index 13ecaa21..ed3c77ad 100644 --- a/ce/docs/OAuth2ConfigTemplateControllerApi.md +++ b/ce/docs/OAuth2ConfigTemplateControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteClientRegistrationTemplate**](#deleteClientRegistrationTemplate) | **DELETE** /api/oauth2/config/template/{clientRegistrationTemplateId} | Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | -| [**getClientRegistrationTemplates**](#getClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | +| [**getOAuth2ClientRegistrationTemplates**](#getOAuth2ClientRegistrationTemplates) | **GET** /api/oauth2/config/template | Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. | | [**saveClientRegistrationTemplate**](#saveClientRegistrationTemplate) | **POST** /api/oauth2/config/template | Create or update OAuth2 client registration template (saveClientRegistrationTemplate) Available for users with 'SYS_ADMIN' authority. | @@ -28,11 +28,11 @@ Client registration template is OAuth2 provider configuration template with defa null (empty response body) -## getClientRegistrationTemplates +## getOAuth2ClientRegistrationTemplates -> List getClientRegistrationTemplates() +> List getOAuth2ClientRegistrationTemplates() -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients diff --git a/ce/docs/OAuth2ControllerApi.md b/ce/docs/OAuth2ControllerApi.md index 11ef5665..9582aedd 100644 --- a/ce/docs/OAuth2ControllerApi.md +++ b/ce/docs/OAuth2ControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**deleteOauth2Client**](#deleteOauth2Client) | **DELETE** /api/oauth2/client/{id} | Delete oauth2 client (deleteOauth2Client) | | [**findTenantOAuth2ClientInfos**](#findTenantOAuth2ClientInfos) | **GET** /api/oauth2/client/infos | Get OAuth2 Client infos (findTenantOAuth2ClientInfos) | -| [**findTenantOAuth2ClientInfosByIdsV2**](#findTenantOAuth2ClientInfosByIdsV2) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) | +| [**findTenantOAuth2ClientInfosByIds**](#findTenantOAuth2ClientInfosByIds) | **GET** /api/oauth2/client/list | Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) | | [**getLoginProcessingUrl**](#getLoginProcessingUrl) | **GET** /api/oauth2/loginProcessingUrl | Get OAuth2 log in processing URL (getLoginProcessingUrl) | | [**getOAuth2ClientById**](#getOAuth2ClientById) | **GET** /api/oauth2/client/{id} | Get OAuth2 Client by id (getOAuth2ClientById) | | [**getOAuth2Clients**](#getOAuth2Clients) | **POST** /api/noauth/oauth2Clients | Get OAuth2 clients (getOAuth2Clients) | @@ -56,11 +56,11 @@ Get OAuth2 Client infos (findTenantOAuth2ClientInfos) **PageDataOAuth2ClientInfo** -## findTenantOAuth2ClientInfosByIdsV2 +## findTenantOAuth2ClientInfosByIds -> List findTenantOAuth2ClientInfosByIdsV2(clientIds) +> List findTenantOAuth2ClientInfosByIds(clientIds) -Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) +Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/OtaPackageControllerApi.md b/ce/docs/OtaPackageControllerApi.md index 653bd0b8..dcfb9768 100644 --- a/ce/docs/OtaPackageControllerApi.md +++ b/ce/docs/OtaPackageControllerApi.md @@ -7,7 +7,7 @@ | [**getOtaPackageById**](#getOtaPackageById) | **GET** /api/otaPackage/{otaPackageId} | Get OTA Package (getOtaPackageById) | | [**getOtaPackageInfoById**](#getOtaPackageInfoById) | **GET** /api/otaPackage/info/{otaPackageId} | Get OTA Package Info (getOtaPackageInfoById) | | [**getOtaPackages**](#getOtaPackages) | **GET** /api/otaPackages | Get OTA Package Infos (getOtaPackages) | -| [**getOtaPackages1**](#getOtaPackages1) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos (getOtaPackages) | +| [**getOtaPackagesByDeviceProfileAndType**](#getOtaPackagesByDeviceProfileAndType) | **GET** /api/otaPackages/{deviceProfileId}/{type} | Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) | | [**saveOtaPackageData**](#saveOtaPackageData) | **POST** /api/otaPackage/{otaPackageId} | Save OTA Package data (saveOtaPackageData) | | [**saveOtaPackageInfo**](#saveOtaPackageInfo) | **POST** /api/otaPackage | Create Or Update OTA Package Info (saveOtaPackageInfo) | @@ -117,11 +117,11 @@ Returns a page of OTA Package Info objects owned by tenant. You can specify para **PageDataOtaPackageInfo** -## getOtaPackages1 +## getOtaPackagesByDeviceProfileAndType -> PageDataOtaPackageInfo getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) +> PageDataOtaPackageInfo getOtaPackagesByDeviceProfileAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder) -Get OTA Package Infos (getOtaPackages) +Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/QrCodeSettingsControllerApi.md b/ce/docs/QrCodeSettingsControllerApi.md index 50bf2df1..1f41c3a9 100644 --- a/ce/docs/QrCodeSettingsControllerApi.md +++ b/ce/docs/QrCodeSettingsControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**getApplicationRedirect**](#getApplicationRedirect) | **GET** /api/noauth/qr | getApplicationRedirect | | [**getMobileAppDeepLink**](#getMobileAppDeepLink) | **GET** /api/mobile/qr/deepLink | Get the deep link to the associated mobile application (getMobileAppDeepLink) | -| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getMobileAppSettings) | +| [**getQrCodeSettings**](#getQrCodeSettings) | **GET** /api/mobile/qr/settings | Get Mobile application settings (getQrCodeSettings) | | [**getUserTokenByMobileSecret**](#getUserTokenByMobileSecret) | **GET** /api/noauth/qr/{secret} | Get User Token (getUserTokenByMobileSecret) | | [**saveQrCodeSettings**](#saveQrCodeSettings) | **POST** /api/mobile/qr/settings | Create Or Update the Mobile application settings (saveMobileAppSettings) | @@ -45,7 +45,7 @@ Fetch the url that takes user to linked mobile application Available for any a > QrCodeSettings getQrCodeSettings() -Get Mobile application settings (getMobileAppSettings) +Get Mobile application settings (getQrCodeSettings) The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. diff --git a/ce/docs/QueueStatsControllerApi.md b/ce/docs/QueueStatsControllerApi.md index 4877e79d..f9316c00 100644 --- a/ce/docs/QueueStatsControllerApi.md +++ b/ce/docs/QueueStatsControllerApi.md @@ -3,7 +3,7 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getQueueStatsById**](#getQueueStatsById) | **GET** /api/queueStats/{queueStatsId} | Get Queue stats entity by id (getQueueStatsById) | -| [**getQueueStatsByIdsV2**](#getQueueStatsByIdsV2) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIdsV2) | +| [**getQueueStatsByIds**](#getQueueStatsByIds) | **GET** /api/queueStats/list | Get QueueStats By Ids (getQueueStatsByIds) | | [**getTenantQueueStats**](#getTenantQueueStats) | **GET** /api/queueStats | Get Queue Stats entities (getTenantQueueStats) | @@ -28,11 +28,11 @@ Fetch the Queue stats object based on the provided Queue stats id. Available f **QueueStats** -## getQueueStatsByIdsV2 +## getQueueStatsByIds -> List getQueueStatsByIdsV2(queueStatsIds) +> List getQueueStatsByIds(queueStatsIds) -Get QueueStats By Ids (getQueueStatsByIdsV2) +Get QueueStats By Ids (getQueueStatsByIds) Fetch the Queue stats objects based on the provided ids. diff --git a/ce/docs/RateLimitsRecipientsConfig.md b/ce/docs/RateLimitsRecipientsConfig.md new file mode 100644 index 00000000..ccfdc7a9 --- /dev/null +++ b/ce/docs/RateLimitsRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RateLimitsRecipientsConfig + +`org.thingsboard.client.model.RateLimitsRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/ResourceShortageRecipientsConfig.md b/ce/docs/ResourceShortageRecipientsConfig.md new file mode 100644 index 00000000..b5749bba --- /dev/null +++ b/ce/docs/ResourceShortageRecipientsConfig.md @@ -0,0 +1,24 @@ + +# ResourceShortageRecipientsConfig + +`org.thingsboard.client.model.ResourceShortageRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/RpcV1ControllerApi.md b/ce/docs/RpcV1ControllerApi.md index 9763fabd..f9983683 100644 --- a/ce/docs/RpcV1ControllerApi.md +++ b/ce/docs/RpcV1ControllerApi.md @@ -2,16 +2,16 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleOneWayDeviceRPCRequest1**](#handleOneWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequest) | -| [**handleTwoWayDeviceRPCRequest1**](#handleTwoWayDeviceRPCRequest1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequest) | +| [**handleOneWayDeviceRPCRequestV1**](#handleOneWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV1) | +| [**handleTwoWayDeviceRPCRequestV1**](#handleTwoWayDeviceRPCRequestV1) | **POST** /api/plugins/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) | -## handleOneWayDeviceRPCRequest1 +## handleOneWayDeviceRPCRequestV1 -> String handleOneWayDeviceRPCRequest1(deviceId, body) +> String handleOneWayDeviceRPCRequestV1(deviceId, body) -Send one-way RPC request (handleOneWayDeviceRPCRequest) +Send one-way RPC request (handleOneWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -28,11 +28,11 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ **String** -## handleTwoWayDeviceRPCRequest1 +## handleTwoWayDeviceRPCRequestV1 -> String handleTwoWayDeviceRPCRequest1(deviceId, body) +> String handleTwoWayDeviceRPCRequestV1(deviceId, body) -Send two-way RPC request (handleTwoWayDeviceRPCRequest) +Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/RpcV2ControllerApi.md b/ce/docs/RpcV2ControllerApi.md index 577833cf..55de9d16 100644 --- a/ce/docs/RpcV2ControllerApi.md +++ b/ce/docs/RpcV2ControllerApi.md @@ -5,8 +5,8 @@ | [**deleteRpc**](#deleteRpc) | **DELETE** /api/rpc/persistent/{rpcId} | Delete persistent RPC | | [**getPersistedRpc**](#getPersistedRpc) | **GET** /api/rpc/persistent/{rpcId} | Get persistent RPC request | | [**getPersistedRpcByDevice**](#getPersistedRpcByDevice) | **GET** /api/rpc/persistent/device/{deviceId} | Get persistent RPC requests | -| [**handleOneWayDeviceRPCRequest**](#handleOneWayDeviceRPCRequest) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request | -| [**handleTwoWayDeviceRPCRequest**](#handleTwoWayDeviceRPCRequest) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request | +| [**handleOneWayDeviceRPCRequestV2**](#handleOneWayDeviceRPCRequestV2) | **POST** /api/rpc/oneway/{deviceId} | Send one-way RPC request (handleOneWayDeviceRPCRequestV2) | +| [**handleTwoWayDeviceRPCRequestV2**](#handleTwoWayDeviceRPCRequestV2) | **POST** /api/rpc/twoway/{deviceId} | Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) | @@ -76,11 +76,11 @@ Allows to query RPC calls for specific device using pagination. Available for u **String** -## handleOneWayDeviceRPCRequest +## handleOneWayDeviceRPCRequestV2 -> String handleOneWayDeviceRPCRequest(deviceId, body) +> String handleOneWayDeviceRPCRequestV2(deviceId, body) -Send one-way RPC request +Send one-way RPC request (handleOneWayDeviceRPCRequestV2) Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -97,11 +97,11 @@ Sends the one-way remote-procedure call (RPC) request to device. Sends the one-w **String** -## handleTwoWayDeviceRPCRequest +## handleTwoWayDeviceRPCRequestV2 -> String handleTwoWayDeviceRPCRequest(deviceId, body) +> String handleTwoWayDeviceRPCRequestV2(deviceId, body) -Send two-way RPC request +Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/ce/docs/RuleChainControllerApi.md b/ce/docs/RuleChainControllerApi.md index d399bac6..61ba4ecd 100644 --- a/ce/docs/RuleChainControllerApi.md +++ b/ce/docs/RuleChainControllerApi.md @@ -13,16 +13,16 @@ | [**getRuleChainOutputLabels**](#getRuleChainOutputLabels) | **GET** /api/ruleChain/{ruleChainId}/output/labels | Get Rule Chain output labels (getRuleChainOutputLabels) | | [**getRuleChainOutputLabelsUsage**](#getRuleChainOutputLabelsUsage) | **GET** /api/ruleChain/{ruleChainId}/output/labels/usage | Get output labels usage (getRuleChainOutputLabelsUsage) | | [**getRuleChains**](#getRuleChains) | **GET** /api/ruleChains | Get Rule Chains (getRuleChains) | -| [**getRuleChainsByIdsV2**](#getRuleChainsByIdsV2) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIdsV2) | +| [**getRuleChainsByIds**](#getRuleChainsByIds) | **GET** /api/ruleChains/list | Get Rule Chains By Ids (getRuleChainsByIds) | | [**importRuleChains**](#importRuleChains) | **POST** /api/ruleChains/import | Import Rule Chains | | [**isTbelEnabled**](#isTbelEnabled) | **GET** /api/ruleChain/tbelEnabled | Is TBEL script executor enabled | | [**saveRuleChain**](#saveRuleChain) | **POST** /api/ruleChain | Create Or Update Rule Chain (saveRuleChain) | -| [**saveRuleChain1**](#saveRuleChain1) | **POST** /api/ruleChain/device/default | Create Default Rule Chain | | [**saveRuleChainMetaData**](#saveRuleChainMetaData) | **POST** /api/ruleChain/metadata | Update Rule Chain Metadata | | [**setAutoAssignToEdgeRuleChain**](#setAutoAssignToEdgeRuleChain) | **POST** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) | +| [**setDeviceDefaultRuleChain**](#setDeviceDefaultRuleChain) | **POST** /api/ruleChain/device/default | Create Default Rule Chain (setDeviceDefaultRuleChain) | | [**setEdgeTemplateRootRuleChain**](#setEdgeTemplateRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/edgeTemplateRoot | Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain) | | [**setRootRuleChain**](#setRootRuleChain) | **POST** /api/ruleChain/{ruleChainId}/root | Set Root Rule Chain (setRootRuleChain) | -| [**testScript**](#testScript) | **POST** /api/ruleChain/testScript | Test Script function | +| [**testRuleChainScript**](#testRuleChainScript) | **POST** /api/ruleChain/testScript | Test Script function | | [**unassignRuleChainFromEdge**](#unassignRuleChainFromEdge) | **DELETE** /api/edge/{edgeId}/ruleChain/{ruleChainId} | Unassign rule chain from edge (unassignRuleChainFromEdge) | | [**unsetAutoAssignToEdgeRuleChain**](#unsetAutoAssignToEdgeRuleChain) | **DELETE** /api/ruleChain/{ruleChainId}/autoAssignToEdge | Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain) | @@ -252,11 +252,11 @@ Returns a page of Rule Chains owned by tenant. The rule chain object is lightwei **PageDataRuleChain** -## getRuleChainsByIdsV2 +## getRuleChainsByIds -> List getRuleChainsByIdsV2(ruleChainIds) +> List getRuleChainsByIds(ruleChainIds) -Get Rule Chains By Ids (getRuleChainsByIdsV2) +Get Rule Chains By Ids (getRuleChainsByIds) Requested rule chains must be owned by tenant which is performing the request. @@ -326,61 +326,61 @@ Create or update the Rule Chain. When creating Rule Chain, platform generates Ru **RuleChain** -## saveRuleChain1 +## saveRuleChainMetaData -> RuleChain saveRuleChain1(defaultRuleChainCreateRequest) +> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) -Create Default Rule Chain +Update Rule Chain Metadata -Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. +Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | +| **ruleChainMetaData** | **RuleChainMetaData** | | | +| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | ### Return type -**RuleChain** +**RuleChainMetaData** -## saveRuleChainMetaData +## setAutoAssignToEdgeRuleChain -> RuleChainMetaData saveRuleChainMetaData(ruleChainMetaData, updateRelated) +> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) -Update Rule Chain Metadata +Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) -Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. +Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainMetaData** | **RuleChainMetaData** | | | -| **updateRelated** | **Boolean** | Update related rule nodes. | [optional] [default to true] | +| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type -**RuleChainMetaData** +**RuleChain** -## setAutoAssignToEdgeRuleChain +## setDeviceDefaultRuleChain -> RuleChain setAutoAssignToEdgeRuleChain(ruleChainId) +> RuleChain setDeviceDefaultRuleChain(defaultRuleChainCreateRequest) -Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain) +Create Default Rule Chain (setDeviceDefaultRuleChain) -Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. Available for users with 'TENANT_ADMIN' authority. +Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **ruleChainId** | **String** | A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **defaultRuleChainCreateRequest** | **DefaultRuleChainCreateRequest** | | | ### Return type @@ -427,9 +427,9 @@ Makes the rule chain to be root rule chain. Updates previous root rule chain as **RuleChain** -## testScript +## testRuleChainScript -> com.fasterxml.jackson.databind.JsonNode testScript(body, scriptLang) +> com.fasterxml.jackson.databind.JsonNode testRuleChainScript(body, scriptLang) Test Script function diff --git a/ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md b/ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md new file mode 100644 index 00000000..47641ea3 --- /dev/null +++ b/ce/docs/RuleEngineComponentLifecycleEventRecipientsConfig.md @@ -0,0 +1,24 @@ + +# RuleEngineComponentLifecycleEventRecipientsConfig + +`org.thingsboard.client.model.RuleEngineComponentLifecycleEventRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/RuleEngineControllerApi.md b/ce/docs/RuleEngineControllerApi.md index b5997660..68f52a68 100644 --- a/ce/docs/RuleEngineControllerApi.md +++ b/ce/docs/RuleEngineControllerApi.md @@ -2,18 +2,18 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**handleRuleEngineRequest**](#handleRuleEngineRequest) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest1**](#handleRuleEngineRequest1) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest2**](#handleRuleEngineRequest2) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) | -| [**handleRuleEngineRequest3**](#handleRuleEngineRequest3) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequest) | +| [**handleRuleEngineRequestForEntity**](#handleRuleEngineRequestForEntity) | **POST** /api/rule-engine/{entityType}/{entityId} | Push entity message to the rule engine (handleRuleEngineRequestForEntity) | +| [**handleRuleEngineRequestForEntityWithQueueAndTimeout**](#handleRuleEngineRequestForEntityWithQueueAndTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout} | Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) | +| [**handleRuleEngineRequestForEntityWithTimeout**](#handleRuleEngineRequestForEntityWithTimeout) | **POST** /api/rule-engine/{entityType}/{entityId}/{timeout} | Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) | +| [**handleRuleEngineRequestForUser**](#handleRuleEngineRequestForUser) | **POST** /api/rule-engine/ | Push user message to the rule engine (handleRuleEngineRequestForUser) | -## handleRuleEngineRequest +## handleRuleEngineRequestForEntity -> String handleRuleEngineRequest(entityType, entityId, body) +> String handleRuleEngineRequestForEntity(entityType, entityId, body) -Push entity message to the rule engine (handleRuleEngineRequest) +Push entity message to the rule engine (handleRuleEngineRequestForEntity) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -31,13 +31,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest1 +## handleRuleEngineRequestForEntityWithQueueAndTimeout -> String handleRuleEngineRequest1(entityType, entityId, timeout, body) +> String handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body) -Push entity message with timeout to the rule engine (handleRuleEngineRequest) +Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -46,6 +46,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -54,13 +55,13 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest2 +## handleRuleEngineRequestForEntityWithTimeout -> String handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body) +> String handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body) -Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) +Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) -Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters @@ -69,7 +70,6 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | | **body** | **String** | | | @@ -78,11 +78,11 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ **String** -## handleRuleEngineRequest3 +## handleRuleEngineRequestForUser -> String handleRuleEngineRequest3(body) +> String handleRuleEngineRequestForUser(body) -Push user message to the rule engine (handleRuleEngineRequest) +Push user message to the rule engine (handleRuleEngineRequestForUser) Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). diff --git a/ce/docs/TaskProcessingFailureRecipientsConfig.md b/ce/docs/TaskProcessingFailureRecipientsConfig.md new file mode 100644 index 00000000..adf0cf8e --- /dev/null +++ b/ce/docs/TaskProcessingFailureRecipientsConfig.md @@ -0,0 +1,24 @@ + +# TaskProcessingFailureRecipientsConfig + +`org.thingsboard.client.model.TaskProcessingFailureRecipientsConfig` + +**Extends:** **NotificationRuleRecipientsConfig** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **targets** | **List\** | | | + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/TbResourceControllerApi.md b/ce/docs/TbResourceControllerApi.md index 075c8088..6c43de22 100644 --- a/ce/docs/TbResourceControllerApi.md +++ b/ce/docs/TbResourceControllerApi.md @@ -8,15 +8,15 @@ | [**downloadLwm2mResourceIfChanged**](#downloadLwm2mResourceIfChanged) | **GET** /api/resource/lwm2m/{resourceId}/download | Download LWM2M Resource (downloadLwm2mResourceIfChanged) | | [**downloadPkcs12ResourceIfChanged**](#downloadPkcs12ResourceIfChanged) | **GET** /api/resource/pkcs12/{resourceId}/download | Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged) | | [**downloadResource**](#downloadResource) | **GET** /api/resource/{resourceId}/download | Download Resource (downloadResource) | -| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResource) | +| [**downloadResourceIfChanged**](#downloadResourceIfChanged) | **GET** /api/resource/{resourceType}/{scope}/{key} | Download resource (downloadResourceIfChanged) | | [**getLwm2mListObjects**](#getLwm2mListObjects) | **GET** /api/resource/lwm2m | Get LwM2M Objects (getLwm2mListObjects) | | [**getLwm2mListObjectsPage**](#getLwm2mListObjectsPage) | **GET** /api/resource/lwm2m/page | Get LwM2M Objects (getLwm2mListObjectsPage) | | [**getResourceById**](#getResourceById) | **GET** /api/resource/{resourceId} | Get Resource (getResourceById) | | [**getResourceInfo**](#getResourceInfo) | **GET** /api/resource/{resourceType}/{scope}/{key}/info | Get resource info (getResourceInfo) | | [**getResourceInfoById**](#getResourceInfoById) | **GET** /api/resource/info/{resourceId} | Get Resource Info (getResourceInfoById) | | [**getResources**](#getResources) | **GET** /api/resource | Get Resource Infos (getResources) | -| [**getSystemOrTenantResourcesByIdsV2**](#getSystemOrTenantResourcesByIdsV2) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) | -| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getAllResources) | +| [**getSystemOrTenantResourcesByIds**](#getSystemOrTenantResourcesByIds) | **GET** /api/resource/list | Get Resource Infos by ids (getSystemOrTenantResourcesByIds) | +| [**getTenantResources**](#getTenantResources) | **GET** /api/resource/tenant | Get All Resource Infos (getTenantResources) | | [**saveResource**](#saveResource) | **POST** /api/resource | Create Or Update Resource (saveResource) | | [**updateResourceData**](#updateResourceData) | **PUT** /api/resource/{id}/data | updateResourceData | | [**updateResourceInfo**](#updateResourceInfo) | **PUT** /api/resource/{id}/info | updateResourceInfo | @@ -153,7 +153,7 @@ Download Resource based on the provided Resource Id. Available for users with ' > File downloadResourceIfChanged(resourceType, scope, key, ifNoneMatch) -Download resource (downloadResource) +Download resource (downloadResourceIfChanged) Download resource with a given type and key for the given scope Available for any authorized user. @@ -306,11 +306,11 @@ Returns a page of Resource Info objects owned by tenant or sysadmin. You can spe **PageDataTbResourceInfo** -## getSystemOrTenantResourcesByIdsV2 +## getSystemOrTenantResourcesByIds -> List getSystemOrTenantResourcesByIdsV2(resourceIds) +> List getSystemOrTenantResourcesByIds(resourceIds) -Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) +Get Resource Infos by ids (getSystemOrTenantResourcesByIds) ### Parameters @@ -328,7 +328,7 @@ Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) > PageDataTbResourceInfo getTenantResources(pageSize, page, textSearch, sortProperty, sortOrder) -Get All Resource Infos (getAllResources) +Get All Resource Infos (getTenantResources) Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. diff --git a/ce/docs/TbResourceExportData.md b/ce/docs/TbResourceExportData.md new file mode 100644 index 00000000..22a0bee1 --- /dev/null +++ b/ce/docs/TbResourceExportData.md @@ -0,0 +1,23 @@ + +# TbResourceExportData + +`org.thingsboard.client.model.TbResourceExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/ce/docs/TenantControllerApi.md b/ce/docs/TenantControllerApi.md index 326cbaa0..2067ac89 100644 --- a/ce/docs/TenantControllerApi.md +++ b/ce/docs/TenantControllerApi.md @@ -7,7 +7,7 @@ | [**getTenantInfoById**](#getTenantInfoById) | **GET** /api/tenant/info/{tenantId} | Get Tenant Info (getTenantInfoById) | | [**getTenantInfos**](#getTenantInfos) | **GET** /api/tenantInfos | Get Tenants Info (getTenants) | | [**getTenants**](#getTenants) | **GET** /api/tenants | Get Tenants (getTenants) | -| [**getTenantsByIdsV2**](#getTenantsByIdsV2) | **GET** /api/tenants/list | Get Tenants list (getTenantsByIdsV2) | +| [**getTenantsByIds**](#getTenantsByIds) | **GET** /api/tenants/list | Get Tenants list (getTenantsByIds) | | [**saveTenant**](#saveTenant) | **POST** /api/tenant | Create Or update Tenant (saveTenant) | @@ -120,11 +120,11 @@ Returns a page of tenants registered in the platform. You can specify parameters **PageDataTenant** -## getTenantsByIdsV2 +## getTenantsByIds -> List getTenantsByIdsV2(tenantIds) +> List getTenantsByIds(tenantIds) -Get Tenants list (getTenantsByIdsV2) +Get Tenants list (getTenantsByIds) ### Parameters diff --git a/ce/docs/TwoFactorAuthConfigControllerApi.md b/ce/docs/TwoFactorAuthConfigControllerApi.md index 3bc7c7b9..4510d307 100644 --- a/ce/docs/TwoFactorAuthConfigControllerApi.md +++ b/ce/docs/TwoFactorAuthConfigControllerApi.md @@ -5,7 +5,7 @@ | [**deleteTwoFaAccountConfig**](#deleteTwoFaAccountConfig) | **DELETE** /api/2fa/account/config | Delete 2FA account config (deleteTwoFaAccountConfig) | | [**generateTwoFaAccountConfig**](#generateTwoFaAccountConfig) | **POST** /api/2fa/account/config/generate | Generate 2FA account config (generateTwoFaAccountConfig) | | [**getAccountTwoFaSettings**](#getAccountTwoFaSettings) | **GET** /api/2fa/account/settings | Get account 2FA settings (getAccountTwoFaSettings) | -| [**getAvailableTwoFaProviders1**](#getAvailableTwoFaProviders1) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderTypes**](#getAvailableTwoFaProviderTypes) | **GET** /api/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderTypes) | | [**getPlatformTwoFaSettings**](#getPlatformTwoFaSettings) | **GET** /api/2fa/settings | Get platform 2FA settings (getPlatformTwoFaSettings) | | [**savePlatformTwoFaSettings**](#savePlatformTwoFaSettings) | **POST** /api/2fa/settings | Save platform 2FA settings (savePlatformTwoFaSettings) | | [**submitTwoFaAccountConfig**](#submitTwoFaAccountConfig) | **POST** /api/2fa/account/config/submit | Submit 2FA account config (submitTwoFaAccountConfig) | @@ -67,11 +67,11 @@ Get user's account 2FA configuration. Configuration contains configs for differe **AccountTwoFaSettings** -## getAvailableTwoFaProviders1 +## getAvailableTwoFaProviderTypes -> List getAvailableTwoFaProviders1() +> List getAvailableTwoFaProviderTypes() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderTypes) Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. diff --git a/ce/docs/TwoFactorAuthControllerApi.md b/ce/docs/TwoFactorAuthControllerApi.md index 2030e77e..c1597f9b 100644 --- a/ce/docs/TwoFactorAuthControllerApi.md +++ b/ce/docs/TwoFactorAuthControllerApi.md @@ -4,7 +4,7 @@ |------------- | ------------- | -------------| | [**authenticateByTwoFaConfigurationToken**](#authenticateByTwoFaConfigurationToken) | **POST** /api/auth/2fa/login | Get regular token pair after successfully configuring 2FA | | [**checkTwoFaVerificationCode**](#checkTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/check | Check 2FA verification code (checkTwoFaVerificationCode) | -| [**getAvailableTwoFaProviders**](#getAvailableTwoFaProviders) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviders) | +| [**getAvailableTwoFaProviderInfos**](#getAvailableTwoFaProviderInfos) | **GET** /api/auth/2fa/providers | Get available 2FA providers (getAvailableTwoFaProviderInfos) | | [**requestTwoFaVerificationCode**](#requestTwoFaVerificationCode) | **POST** /api/auth/2fa/verification/send | Request 2FA verification code (requestTwoFaVerificationCode) | @@ -43,11 +43,11 @@ Checks 2FA verification code, and if it is correct the method returns a regular **JwtPair** -## getAvailableTwoFaProviders +## getAvailableTwoFaProviderInfos -> List getAvailableTwoFaProviders() +> List getAvailableTwoFaProviderInfos() -Get available 2FA providers (getAvailableTwoFaProviders) +Get available 2FA providers (getAvailableTwoFaProviderInfos) Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` diff --git a/ce/docs/UserControllerApi.md b/ce/docs/UserControllerApi.md index 4ba86801..0c949cda 100644 --- a/ce/docs/UserControllerApi.md +++ b/ce/docs/UserControllerApi.md @@ -2,26 +2,26 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**deleteGeneralUserSettings**](#deleteGeneralUserSettings) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteGeneralUserSettings) | | [**deleteUser**](#deleteUser) | **DELETE** /api/user/{userId} | Delete User (deleteUser) | -| [**deleteUserSettings**](#deleteUserSettings) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings (deleteUserSettings) | -| [**deleteUserSettings1**](#deleteUserSettings1) | **DELETE** /api/user/settings/{paths} | Delete user settings (deleteUserSettings) | +| [**deleteUserSettingsByType**](#deleteUserSettingsByType) | **DELETE** /api/user/settings/{type}/{paths} | Delete user settings by type (deleteUserSettingsByType) | | [**findUsersByQuery**](#findUsersByQuery) | **GET** /api/users/info | Find users by query (findUsersByQuery) | | [**getActivationLink**](#getActivationLink) | **GET** /api/user/{userId}/activationLink | Get activation link (getActivationLink) | | [**getActivationLinkInfo**](#getActivationLinkInfo) | **GET** /api/user/{userId}/activationLinkInfo | Get activation link info (getActivationLinkInfo) | | [**getCustomerUsers**](#getCustomerUsers) | **GET** /api/customer/{customerId}/users | Get Customer Users (getCustomerUsers) | -| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getUserSettings) | +| [**getGeneralUserSettings**](#getGeneralUserSettings) | **GET** /api/user/settings/general | Get user settings (getGeneralUserSettings) | | [**getMobileSession**](#getMobileSession) | **GET** /api/user/mobile/session | getMobileSession | | [**getTenantAdmins**](#getTenantAdmins) | **GET** /api/tenant/{tenantId}/users | Get Tenant Users (getTenantAdmins) | | [**getUserById**](#getUserById) | **GET** /api/user/{userId} | Get User (getUserById) | -| [**getUserDashboardsInfo**](#getUserDashboardsInfo) | **GET** /api/user/dashboards | Get information about last visited and starred dashboards (getLastVisitedDashboards) | +| [**getUserDashboardsInfo**](#getUserDashboardsInfo) | **GET** /api/user/dashboards | Get information about last visited and starred dashboards (getUserDashboardsInfo) | | [**getUserSettings**](#getUserSettings) | **GET** /api/user/settings/{type} | Get user settings (getUserSettings) | | [**getUserToken**](#getUserToken) | **GET** /api/user/{userId}/token | Get User Token (getUserToken) | | [**getUsers**](#getUsers) | **GET** /api/users | Get Users (getUsers) | -| [**getUsersByIdsV2**](#getUsersByIdsV2) | **GET** /api/users/list | Get Users By Ids (getUsersByIdsV2) | +| [**getUsersByIds**](#getUsersByIds) | **GET** /api/users/list | Get Users By Ids (getUsersByIds) | | [**getUsersForAssign**](#getUsersForAssign) | **GET** /api/users/assign/{alarmId} | Get usersForAssign (getUsersForAssign) | | [**isUserTokenAccessEnabled**](#isUserTokenAccessEnabled) | **GET** /api/user/tokenAccessEnabled | Check Token Access Enabled (isUserTokenAccessEnabled) | -| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (saveUserSettings) | -| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (saveUserSettings) | +| [**putGeneralUserSettings**](#putGeneralUserSettings) | **PUT** /api/user/settings/general | Update user settings (putGeneralUserSettings) | +| [**putUserSettings**](#putUserSettings) | **PUT** /api/user/settings/{type} | Update user settings (putUserSettings) | | [**removeMobileSession**](#removeMobileSession) | **DELETE** /api/user/mobile/session | removeMobileSession | | [**reportUserDashboardAction**](#reportUserDashboardAction) | **GET** /api/user/dashboards/{dashboardId}/{action} | Report action of User over the dashboard (reportUserDashboardAction) | | [**saveMobileSession**](#saveMobileSession) | **POST** /api/user/mobile/session | saveMobileSession | @@ -32,52 +32,51 @@ -## deleteUser +## deleteGeneralUserSettings -> deleteUser(userId) +> deleteGeneralUserSettings(paths) -Delete User (deleteUser) +Delete user settings (deleteGeneralUserSettings) -Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **paths** | **String** | paths | | ### Return type null (empty response body) -## deleteUserSettings +## deleteUser -> deleteUserSettings(paths, type) +> deleteUser(userId) -Delete user settings (deleteUserSettings) +Delete User (deleteUser) -Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter +Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **paths** | **String** | paths | | -| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | +| **userId** | **String** | A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | ### Return type null (empty response body) -## deleteUserSettings1 +## deleteUserSettingsByType -> deleteUserSettings1(paths) +> deleteUserSettingsByType(paths, type) -Delete user settings (deleteUserSettings) +Delete user settings by type (deleteUserSettingsByType) Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter @@ -87,6 +86,7 @@ Delete user settings by specifying list of json element xpaths. Example: to de | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **paths** | **String** | paths | | +| **type** | **String** | Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". | | ### Return type @@ -186,7 +186,7 @@ Returns a page of users owned by customer. You can specify parameters to filter > com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() -Get user settings (getUserSettings) +Get user settings (getGeneralUserSettings) Fetch the User settings based on authorized user. @@ -262,7 +262,7 @@ Fetch the User object based on the provided User Id. If the user has the authori > UserDashboardsInfo getUserDashboardsInfo() -Get information about last visited and starred dashboards (getLastVisitedDashboards) +Get information about last visited and starred dashboards (getUserDashboardsInfo) Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -335,11 +335,11 @@ Returns a page of users owned by tenant or customer. The scope depends on author **PageDataUser** -## getUsersByIdsV2 +## getUsersByIds -> List getUsersByIdsV2(userIds) +> List getUsersByIds(userIds) -Get Users By Ids (getUsersByIdsV2) +Get Users By Ids (getUsersByIds) Requested users must be owned by tenant or assigned to customer which user is performing the request. @@ -397,7 +397,7 @@ Checks that the system is configured to allow administrators to impersonate them > putGeneralUserSettings(body) -Update user settings (saveUserSettings) +Update user settings (putGeneralUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} @@ -417,7 +417,7 @@ null (empty response body) > putUserSettings(type, body) -Update user settings (saveUserSettings) +Update user settings (putUserSettings) Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} diff --git a/ce/docs/WidgetTypeControllerApi.md b/ce/docs/WidgetTypeControllerApi.md index e707a1cf..1527d21d 100644 --- a/ce/docs/WidgetTypeControllerApi.md +++ b/ce/docs/WidgetTypeControllerApi.md @@ -4,9 +4,9 @@ |------------- | ------------- | -------------| | [**deleteWidgetType**](#deleteWidgetType) | **DELETE** /api/widgetType/{widgetTypeId} | Delete widget type (deleteWidgetType) | | [**getBundleWidgetTypeFqns**](#getBundleWidgetTypeFqns) | **GET** /api/widgetTypeFqns | Get all Widget type fqns for specified Bundle (getBundleWidgetTypeFqns) | +| [**getBundleWidgetTypes**](#getBundleWidgetTypes) | **GET** /api/widgetsBundles/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getBundleWidgetTypesDetails**](#getBundleWidgetTypesDetails) | **GET** /api/widgetTypesDetails | Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) | | [**getBundleWidgetTypesInfos**](#getBundleWidgetTypesInfos) | **GET** /api/widgetTypesInfos | Get Widget Type Info objects (getBundleWidgetTypesInfos) | -| [**getBundleWidgetTypesV2**](#getBundleWidgetTypesV2) | **GET** /api/widgetsBundles/{widgetsBundleId}/widgetTypes | Get all Widget types for specified Bundle (getBundleWidgetTypes) | | [**getWidgetType**](#getWidgetType) | **GET** /api/widgetType | Get Widget Type (getWidgetType) | | [**getWidgetTypeById**](#getWidgetTypeById) | **GET** /api/widgetType/{widgetTypeId} | Get Widget Type Details (getWidgetTypeById) | | [**getWidgetTypeInfoById**](#getWidgetTypeInfoById) | **GET** /api/widgetTypeInfo/{widgetTypeId} | Get Widget Type Info (getWidgetTypeInfoById) | @@ -55,6 +55,26 @@ Returns an array of Widget Type fqns that belong to specified Widget Bundle. Av **List** +## getBundleWidgetTypes + +> List getBundleWidgetTypes(widgetsBundleId) + +Get all Widget types for specified Bundle (getBundleWidgetTypes) + +Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **widgetsBundleId** | **String** | Widget Bundle Id | | + +### Return type + +**List** + + ## getBundleWidgetTypesDetails > List getBundleWidgetTypesDetails(widgetsBundleId, includeResources) @@ -104,26 +124,6 @@ Get the Widget Type Info objects based on the provided parameters. Widget Type I **PageDataWidgetTypeInfo** -## getBundleWidgetTypesV2 - -> List getBundleWidgetTypesV2(widgetsBundleId) - -Get all Widget types for specified Bundle (getBundleWidgetTypes) - -Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **widgetsBundleId** | **String** | Widget Bundle Id | | - -### Return type - -**List** - - ## getWidgetType > WidgetType getWidgetType(fqn) diff --git a/ce/docs/WidgetsBundleControllerApi.md b/ce/docs/WidgetsBundleControllerApi.md index 07aceec3..fa7df909 100644 --- a/ce/docs/WidgetsBundleControllerApi.md +++ b/ce/docs/WidgetsBundleControllerApi.md @@ -3,10 +3,10 @@ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**deleteWidgetsBundle**](#deleteWidgetsBundle) | **DELETE** /api/widgetsBundle/{widgetsBundleId} | Delete widgets bundle (deleteWidgetsBundle) | +| [**getAllWidgetsBundles**](#getAllWidgetsBundles) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getAllWidgetsBundles) | | [**getWidgetsBundleById**](#getWidgetsBundleById) | **GET** /api/widgetsBundle/{widgetsBundleId} | Get Widget Bundle (getWidgetsBundleById) | | [**getWidgetsBundles**](#getWidgetsBundles) | **GET** /api/widgetsBundles | Get Widget Bundles (getWidgetsBundles) | | [**getWidgetsBundlesList**](#getWidgetsBundlesList) | **GET** /api/widgetsBundles/list | Get Widgets Bundles By Ids (getWidgetsBundlesList) | -| [**getWidgetsBundlesV2**](#getWidgetsBundlesV2) | **GET** /api/widgetsBundles/all | Get all Widget Bundles (getWidgetsBundlesV2) | | [**saveWidgetsBundle**](#saveWidgetsBundle) | **POST** /api/widgetsBundle | Create Or Update Widget Bundle (saveWidgetsBundle) | | [**updateWidgetsBundleWidgetFqns**](#updateWidgetsBundleWidgetFqns) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns | Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns) | | [**updateWidgetsBundleWidgetTypes**](#updateWidgetsBundleWidgetTypes) | **POST** /api/widgetsBundle/{widgetsBundleId}/widgetTypes | Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes) | @@ -33,6 +33,19 @@ Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause null (empty response body) +## getAllWidgetsBundles + +> List getAllWidgetsBundles() + +Get all Widget Bundles (getAllWidgetsBundles) + +Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + +### Return type + +**List** + + ## getWidgetsBundleById > WidgetsBundle getWidgetsBundleById(widgetsBundleId, inlineImages) @@ -101,19 +114,6 @@ Requested widgets bundles must be system level or owned by tenant of the user wh **List** -## getWidgetsBundlesV2 - -> List getWidgetsBundlesV2() - -Get all Widget Bundles (getWidgetsBundlesV2) - -Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - -### Return type - -**List** - - ## saveWidgetsBundle > WidgetsBundle saveWidgetsBundle(widgetsBundle) diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index f265dba6..944c3d8c 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -73,10 +73,6 @@ "name": "dashboard-controller", "description": "Dashboard Controller" }, - { - "name": "device-api-controller", - "description": "Device Api Controller" - }, { "name": "device-connectivity-controller", "description": "Device Connectivity Controller" @@ -382,10 +378,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -525,10 +521,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -651,10 +647,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -786,10 +782,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -921,10 +917,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1056,10 +1052,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1199,10 +1195,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1214,7 +1210,7 @@ ], "summary": "Redirect user to mail provider login page. ", "description": "After user logged in and provided accessprovider sends authorization code to specified redirect uri.)", - "operationId": "getAuthorizationUrl", + "operationId": "getMailOAuth2AuthorizationUrl", "responses": { "200": { "description": "OK", @@ -1334,10 +1330,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1347,8 +1343,8 @@ "tags": [ "admin-controller" ], - "summary": "codeProcessingUrl", - "operationId": "codeProcessingUrl", + "summary": "handleMailOAuth2Callback", + "operationId": "handleMailOAuth2Callback", "parameters": [ { "name": "code", @@ -1479,10 +1475,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1614,10 +1610,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -1749,10 +1745,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -1892,10 +1888,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2018,10 +2014,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2156,10 +2152,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2291,10 +2287,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2425,10 +2421,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2560,10 +2556,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -2703,10 +2699,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2848,10 +2844,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -2986,10 +2982,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3124,10 +3120,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3270,10 +3266,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3405,10 +3401,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3540,10 +3536,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -3734,10 +3730,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -3877,10 +3873,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4022,10 +4018,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4170,10 +4166,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4316,10 +4312,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4508,10 +4504,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -4663,10 +4659,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4811,10 +4807,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -4957,10 +4953,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5152,10 +5148,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5298,10 +5294,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5477,10 +5473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5623,10 +5619,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -5767,10 +5763,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -5913,10 +5909,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6059,10 +6055,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6214,10 +6210,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6360,10 +6356,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6373,9 +6369,9 @@ "tags": [ "alarm-controller" ], - "summary": "Get Alarms (getAlarms)", + "summary": "Get Alarms (getAlarmsByEntity)", "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAlarms", + "operationId": "getAlarmsByEntity", "parameters": [ { "name": "entityType", @@ -6645,10 +6641,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -6912,10 +6908,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7207,10 +7203,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7484,10 +7480,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7498,7 +7494,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": { @@ -7629,10 +7625,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7768,10 +7764,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -7925,10 +7921,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8081,10 +8077,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8284,10 +8280,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8462,10 +8458,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8607,10 +8603,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8753,10 +8749,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -8892,10 +8888,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9038,10 +9034,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9175,10 +9171,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9327,10 +9323,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -9338,9 +9334,9 @@ "tags": [ "asset-controller" ], - "summary": "Find related assets (findByQuery)", + "summary": "Find related assets (findAssetsByQuery)", "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findByQuery_4", + "operationId": "findAssetsByQuery", "requestBody": { "content": { "application/json": { @@ -9473,10 +9469,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9619,10 +9615,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9765,10 +9761,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -9920,10 +9916,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10142,10 +10138,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10355,10 +10351,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10510,10 +10506,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -10663,10 +10659,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -10896,10 +10892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11042,10 +11038,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11255,10 +11251,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11459,10 +11455,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11604,10 +11600,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11754,10 +11750,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -11909,10 +11905,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -12046,10 +12042,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12192,10 +12188,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12327,10 +12323,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12473,10 +12469,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12667,10 +12663,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -12680,9 +12676,9 @@ "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profiles By Ids (getAssetProfilesByIdsV2)", + "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n", - "operationId": "getAssetProfilesByIdsV2", + "operationId": "getAssetProfilesByIds", "parameters": [ { "name": "assetProfileIds", @@ -12819,10 +12815,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13013,10 +13009,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13238,10 +13234,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13472,10 +13468,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13715,10 +13711,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -13949,10 +13945,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14094,10 +14090,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14222,10 +14218,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -14357,10 +14353,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15310,10 +15306,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15325,7 +15321,7 @@ ], "summary": "Test Script expression", "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript_1", + "operationId": "testCalculatedFieldScript", "requestBody": { "description": "Test calculated field TBEL expression.", "content": { @@ -15456,10 +15452,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15601,10 +15597,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -15737,10 +15733,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15882,10 +15878,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -15895,9 +15891,9 @@ "tags": [ "calculated-field-controller" ], - "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2)", + "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", "description": "Fetch the Calculated Fields based on the provided Entity Id.", - "operationId": "getCalculatedFieldsByEntityIdV2", + "operationId": "getCalculatedFieldsByEntityId", "parameters": [ { "name": "entityType", @@ -16101,10 +16097,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16340,10 +16336,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16528,10 +16524,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16674,10 +16670,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -16839,10 +16835,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17008,10 +17004,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17186,10 +17182,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17332,10 +17328,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -17469,10 +17465,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17615,10 +17611,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17761,10 +17757,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17956,10 +17952,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -17969,9 +17965,9 @@ "tags": [ "customer-controller" ], - "summary": "Get customers by Customer Ids (getCustomersByIdsV2)", + "summary": "Get customers by Customer Ids (getCustomersByIds)", "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomersByIdsV2", + "operationId": "getCustomersByIds", "parameters": [ { "name": "customerIds", @@ -18108,10 +18104,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18254,10 +18250,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18400,10 +18396,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -18544,10 +18540,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -18699,10 +18695,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -18852,10 +18848,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19062,10 +19058,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19218,10 +19214,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19356,10 +19352,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19491,10 +19487,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19637,10 +19633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19774,10 +19770,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -19911,10 +19907,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20067,10 +20063,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -20204,10 +20200,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20363,10 +20359,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20523,10 +20519,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20683,10 +20679,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20696,9 +20692,9 @@ "tags": [ "dashboard-controller" ], - "summary": "Get dashboards by Dashboard Ids (getDashboardsByIdsV2)", + "summary": "Get dashboards by Dashboard Ids (getDashboardsByIds)", "description": "Returns a list of DashboardInfo objects based on the provided ids. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDashboardsByIdsV2", + "operationId": "getDashboardsByIds", "parameters": [ { "name": "dashboardIds", @@ -20835,10 +20831,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -20988,10 +20984,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -21139,10 +21135,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21340,10 +21336,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21475,10 +21471,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -21611,10 +21607,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21626,7 +21622,7 @@ ], "summary": "Get Tenant Dashboards (getTenantDashboards)", "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDashboards_1", + "operationId": "getTenantDashboards", "parameters": [ { "name": "pageSize", @@ -21812,10 +21808,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -21825,9 +21821,9 @@ "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboards)", + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDashboards", + "operationId": "getTenantDashboardsByTenantId", "parameters": [ { "name": "tenantId", @@ -22013,183 +22009,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" @@ -22200,9 +22040,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } @@ -22312,44 +22153,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}" + } } } } @@ -22366,7 +22220,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -22459,46 +22313,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" } } } @@ -22608,44 +22460,43 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/claim": { - "post": { + "/api/customer/device/{deviceId}": { + "delete": { "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", - "operationId": "claimDevice", + "summary": "Unassign device from customer (unassignDeviceFromCustomer)", + "description": "Clears assignment of the device to customer. Customer will not be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignDeviceFromCustomer", "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": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Device" } } } @@ -22662,7 +22513,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -22755,68 +22606,45 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/firmware": { - "get": { + "/api/customer/device/{deviceName}/claim": { + "post": { "tags": [ - "device-api-controller" + "device-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", + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority.", + "operationId": "claimDevice", "parameters": [ { - "name": "deviceToken", + "name": "deviceName", "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.", + "description": "Unique name of the device which is going to be claimed", "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 - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -22840,7 +22668,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -22933,37 +22761,32 @@ } } } - } - } - }, - "/api/v1/{deviceToken}/rpc": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { "tags": [ - "device-api-controller" + "device-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", + "summary": "Reclaim device (reClaimDevice)", + "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.", + "operationId": "reClaimDevice", "parameters": [ { - "name": "deviceToken", + "name": "deviceName", "in": "path", - "description": "Your device access token.", + "description": "Unique name of the device which is going to be reclaimed", "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": { @@ -23082,64 +22905,64 @@ } } } - } - }, + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/customer/public/device/{deviceId}": { "post": { "tags": [ - "device-api-controller" + "device-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", + "summary": "Make device publicly available (assignDeviceToPublicCustomer)", + "description": "Device will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the device.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToPublicCustomer", "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": "The RPC request JSON", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "RPC request to server was sent to Rule Engine.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Device" } } } }, "400": { - "description": "Invalid structure of the request.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload too large.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } @@ -23228,75 +23051,73 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/rpc/{requestId}": { + "/api/customer/{customerId}/device/{deviceId}": { "post": { "tags": [ - "device-api-controller" + "device-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", + "summary": "Assign device to customer (assignDeviceToCustomer)", + "description": "Creates assignment of the device to customer. Customer will be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToCustomer", "parameters": [ { - "name": "deviceToken", + "name": "customerId", "in": "path", - "description": "Your device access token.", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "requestId", + "name": "deviceId", "in": "path", - "description": "RPC request id from the incoming RPC request", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Device" } } } }, "400": { - "description": "Invalid structure of the request.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload is too large.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } @@ -23385,65 +23206,118 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/software": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ - "device-api-controller" + "device-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", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of devices info 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. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerDeviceInfos", "parameters": [ { - "name": "deviceToken", + "name": "customerId", "in": "path", - "description": "Your device access token.", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "title", + "name": "pageSize", "in": "query", - "description": "Title of the software, corresponds to the value of 'sw_title' attribute.", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "version", + "name": "page", "in": "query", - "description": "Version of the software, corresponds to the value of 'sw_version' attribute.", + "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": "size", + "name": "deviceProfileId", "in": "query", - "description": "Size of the chunk. Optional. Omit to download the entire file without using chunks.", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { - "type": "integer", - "format": "int32", - "default": 0 + "type": "string" } }, { - "name": "chunk", + "name": "active", "in": "query", - "description": "Index of the chunk. Optional. Omit to download the entire file without using chunks.", + "description": "A boolean value representing the device active flag.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "default": 0 + "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, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -23453,7 +23327,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -23563,45 +23437,110 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/v1/{deviceToken}/telemetry": { - "post": { + "/api/customer/{customerId}/devices": { + "get": { "tags": [ - "device-api-controller" + "device-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", + "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.", + "operationId": "getCustomerDevices", "parameters": [ { - "name": "deviceToken", + "name": "customerId", "in": "path", - "description": "Your device access token.", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string" - } + }, + { + "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": "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": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -23618,7 +23557,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -23711,36 +23650,84 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { - "get": { + "/api/device": { + "post": { "tags": [ - "device-connectivity-controller" + "device-controller" ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", + "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.", + "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": "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", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/Device" } } } @@ -23757,7 +23744,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -23853,54 +23840,71 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device-connectivity/{deviceId}": { - "get": { + "/api/device-with-credentials": { + "post": { "tags": [ - "device-connectivity-controller" + "device-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", + "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\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \"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.", + "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": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "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/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}" - } + "$ref": "#/components/schemas/Device" } } } @@ -23917,7 +23921,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -24013,41 +24017,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device-connectivity/{protocol}/certificate/download": { - "get": { + "/api/device/bulk_import": { + "post": { "tags": [ - "device-connectivity-controller" + "device-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" + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -24064,7 +24066,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -24160,40 +24162,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/device/{deviceId}": { - "delete": { + "/api/device/credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Unassign device from customer (unassignDeviceFromCustomer)", - "description": "Clears assignment of the device to customer. Customer will not be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignDeviceFromCustomer", - "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" + "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": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -24210,7 +24211,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -24306,49 +24307,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/device/{deviceName}/claim": { - "post": { + "/api/device/info/{deviceId}": { + "get": { "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.", - "operationId": "claimDevice_1", + "summary": "Get Device Info (getDeviceInfoById)", + "description": "Fetch the Device Info object based on the provided Device Id. 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. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceInfoById", "parameters": [ { - "name": "deviceName", + "name": "deviceId", "in": "path", - "description": "Unique name of the device which is going to be claimed", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClaimRequest" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/DeviceInfo" } } } @@ -24365,7 +24357,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24461,38 +24453,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/device/types": { + "get": { "tags": [ "device-controller" ], - "summary": "Reclaim device (reClaimDevice)", - "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.", - "operationId": "reClaimDevice", - "parameters": [ - { - "name": "deviceName", - "in": "path", - "description": "Unique name of the device which is going to be reclaimed", - "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": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -24603,24 +24589,25 @@ } } }, + "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/public/device/{deviceId}": { - "post": { + "/api/device/{deviceId}": { + "get": { "tags": [ "device-controller" ], - "summary": "Make device publicly available (assignDeviceToPublicCustomer)", - "description": "Device will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the device.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToPublicCustomer", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. If the user has the authority of 'TENANT_ADMIN', 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": "getDeviceById", "parameters": [ { "name": "deviceId", @@ -24655,7 +24642,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24751,32 +24738,21 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/customer/{customerId}/device/{deviceId}": { - "post": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Assign device to customer (assignDeviceToCustomer)", - "description": "Creates assignment of the device to customer. Customer will be able to query device afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToCustomer", + "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' authority.", + "operationId": "deleteDevice", "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": "deviceId", "in": "path", @@ -24789,14 +24765,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -24810,7 +24779,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24906,116 +24875,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/deviceInfos": { + "/api/device/{deviceId}/credentials": { "get": { "tags": [ "device-controller" ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of devices info 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. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerDeviceInfos", + "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.", + "operationId": "getDeviceCredentialsByDeviceId", "parameters": [ { - "name": "customerId", + "name": "deviceId", "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", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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": "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, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -25024,7 +24908,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -25137,97 +25021,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/devices": { + "/api/devices": { "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.", - "operationId": "getCustomerDevices", + "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.", + "operationId": "getDevicesByIds", "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": "deviceIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of devices ids, separated by comma ','", "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" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -25237,7 +25057,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -25350,69 +25173,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/device": { + }, "post": { "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.", - "operationId": "saveDevice", - "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": "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" - } - } - ], + "summary": "Find related devices (findDevicesByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findDevicesByQuery", "requestBody": { - "description": "A JSON value representing the device.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/DeviceSearchQuery" } } }, @@ -25424,7 +25203,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -25537,71 +25319,54 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device-with-credentials": { - "post": { + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { + "get": { "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\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"Access token\"\u003C/b\u003E with \u003Cb\u003Edevice profile default\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"X509\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\nNote: \u003Cb\u003EcredentialsId\u003C/b\u003E - format \u003Cb\u003ESha3Hash\u003C/b\u003E, \u003Cb\u003EcertificateValue\u003C/b\u003E - format \u003Cb\u003EPEM\u003C/b\u003E (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \u003Cb\u003E\"MQTT_BASIC\"\u003C/b\u003E with \u003Cb\u003Edevice profile ID\u003C/b\u003E below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of \u003Cb\u003ELwM2M\u003C/b\u003E device and \u003Cb\u003ERPK\u003C/b\u003E credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -\u003E Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDeviceWithCredentials_1", + "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.", + "operationId": "countByDeviceProfileAndEmptyOtaPackage", "parameters": [ { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, "schema": { "type": "string", - "default": "_" + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] } }, { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, + "name": "deviceProfileId", + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "integer", + "format": "int64" } } } @@ -25618,7 +25383,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -25714,39 +25479,49 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device/bulk_import": { + "/api/edge/{edgeId}/device/{deviceId}": { "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.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "processDevicesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Assign device to edge (assignDeviceToEdge)", + "description": "Creates assignment of an existing device 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 device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once device will be delivered to edge service, it's going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignDeviceToEdge", + "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": "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/BulkImportResultDevice" + "$ref": "#/components/schemas/Device" } } } @@ -25859,39 +25634,47 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/device/credentials": { - "post": { + }, + "delete": { "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" - } + "summary": "Unassign device from edge (unassignDeviceFromEdge)", + "description": "Clears assignment of the device 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 device (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 device locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignDeviceFromEdge", + "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": "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/DeviceCredentials" + "$ref": "#/components/schemas/Device" } } } @@ -25908,7 +25691,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -26004,31 +25787,136 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/device/info/{deviceId}": { + "/api/edge/{edgeId}/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get Device Info (getDeviceInfoById)", - "description": "Fetch the Device Info object based on the provided Device Id. 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. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceInfoById", + "summary": "Get devices assigned to edge (getEdgeDevices)", + "description": "Returns a page of devices assigned to 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. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeDevices", "parameters": [ { - "name": "deviceId", + "name": "edgeId", "in": "path", - "description": "A string value representing the device 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": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Devices with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Devices with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -26037,7 +25925,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceInfo" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -26150,2193 +26038,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/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. If the user has the authority of 'TENANT_ADMIN', 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": "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" - } - } - ], - "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 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": [] - } - ] - }, - "delete": { - "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' authority.", - "operationId": "deleteDevice", - "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" - }, - "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/{deviceId}/credentials": { - "get": { - "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.", - "operationId": "getDeviceCredentialsByDeviceId", - "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/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 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/devices": { - "get": { - "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.", - "operationId": "getDevicesByIds", - "parameters": [ - { - "name": "deviceIds", - "in": "query", - "description": "A list of devices ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$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 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": [] - } - ] - }, - "post": { - "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.", - "operationId": "findByQuery_3", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$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/devices/count/{otaPackageType}/{deviceProfileId}": { - "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.", - "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" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int64" - } - } - } - }, - "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/edge/{edgeId}/device/{deviceId}": { - "post": { - "tags": [ - "device-controller" - ], - "summary": "Assign device to edge (assignDeviceToEdge)", - "description": "Creates assignment of an existing device 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 device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once device will be delivered to edge service, it's going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignDeviceToEdge", - "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": "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/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": [] - } - ] - }, - "delete": { - "tags": [ - "device-controller" - ], - "summary": "Unassign device from edge (unassignDeviceFromEdge)", - "description": "Clears assignment of the device 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 device (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 device locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignDeviceFromEdge", - "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": "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/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 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/edge/{edgeId}/devices": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get devices assigned to edge (getEdgeDevices)", - "description": "Returns a page of devices assigned to 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. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeDevices", - "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", - "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": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "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, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Devices with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Devices with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" - } - } - } - }, - "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/tenant/device": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Tenant Device (getTenantDeviceByName)", - "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.", - "operationId": "getTenantDeviceByName", - "parameters": [ - { - "name": "deviceName", - "in": "query", - "description": "A string value representing the Device name.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "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 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/tenant/deviceInfos": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Tenant Device Infos (getTenantDeviceInfos)", - "description": "Returns a page of devices 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 Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDeviceInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "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, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" - } - } - } - }, - "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/tenant/devices": { - "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.", - "operationId": "getTenantDevices", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "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": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataDevice" - } - } - } - }, - "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/tenant/{tenantId}/device/{deviceId}": { - "post": { + "/api/tenant/device": { + "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.", - "operationId": "assignDeviceToTenant", + "summary": "Get Tenant Device (getTenantDeviceByName)", + "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.", + "operationId": "getTenantDeviceByName", "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": "deviceName", + "in": "query", + "description": "A string value representing the Device name.", "required": true, "schema": { "type": "string" @@ -28366,7 +26088,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -28462,175 +26184,106 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile": { - "post": { + "/api/tenant/deviceInfos": { + "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 Infos (getTenantDeviceInfos)", + "description": "Returns a page of devices 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 Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDeviceInfos", + "parameters": [ + { + "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": { - "$ref": "#/components/schemas/DeviceProfile" - } - } + { + "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": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "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 - } - } - } - } + { + "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" } }, - "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 - } - } - } - } + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" } }, - "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 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "http_login_form": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } }, { - "api_key_form": [] - } - ] - } - }, - "/api/deviceProfile/devices/keys/attributes": { - "get": { - "tags": [ - "device-profile-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", - "parameters": [ - { - "name": "deviceProfileId", + "name": "sortOrder", "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -28640,10 +26293,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -28756,180 +26406,88 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/devices/keys/timeseries": { + "/api/tenant/devices": { "get": { "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": "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.", + "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'", - "required": false, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "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 - } - } - } - } + "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 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "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 - } - } - } - } + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "http_login_form": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } }, { - "api_key_form": [] - } - ] - } - }, - "/api/deviceProfile/names": { - "get": { - "tags": [ - "device-profile-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", - "parameters": [ - { - "name": "activeOnly", + "name": "sortOrder", "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -28939,10 +26497,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -29055,39 +26610,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/{deviceProfileId}": { - "get": { + "/api/tenant/{tenantId}/device/{deviceId}": { + "post": { "tags": [ - "device-profile-controller" + "device-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", + "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.", + "operationId": "assignDeviceToTenant", "parameters": [ { - "name": "deviceProfileId", + "name": "tenantId", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -29097,7 +26652,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/Device" } } } @@ -29114,7 +26669,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -29210,34 +26765,42 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/deviceProfile": { + "post": { "tags": [ "device-profile-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", - "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": "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" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } }, "400": { "description": "Bad Request", @@ -29251,7 +26814,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -29347,28 +26910,28 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfile/{deviceProfileId}/default": { - "post": { + "/api/deviceProfile/devices/keys/attributes": { + "get": { "tags": [ "device-profile-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": "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" } @@ -29380,7 +26943,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "type": "array", + "items": { + "type": "string" + } } } } @@ -29397,7 +26963,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -29493,29 +27059,43 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfo/default": { + "/api/deviceProfile/devices/keys/timeseries": { "get": { "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": "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": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -29628,30 +27208,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { + "/api/deviceProfile/names": { "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 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": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "activeOnly", + "in": "query", + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], @@ -29661,7 +27242,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -29774,96 +27358,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfileInfos": { + "/api/deviceProfile/{deviceProfileId}": { "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 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", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "transportType", + "name": "inlineImages", "in": "query", - "description": "Type of the transport", + "description": "Inline images as a data URL (Base64)", "required": false, "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] + "type": "boolean" } } ], @@ -29873,7 +27400,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -29986,49 +27513,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/deviceProfileInfos/list": { - "get": { + }, + "delete": { "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", - "operationId": "getDeviceProfileInfosByIdsV2", + "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": "deviceProfileIds", - "in": "query", - "description": "A list of device profile ids, separated by comma ','", + "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" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -30138,81 +27650,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/deviceProfiles": { - "get": { + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { "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": "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": "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", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -30221,7 +27683,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -30238,7 +27700,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -30334,53 +27796,29 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain": { - "post": { + "/api/deviceProfileInfo/default": { + "get": { "tags": [ - "domain-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' authority.", - "operationId": "saveDomain", - "parameters": [ - { - "name": "oauth2ClientIds", - "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } + "device-profile-controller" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - }, - "required": true - }, + "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/Domain" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -30397,7 +27835,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -30493,30 +27931,30 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/info/{id}": { + "/api/deviceProfileInfo/{deviceProfileId}": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getDomainInfoById", + "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" } } ], @@ -30526,7 +27964,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -30639,22 +28077,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/infos": { + "/api/deviceProfileInfos": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain infos (getTenantDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDomainInfos", + "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": "pageSize", @@ -30679,7 +28117,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" @@ -30691,7 +28129,15 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] } }, { @@ -30700,7 +28146,27 @@ "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string" + "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" + ] } } ], @@ -30710,7 +28176,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" } } } @@ -30823,36 +28289,49 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/{id}": { - "delete": { + "/api/deviceProfileInfos/list": { + "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' authority.", - "operationId": "deleteDomain", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", + "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { - "name": "id", - "in": "path", + "name": "deviceProfileIds", + "in": "query", + "description": "A list of device profile ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -30962,51 +28441,94 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/domain/{id}/oauth2Clients": { - "put": { + "/api/deviceProfiles": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", - "description": "Update oauth2 clients for the specified domain. ", - "operationId": "updateOauth2Clients_1", + "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": "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" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -31115,40 +28637,53 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/edge/{edgeId}": { - "delete": { + "/api/domain": { + "post": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Unassign edge from customer (unassignEdgeFromCustomer)", - "description": "Clears assignment of the edge to customer. Customer will not be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignEdgeFromCustomer", + "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' authority.", + "operationId": "saveDomain", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/Domain" } } } @@ -31165,7 +28700,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -31261,30 +28796,30 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/public/edge/{edgeId}": { - "post": { + "/api/domain/info/{id}": { + "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Make edge publicly available (assignEdgeToPublicCustomer)", - "description": "Edge will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEdgeToPublicCustomer", + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getDomainInfoById", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -31294,7 +28829,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -31311,7 +28846,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -31407,37 +28942,66 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/edge/{edgeId}": { - "post": { + "/api/domain/infos": { + "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Assign edge to customer (assignEdgeToCustomer)", - "description": "Creates assignment of the edge to customer. Customer will be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEdgeToCustomer", + "summary": "Get Domain infos (getTenantDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantDomainInfos", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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" } @@ -31449,7 +29013,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -31466,7 +29030,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -31562,110 +29126,36 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/edgeInfos": { - "get": { + "/api/domain/{id}": { + "delete": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edges info 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. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdgeInfos", + "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' authority.", + "operationId": "deleteDomain", "parameters": [ { - "name": "customerId", + "name": "id", "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": "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" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -31775,111 +29265,51 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/edges": { - "get": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-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": "Update oauth2 clients (updateDomainOauth2Clients)", + "description": "Update oauth2 clients for the specified domain. ", + "operationId": "updateDomainOauth2Clients", "parameters": [ { - "name": "customerId", + "name": "id", "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": "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" - ] + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -31988,32 +29418,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge": { - "post": { + "/api/customer/edge/{edgeId}": { + "delete": { "tags": [ "edge-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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEdge", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } + "summary": "Unassign edge from customer (unassignEdgeFromCustomer)", + "description": "Clears assignment of the edge to customer. Customer will not be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignEdgeFromCustomer", + "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", @@ -32037,7 +29468,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -32133,39 +29564,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/bulk_import": { + "/api/customer/public/edge/{edgeId}": { "post": { "tags": [ "edge-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' authority.", - "operationId": "processEdgesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Make edge publicly available (assignEdgeToPublicCustomer)", + "description": "Edge will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEdgeToPublicCustomer", + "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": { - "$ref": "#/components/schemas/BulkImportResultEdge" + "$ref": "#/components/schemas/Edge" } } } @@ -32278,23 +29710,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/info/{edgeId}": { - "get": { + "/api/customer/{customerId}/edge/{edgeId}": { + "post": { "tags": [ "edge-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": "Assign edge to customer (assignEdgeToCustomer)", + "description": "Creates assignment of the edge to customer. Customer will be able to query edge afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEdgeToCustomer", "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": "edgeId", "in": "path", @@ -32311,7 +29752,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "$ref": "#/components/schemas/Edge" } } } @@ -32328,7 +29769,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -32424,43 +29865,96 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/instructions/install/{edgeId}/{method}": { + "/api/customer/{customerId}/edgeInfos": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeInstallInstructions", + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edges info 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. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdgeInfos", "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": "method", - "in": "path", - "description": "Installation 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": "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" ] } } @@ -32471,7 +29965,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -32584,43 +30078,96 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { + "/api/customer/{customerId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdgeUpgradeInstructions", + "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": "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": "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" ] } } @@ -32631,7 +30178,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -32744,40 +30291,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { - "get": { + "/api/edge": { + "post": { "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", - "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" + "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEdge", + "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" } } } @@ -32794,7 +30340,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -32890,40 +30436,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/sync/{edgeId}": { + "/api/edge/bulk_import": { "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", - "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" + "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' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -33036,32 +30581,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/types": { + "/api/edge/info/{edgeId}": { "get": { "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": "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", + "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", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -33174,22 +30727,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}": { + "/api/edge/instructions/install/{edgeId}/{method}": { "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 Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeInstallInstructions", "parameters": [ { "name": "edgeId", @@ -33199,6 +30752,20 @@ "schema": { "type": "string" } + }, + { + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } } ], "responses": { @@ -33207,7 +30774,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -33320,34 +30887,57 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/instructions/upgrade/{edgeVersion}/{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 Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.\n\nAvailable for users with 'TENANT_ADMIN' 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": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeInstructions" + } + } + } }, "400": { "description": "Bad Request", @@ -33457,22 +31047,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/upgrade/available": { + "/api/edge/missingToRelatedRuleChains/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", + "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", @@ -33490,7 +31080,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "type": "string" } } } @@ -33603,22 +31193,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { + "/api/edge/sync/{edgeId}": { "post": { "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": "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": "edgeId", @@ -33628,15 +31218,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": { @@ -33645,7 +31226,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "type": "string" } } } @@ -33758,89 +31339,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" + } } } } @@ -33953,40 +31477,40 @@ }, "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" } } } @@ -34003,7 +31527,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -34099,32 +31623,34 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/edges/enabled": { - "get": { + }, + "delete": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "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", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -34234,33 +31760,30 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edges/list": { + "/api/edge/{edgeId}/upgrade/available": { "get": { "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": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", "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" } } ], @@ -34270,10 +31793,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "type": "boolean" } } } @@ -34386,27 +31906,36 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/edge": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "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", + "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": "edgeName", - "in": "query", - "description": "Unique name of the edge", + "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": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -34436,7 +31965,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -34532,22 +32061,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/edgeInfos": { + "/api/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge Infos (getTenantEdgeInfos)", - "description": "Returns a page of edges 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. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeInfos", + "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", @@ -34569,15 +32098,6 @@ "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", @@ -34623,7 +32143,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -34736,98 +32256,175 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/tenant/edges": { - "get": { + }, + "post": { "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", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "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/EdgeSearchQuery" + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + } + } } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "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 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge 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 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "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 + } + } + } + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "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/edges/enabled": { + "get": { + "tags": [ + "edge-controller" ], + "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/PageDataEdge" + "type": "boolean" } } } @@ -34940,108 +32537,33 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/events": { + "/api/edges/list": { "get": { "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": "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": "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", - "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": "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" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -35051,7 +32573,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -35164,32 +32689,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/branches": { + "/api/tenant/edge": { "get": { "tags": [ - "entities-version-control-controller" + "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": "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", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } + "$ref": "#/components/schemas/Edge" } } } @@ -35302,50 +32835,89 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { + "/api/tenant/edgeInfos": { "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 Infos (getTenantEdgeInfos)", + "description": "Returns a page of edges 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. Edge Info is an extension of the default Edge object that contains information about the assigned customer name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeInfos", "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": "integer", + "format": "int32" } }, { - "name": "internalEntityUuid", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "integer", + "format": "int32" } }, { - "name": "versionId", + "name": "type", "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, + "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": { @@ -35354,7 +32926,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -35467,40 +33039,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.\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`) 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\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" } } } @@ -35517,7 +33147,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -35613,40 +33243,109 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity/{entityType}/{versionId}": { + "/api/edge/{edgeId}/events": { "get": { "tags": [ - "entities-version-control-controller" + "edge-event-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 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": "entityType", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string" } }, { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "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", + "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": { @@ -35655,10 +33354,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -35771,41 +33467,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity/{requestId}/status": { + "/api/entities/vc/branches": { "get": { "tags": [ "entities-version-control-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- `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 },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8\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" - } - } - ], + "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", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/BranchInfo" + } } } } @@ -35918,26 +33605,45 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/entity/{versionId}": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { "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", + "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", + "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", + "in": "query", "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { @@ -35951,10 +33657,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/EntityDataDiff" } } } @@ -36067,59 +33770,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { - "get": { + "/api/entities/vc/entity": { + "post": { "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) and `hasCredentials` (whether stored device data has credentials).\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": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" + "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.\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`) 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\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": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "type": "string", + "format": "uuid" } } } @@ -36136,7 +33820,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -36232,85 +33916,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/version": { + "/api/entities/vc/entity/{entityType}/{versionId}": { "get": { "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", + "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": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "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": { @@ -36319,7 +33958,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -36432,38 +34074,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.\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\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 the list of specific entities (`entityIds`);\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- `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 },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8\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" } } } @@ -36480,7 +34125,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -36576,94 +34221,31 @@ }, "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'", - "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": "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", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "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": { @@ -36672,7 +34254,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -36785,103 +34370,49 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { "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": "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) and `hasCredentials` (whether stored device data has credentials).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", "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", + "name": "versionId", "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", - "description": "The name of the working branch, for example 'master'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/EntityType" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id", "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" - ] + "format": "uuid" } } ], @@ -36891,7 +34422,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -37004,31 +34535,84 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entities/vc/version/{requestId}/status": { + "/api/entities/vc/version": { "get": { "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", + "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": "requestId", - "in": "path", - "description": "A string value representing the version control request 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": "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", - "format": "uuid" + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -37038,7 +34622,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -37151,27 +34735,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/alarmsQuery/count": { + }, "post": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "Count Alarms by Query (countAlarmsByQuery)", - "description": "Returns the number of alarms that match the query definition.", - "operationId": "countAlarmsByQuery", + "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.\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\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 the list of specific entities (`entityIds`);\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/AlarmCountQuery" + "$ref": "#/components/schemas/VersionCreateRequest" } } }, @@ -37183,8 +34765,8 @@ "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "type": "string", + "format": "uuid" } } } @@ -37297,39 +34879,103 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/alarmsQuery/find": { - "post": { + "/api/entities/vc/version/{entityType}": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-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": "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": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" } }, - "required": true - }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "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 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": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmData" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -37346,7 +34992,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -37442,28 +35088,113 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edqs/state": { + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { "get": { "tags": [ - "entity-query-controller" + "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 \"\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": "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", + "description": "The name of the working branch, for example 'master'", + "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 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" + ] + } + } ], - "summary": "getEdqsState", - "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdqsState" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -37576,34 +35307,44 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edqs/system/request": { - "post": { + "/api/entities/vc/version/{requestId}/status": { + "get": { "tags": [ - "entity-query-controller" + "entities-version-control-controller" ], - "summary": "processSystemEdqsRequest", - "operationId": "processSystemEdqsRequest", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToCoreEdqsRequest" - } + "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" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreationResult" + } + } + } }, "400": { "description": "Bad Request", @@ -37617,7 +35358,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -37713,27 +35454,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entitiesQuery/count": { + "/api/alarmsQuery/count": { "post": { "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## 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## 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", + "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/EntityCountQuery" + "$ref": "#/components/schemas/AlarmCountQuery" } } }, @@ -37859,27 +35600,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entitiesQuery/find": { + "/api/alarmsQuery/find": { "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## 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## 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": "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/EntityDataQuery" + "$ref": "#/components/schemas/AlarmDataQuery" } } }, @@ -37891,7 +35632,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityData" + "$ref": "#/components/schemas/PageDataAlarmData" } } } @@ -38004,73 +35745,28 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entitiesQuery/find/keys": { - "post": { + "/api/edqs/state": { + "get": { "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.", - "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" - ] - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityDataQuery" - } - } - }, - "required": true - }, + "summary": "getEdqsState", + "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AvailableEntityKeys" + "$ref": "#/components/schemas/EdqsState" } } } @@ -38087,7 +35783,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -38181,76 +35877,28 @@ } } }, - "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/v2/entitiesQuery/find/keys": { + "/api/edqs/system/request": { "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.", - "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": "processSystemEdqsRequest", + "operationId": "processSystemEdqsRequest", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataQuery" + "$ref": "#/components/schemas/ToCoreEdqsRequest" } } }, @@ -38258,14 +35906,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailableEntityKeysV2" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -38375,85 +36016,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relation": { - "get": { + "/api/entitiesQuery/count": { + "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", - "parameters": [ - { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationType", - "in": "query", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "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## 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## 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/EntityCountQuery" + } } }, - { - "name": "toType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "type": "integer", + "format": "int64" } } } @@ -38470,7 +36066,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38566,25 +36162,27 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/entitiesQuery/find": { "post": { "tags": [ - "entity-relation-controller" + "entity-query-controller" ], - "summary": "Create Relation (saveRelation)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelation", + "summary": "Find 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## 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## 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": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityDataQuery" } } }, @@ -38592,7 +36190,14 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityData" + } + } + } }, "400": { "description": "Bad Request", @@ -38702,79 +36307,76 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entitiesQuery/find/keys": { + "post": { "tags": [ - "entity-relation-controller" + "entity-query-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": "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.", + "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" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailableEntityKeys" + } + } + } }, "400": { "description": "Bad Request", @@ -38788,7 +36390,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38882,29 +36484,76 @@ } } }, + "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations": { + "/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.", + "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 related entities (findByQuery)", - "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", - "operationId": "findByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" + "$ref": "#/components/schemas/EntityDataQuery" } } }, @@ -38916,10 +36565,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } + "$ref": "#/components/schemas/AvailableEntityKeysV2" } } } @@ -39032,23 +36678,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relation": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Delete common relations (deleteCommonRelations)", - "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "deleteRelations", + "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": "entityId", + "name": "fromId", "in": "query", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -39057,7 +36705,43 @@ } }, { - "name": "entityType", + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", "in": "query", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -39068,7 +36752,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } }, "400": { "description": "Bad Request", @@ -39178,51 +36869,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/from/{fromType}/{fromId}": { - "get": { + "/api/relations": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromV2)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromV2", - "parameters": [ - { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entities (findEntityRelationsByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findEntityRelationsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -39249,7 +36921,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -39345,35 +37017,24 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/relations/from/{fromType}/{fromId}/{relationType}": { - "get": { + }, + "delete": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByFromAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByFromAndRelationType", + "summary": "Delete common relations (deleteRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", "parameters": [ { - "name": "fromType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromId", - "in": "path", + "name": "entityId", + "in": "query", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { @@ -39381,19 +37042,10 @@ } }, { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "relationTypeGroup", + "name": "entityType", "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, "schema": { "type": "string" } @@ -39401,17 +37053,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityRelation" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -39521,32 +37163,51 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info": { - "post": { + "/api/relations/from/{fromType}/{fromId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Find related entity infos (findInfoByQuery)", - "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelationsQuery" - } + "summary": "Get List of Relations (findEntityRelationsByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFrom", + "parameters": [ + { + "name": "fromType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "fromId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -39555,7 +37216,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelationInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -39573,7 +37234,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39669,22 +37330,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/from/{fromType}/{fromId}": { + "/api/relations/from/{fromType}/{fromId}/{relationType}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByFromV2)", - "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByFromV2", + "summary": "Get List of Relations (findEntityRelationsByFromAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByFromAndRelationType", "parameters": [ { "name": "fromType", @@ -39704,6 +37365,15 @@ "type": "string" } }, + { + "name": "relationType", + "in": "path", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "relationTypeGroup", "in": "query", @@ -39722,7 +37392,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelationInfo" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -39836,51 +37506,32 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/info/to/{toType}/{toId}": { - "get": { + "/api/relations/info": { + "post": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relation Infos (findInfoByToV2)", - "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", - "operationId": "findInfoByToV2", - "parameters": [ - { - "name": "toType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related entity infos (findEntityRelationInfosByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } } }, - { - "name": "relationTypeGroup", - "in": "query", - "description": "A string value representing relation type group. For example, 'COMMON'", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -39907,7 +37558,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40003,25 +37654,25 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}": { + "/api/relations/info/from/{fromType}/{fromId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToV2)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToV2", + "summary": "Get List of Relation Infos (findEntityRelationInfosByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByFrom", "parameters": [ { - "name": "toType", + "name": "fromType", "in": "path", "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, @@ -40030,7 +37681,7 @@ } }, { - "name": "toId", + "name": "fromId", "in": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, @@ -40056,7 +37707,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationInfo" } } } @@ -40170,22 +37821,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/relations/to/{toType}/{toId}/{relationType}": { + "/api/relations/info/to/{toType}/{toId}": { "get": { "tags": [ "entity-relation-controller" ], - "summary": "Get List of Relations (findByToAndRelationType)", - "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", - "operationId": "findByToAndRelationType", + "summary": "Get List of Relation Infos (findEntityRelationInfosByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findEntityRelationInfosByTo", "parameters": [ { "name": "toType", @@ -40205,15 +37856,6 @@ "type": "string" } }, - { - "name": "relationType", - "in": "path", - "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "relationTypeGroup", "in": "query", @@ -40232,7 +37874,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityRelation" + "$ref": "#/components/schemas/EntityRelationInfo" } } } @@ -40346,39 +37988,61 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/v2/relation": { - "post": { + "/api/relations/to/{toType}/{toId}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Create Relation (saveRelationV2)", - "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "saveRelationV2", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityRelation" - } + "summary": "Get List of Relations (findEntityRelationsByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByTo", + "parameters": [ + { + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -40395,7 +38059,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40491,34 +38155,36 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/relations/to/{toType}/{toId}/{relationType}": { + "get": { "tags": [ "entity-relation-controller" ], - "summary": "Delete Relation (deleteRelationV2)", - "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", - "operationId": "deleteRelationV2", + "summary": "Get List of Relations (findEntityRelationsByToAndRelationType)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findEntityRelationsByToAndRelationType", "parameters": [ { - "name": "fromId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "toType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "fromType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "toId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -40526,7 +38192,7 @@ }, { "name": "relationType", - "in": "query", + "in": "path", "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "required": true, "schema": { @@ -40541,24 +38207,6 @@ "schema": { "type": "string" } - }, - { - "name": "toId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toType", - "in": "query", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -40567,7 +38215,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityRelation" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } } } } @@ -40680,40 +38331,39 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/entityView/{entityViewId}": { - "delete": { + "/api/v2/relation": { + "post": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Unassign Entity View from customer (unassignEntityViewFromCustomer)", - "description": "Clears assignment of the Entity View to customer. Customer will not be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignEntityViewFromCustomer", - "parameters": [ - { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "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" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -40730,7 +38380,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40826,27 +38476,70 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/customer/public/entityView/{entityViewId}": { - "post": { + }, + "delete": { "tags": [ - "entity-view-controller" + "entity-relation-controller" ], - "summary": "Make entity view publicly available (assignEntityViewToPublicCustomer)", - "description": "Entity View will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the entity view.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEntityViewToPublicCustomer", + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", "parameters": [ { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" @@ -40859,7 +38552,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityRelation" } } } @@ -40876,7 +38569,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40972,32 +38665,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityView/{entityViewId}": { - "post": { + "/api/customer/entityView/{entityViewId}": { + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Assign Entity View to customer (assignEntityViewToCustomer)", - "description": "Creates assignment of the Entity View to customer. Customer will be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignEntityViewToCustomer", + "summary": "Unassign Entity View from customer (unassignEntityViewFromCustomer)", + "description": "Clears assignment of the Entity View to customer. Customer will not be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignEntityViewFromCustomer", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "entityViewId", "in": "path", @@ -41031,7 +38715,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41127,97 +38811,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityViewInfos": { - "get": { + "/api/customer/public/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Customer Entity View info (getCustomerEntityViewInfos)", - "description": "Returns a page of Entity View info objects assigned to customer. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViewInfos", + "summary": "Make entity view publicly available (assignEntityViewToPublicCustomer)", + "description": "Entity View will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the entity view.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEntityViewToPublicCustomer", "parameters": [ { - "name": "customerId", + "name": "entityViewId", "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", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -41226,7 +38844,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -41243,7 +38861,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41339,22 +38957,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/customer/{customerId}/entityViews": { - "get": { + "/api/customer/{customerId}/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Customer Entity Views (getCustomerEntityViews)", - "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEntityViews", + "summary": "Assign Entity View to customer (assignEntityViewToCustomer)", + "description": "Creates assignment of the Entity View to customer. Customer will be able to query Entity View afterwards.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignEntityViewToCustomer", "parameters": [ { "name": "customerId", @@ -41366,69 +38984,13 @@ } }, { - "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": "type", - "in": "query", - "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity view name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -41437,7 +38999,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -41454,7 +39016,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41550,38 +39112,97 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/entityView/{entityViewId}": { - "post": { + "/api/customer/{customerId}/entityViewInfos": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Assign entity view to edge (assignEntityViewToEdge)", - "description": "Creates assignment of an existing entity view to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity view will be delivered to edge service, it's going to be available for usage on remote edge instance.", - "operationId": "assignEntityViewToEdge", + "summary": "Get Customer Entity View info (getCustomerEntityViewInfos)", + "description": "Returns a page of Entity View info objects assigned to customer. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViewInfos", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "entityViewId", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -41590,7 +39211,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -41607,7 +39228,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41703,36 +39324,96 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customer/{customerId}/entityViews": { + "get": { "tags": [ "entity-view-controller" ], - "summary": "Unassign entity view from edge (unassignEntityViewFromEdge)", - "description": "Clears assignment of the entity view to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity view locally.", - "operationId": "unassignEntityViewFromEdge", + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "entityViewId", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -41741,7 +39422,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -41854,21 +39535,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/edge/{edgeId}/entityViews": { - "get": { + "/api/edge/{edgeId}/entityView/{entityViewId}": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "getEdgeEntityViews", - "operationId": "getEdgeEntityViews", + "summary": "Assign entity view to edge (assignEntityViewToEdge)", + "description": "Creates assignment of an existing entity view to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity view will be delivered to edge service, it's going to be available for usage on remote edge instance.", + "operationId": "assignEntityViewToEdge", "parameters": [ { "name": "edgeId", @@ -41879,72 +39561,12 @@ } }, { - "name": "pageSize", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", + "name": "entityViewId", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "startTime", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -41953,7 +39575,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/EntityView" } } } @@ -41970,7 +39592,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42066,64 +39688,38 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityView": { - "post": { + }, + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Save or update entity view (saveEntityView)", - "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveEntityView", + "summary": "Unassign entity view from edge (unassignEntityViewFromEdge)", + "description": "Clears assignment of the entity view to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity view (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity view locally.", + "operationId": "unassignEntityViewFromEdge", "parameters": [ { - "name": "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, + "name": "edgeId", + "in": "path", + "required": true, "schema": { - "type": "string", - "default": "_" + "type": "string" } }, { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, + "name": "entityViewId", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityView" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -42147,7 +39743,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42243,31 +39839,97 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView/info/{entityViewId}": { + "/api/edge/{edgeId}/entityViews": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View info (getEntityViewInfoById)", - "description": "Fetch the Entity View info object based on the provided Entity View Id. Entity Views Info extends the Entity View with customer title and 'is public' flag. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewInfoById", + "summary": "getEdgeEntityViews", + "operationId": "getEdgeEntityViews", "parameters": [ { - "name": "entityViewId", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "startTime", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -42276,7 +39938,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityViewInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -42389,32 +40051,71 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView/types": { - "get": { + "/api/entityView": { + "post": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity View Types (getEntityViewTypes)", - "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEntityViewTypes", + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", + "parameters": [ + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/EntityView" } } } @@ -42431,7 +40132,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42527,22 +40228,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityView/{entityViewId}": { + "/api/entityView/info/{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", + "summary": "Get Entity View info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided Entity View Id. Entity Views Info extends the Entity View with customer title and 'is public' flag. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", "parameters": [ { "name": "entityViewId", @@ -42560,7 +40261,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "$ref": "#/components/schemas/EntityViewInfo" } } } @@ -42673,34 +40374,35 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entityView/types": { + "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' authority.", - "operationId": "deleteEntityView", - "parameters": [ - { - "name": "entityViewId", - "in": "path", - "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } + } + } + } }, "400": { "description": "Bad Request", @@ -42810,42 +40512,40 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/entityViews": { - "post": { + "/api/entityView/{entityViewId}": { + "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 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" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityView" - } + "$ref": "#/components/schemas/EntityView" } } } @@ -42862,7 +40562,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -42958,36 +40658,169 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - } - }, - "/api/entityViews/list": { - "get": { + }, + "delete": { "tags": [ "entity-view-controller" ], - "summary": "Get Entity Views By Ids (getEntityViewsByIdsV2)", - "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. ", - "operationId": "getEntityViewsByIdsV2", + "summary": "Delete entity view (deleteEntityView)", + "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEntityView", "parameters": [ { - "name": "entityViewIds", - "in": "query", - "description": "A list of entity view ids, separated by comma ','", + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" + "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 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": [] + } + ] + } + }, + "/api/entityViews": { + "post": { + "tags": [ + "entity-view-controller" ], + "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", @@ -43014,7 +40847,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -43110,30 +40943,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. ", + "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" + } } } ], @@ -43143,7 +40979,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } } } } @@ -43256,88 +41095,31 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/entityViewInfos": { + "/api/tenant/entityView": { "get": { "tags": [ "entity-view-controller" ], - "summary": "Get Tenant Entity Views (getTenantEntityViews)", - "description": "Returns a page of entity views info 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": "getTenantEntityViewInfos", + "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", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -43346,7 +41128,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityViewInfo" + "$ref": "#/components/schemas/EntityView" } } } @@ -43459,22 +41241,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/tenant/entityViews": { + "/api/tenant/entityViewInfos": { "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", + "description": "Returns a page of entity views info 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": "getTenantEntityViewInfos", "parameters": [ { "name": "pageSize", @@ -43524,7 +41306,8 @@ "enum": [ "createdTime", "name", - "type" + "type", + "customerTitle" ] } }, @@ -43548,7 +41331,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityView" + "$ref": "#/components/schemas/PageDataEntityViewInfo" } } } @@ -43661,50 +41444,23 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } }, - "/api/events/{entityType}/{entityId}": { + "/api/tenant/entityViews": { "get": { "tags": [ - "event-controller" + "entity-view-controller" ], - "summary": "Get Events (Deprecated)", - "description": "Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEvents", + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tenantId", - "in": "query", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -43725,10 +41481,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The value is not used in searching.", + "description": "The case insensitive 'substring' filter based on the entity view name.", "required": false, "schema": { "type": "string" @@ -43742,8 +41507,9 @@ "schema": { "type": "string", "enum": [ - "ts", - "id" + "createdTime", + "name", + "type" ] } }, @@ -43759,26 +41525,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Events with creation time before it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Events with creation time after it won't be queried.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -43787,7 +41533,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEventInfo" + "$ref": "#/components/schemas/PageDataEntityView" } } } @@ -43900,20 +41646,22 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] - }, + } + }, + "/api/events/{entityType}/{entityId}": { "post": { "tags": [ "event-controller" ], - "summary": "Get Events by event filter (getEvents)", + "summary": "Get Events by event filter (getEventsByFilter)", "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identifier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", - "operationId": "getEvents_1", + "operationId": "getEventsByFilter", "parameters": [ { "name": "entityType", @@ -44147,10 +41895,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44325,10 +42073,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44338,9 +42086,9 @@ "tags": [ "event-controller" ], - "summary": "Get Events by type (getEvents)", + "summary": "Get Events by type (getEventsByType)", "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEvents_2", + "operationId": "getEventsByType", "parameters": [ { "name": "entityType", @@ -44574,10 +42322,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44732,10 +42480,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -44876,10 +42624,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45091,10 +42839,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45252,10 +43000,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45427,10 +43175,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -45601,10 +43349,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -45765,10 +43513,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -45923,10 +43671,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46081,10 +43829,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -46247,10 +43995,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46422,10 +44170,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46588,10 +44336,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -46733,10 +44481,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -46869,10 +44617,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47007,10 +44755,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47145,10 +44893,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47380,10 +45128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47484,7 +45232,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "W5A2SHXzH4uUsc1TUTppS7jwSkAo5G" + "resetToken": "uUNiGaibsmdojca25XYNJcReKFDoKI" } } } @@ -47508,9 +45256,7 @@ "application/json": { "schema": { "properties": { - "refreshToken": { - - } + "refreshToken": {} } } } @@ -47594,7 +45340,7 @@ "message": "User password expired!", "errorCode": 15, "timestamp": 1609459200000, - "resetToken": "W5A2SHXzH4uUsc1TUTppS7jwSkAo5G" + "resetToken": "uUNiGaibsmdojca25XYNJcReKFDoKI" } } } @@ -47693,16 +45439,14 @@ "tags": [ "lwm-2m-controller" ], - "summary": "Save device with credentials (Deprecated)", - "operationId": "saveDeviceWithCredentials", + "summary": "Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated)", + "operationId": "saveLwm2mDeviceWithCredentials", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "additionalProperties": { - - } + "additionalProperties": {} } } }, @@ -47827,10 +45571,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47973,10 +45717,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -47986,9 +45730,9 @@ "tags": [ "mail-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getMailConfigTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates_1", + "operationId": "getMailConfigTemplates", "responses": { "200": { "description": "OK", @@ -48108,10 +45852,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48267,10 +46011,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48413,10 +46157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48597,10 +46341,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48736,10 +46480,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -48749,9 +46493,9 @@ "tags": [ "mobile-app-bundle-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", + "summary": "Update oauth2 clients (updateMobileAppBundleOauth2Clients)", "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "updateOauth2Clients", + "operationId": "updateMobileAppBundleOauth2Clients", "parameters": [ { "name": "id", @@ -48889,10 +46633,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49048,10 +46792,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49061,7 +46805,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile app infos (getTenantMobileAppInfos)", + "summary": "Get mobile app infos (getTenantMobileApps)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getTenantMobileApps", "parameters": [ @@ -49241,10 +46985,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -49384,10 +47128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49397,7 +47141,7 @@ "tags": [ "mobile-app-controller" ], - "summary": "Get mobile info by id (getMobileAppInfoById)", + "summary": "Get mobile info by id (getMobileAppById)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "operationId": "getMobileAppById", "parameters": [ @@ -49530,10 +47274,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -49667,10 +47411,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -49955,10 +47699,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50103,10 +47847,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50248,10 +47992,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50406,10 +48150,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50552,10 +48296,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -50689,10 +48433,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -50873,10 +48617,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51008,10 +48752,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -51151,10 +48895,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51285,10 +49029,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -51427,10 +49171,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51566,10 +49310,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51705,10 +49449,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -51912,10 +49656,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52055,10 +49799,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52206,10 +49950,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52351,10 +50095,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52497,10 +50241,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -52634,10 +50378,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52818,10 +50562,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -52963,10 +50707,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53130,10 +50874,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53276,10 +51020,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -53413,10 +51157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53597,10 +51341,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53610,9 +51354,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by ids (getNotificationTargetsByIdsV2)", + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsByIdsV2", + "operationId": "getNotificationTargetsByIds", "parameters": [ { "name": "ids", @@ -53749,10 +51493,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -53762,9 +51506,9 @@ "tags": [ "notification-target-controller" ], - "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2)", + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getNotificationTargetsBySupportedNotificationTypeV2", + "operationId": "getNotificationTargetsBySupportedNotificationType", "parameters": [ { "name": "notificationType", @@ -53936,10 +51680,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54093,10 +51837,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54238,10 +51982,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54384,10 +52128,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -54521,10 +52265,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54717,10 +52461,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -54730,9 +52474,9 @@ "tags": [ "o-auth-2-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", - "operationId": "getClientRegistrationTemplates", + "operationId": "getOAuth2ClientRegistrationTemplates", "responses": { "200": { "description": "OK", @@ -54855,10 +52599,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -54998,10 +52742,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55138,10 +52882,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55438,10 +53182,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55622,10 +53366,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55635,9 +53379,9 @@ "tags": [ "o-auth-2-controller" ], - "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2)", + "summary": "Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds)", "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "findTenantOAuth2ClientInfosByIdsV2", + "operationId": "findTenantOAuth2ClientInfosByIds", "parameters": [ { "name": "clientIds", @@ -55774,10 +53518,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -55920,10 +53664,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56057,10 +53801,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56192,10 +53936,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56337,10 +54081,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56483,10 +54227,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -56629,10 +54373,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56819,10 +54563,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -56956,10 +54700,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57103,10 +54847,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57302,10 +55046,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57315,9 +55059,9 @@ "tags": [ "ota-package-controller" ], - "summary": "Get OTA Package Infos (getOtaPackages)", + "summary": "Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType)", "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackages_1", + "operationId": "getOtaPackagesByDeviceProfileAndType", "parameters": [ { "name": "deviceProfileId", @@ -57523,10 +55267,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57658,10 +55402,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -57671,7 +55415,7 @@ "tags": [ "qr-code-settings-controller" ], - "summary": "Get Mobile application settings (getMobileAppSettings)", + "summary": "Get Mobile application settings (getQrCodeSettings)", "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", "operationId": "getQrCodeSettings", "responses": { @@ -57793,10 +55537,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -57936,10 +55680,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58418,10 +56162,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -58578,10 +56322,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58724,10 +56468,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -58870,10 +56614,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -59007,10 +56751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59198,10 +56942,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59211,9 +56955,9 @@ "tags": [ "queue-stats-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIdsV2)", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIdsV2", + "operationId": "getQueueStatsByIds", "parameters": [ { "name": "queueStatsIds", @@ -59350,10 +57094,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59496,10 +57240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59509,9 +57253,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequest)", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest_1", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -59653,10 +57397,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59666,9 +57410,9 @@ "tags": [ "rpc-v-1-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequest)", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest_1", + "operationId": "handleTwoWayDeviceRPCRequestV1", "parameters": [ { "name": "deviceId", @@ -59810,10 +57554,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -59823,9 +57567,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send one-way RPC request", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequest", + "operationId": "handleOneWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -59965,10 +57709,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60186,10 +57930,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60332,10 +58076,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60469,10 +58213,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60482,9 +58226,9 @@ "tags": [ "rpc-v-2-controller" ], - "summary": "Send two-way RPC request", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV2)", "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequest", + "operationId": "handleTwoWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -60624,10 +58368,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -60777,10 +58521,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -60928,10 +58672,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61130,10 +58874,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61275,10 +59019,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61413,10 +59157,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61426,9 +59170,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Create Default Rule Chain", + "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain_1", + "operationId": "setDeviceDefaultRuleChain", "requestBody": { "content": { "application/json": { @@ -61558,10 +59302,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61715,10 +59459,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61850,10 +59594,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -61865,7 +59609,7 @@ ], "summary": "Test Script function", "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testScript", + "operationId": "testRuleChainScript", "parameters": [ { "name": "scriptLang", @@ -62007,10 +59751,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62153,10 +59897,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -62290,10 +60034,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62436,10 +60180,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -62580,10 +60324,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62726,10 +60470,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -62872,10 +60616,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63022,10 +60766,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63171,10 +60915,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63317,10 +61061,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63523,10 +61267,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63670,10 +61414,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63830,10 +61574,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -63843,9 +61587,9 @@ "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIdsV2)", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n", - "operationId": "getRuleChainsByIdsV2", + "operationId": "getRuleChainsByIds", "parameters": [ { "name": "ruleChainIds", @@ -63982,10 +61726,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64128,10 +61872,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64141,9 +61885,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push user message to the rule engine (handleRuleEngineRequest)", + "summary": "Push user message to the rule engine (handleRuleEngineRequestForUser)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_3", + "operationId": "handleRuleEngineRequestForUser", "requestBody": { "content": { "application/json": { @@ -64274,10 +62018,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64287,9 +62031,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message to the rule engine (handleRuleEngineRequestForEntity)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest", + "operationId": "handleRuleEngineRequestForEntity", "parameters": [ { "name": "entityType", @@ -64440,10 +62184,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64453,9 +62197,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_2", + "operationId": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { "name": "entityType", @@ -64625,10 +62369,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -64638,9 +62382,9 @@ "tags": [ "rule-engine-controller" ], - "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequest)", + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout)", "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "handleRuleEngineRequest_1", + "operationId": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { "name": "entityType", @@ -64801,10 +62545,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65023,10 +62767,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -65167,10 +62911,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65313,10 +63057,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65468,10 +63212,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65623,10 +63367,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65636,8 +63380,8 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2)", - "operationId": "getSystemOrTenantResourcesByIdsV2", + "summary": "Get Resource Infos by ids (getSystemOrTenantResourcesByIds)", + "operationId": "getSystemOrTenantResourcesByIds", "parameters": [ { "name": "resourceIds", @@ -65774,10 +63518,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -65952,10 +63696,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66147,10 +63891,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66302,10 +64046,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66457,10 +64201,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66470,7 +64214,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Get All Resource Infos (getAllResources)", + "summary": "Get All Resource Infos (getTenantResources)", "description": "Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", "operationId": "getTenantResources", "parameters": [ @@ -66651,10 +64395,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66822,10 +64566,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -66987,10 +64731,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67143,10 +64887,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67290,10 +65034,10 @@ "deprecated": true, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -67442,10 +65186,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67589,10 +65333,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67602,7 +65346,7 @@ "tags": [ "tb-resource-controller" ], - "summary": "Download resource (downloadResource)", + "summary": "Download resource (downloadResourceIfChanged)", "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", "operationId": "downloadResourceIfChanged", "parameters": [ @@ -67773,10 +65517,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -67948,10 +65692,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68106,10 +65850,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -68272,10 +66016,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68439,10 +66183,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68597,10 +66341,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68769,10 +66513,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -68927,10 +66671,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69140,10 +66884,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69306,10 +67050,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69482,10 +67226,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69660,10 +67404,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -69852,10 +67596,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70043,10 +67787,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70329,10 +68073,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70496,10 +68240,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -70671,10 +68415,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70816,10 +68560,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -70962,10 +68706,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71108,10 +68852,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -71245,10 +68989,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71447,10 +69191,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71648,10 +69392,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71661,8 +69405,8 @@ "tags": [ "tenant-controller" ], - "summary": "Get Tenants list (getTenantsByIdsV2)", - "operationId": "getTenantsByIdsV2", + "summary": "Get Tenants list (getTenantsByIds)", + "operationId": "getTenantsByIds", "parameters": [ { "name": "tenantIds", @@ -71799,10 +69543,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -71944,10 +69688,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72090,10 +69834,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -72227,10 +69971,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72373,10 +70117,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72508,10 +70252,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72654,10 +70398,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -72846,10 +70590,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73040,10 +70784,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73191,10 +70935,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73326,10 +71070,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73469,10 +71213,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -73624,10 +71368,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73777,10 +71521,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -73920,10 +71664,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74066,10 +71810,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74204,10 +71948,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74339,10 +72083,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74352,9 +72096,9 @@ "tags": [ "two-factor-auth-config-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderTypes)", "description": "Get the list of provider types available for user to use (the ones configured by tenant or sysadmin).\nExample of response:\n```\n[\n \"TOTP\",\n \"EMAIL\",\n \"SMS\"\n]\n```\n\nAvailable for any authorized user. ", - "operationId": "getAvailableTwoFaProviders_1", + "operationId": "getAvailableTwoFaProviderTypes", "responses": { "200": { "description": "OK", @@ -74477,10 +72221,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74612,10 +72356,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -74755,10 +72499,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74890,10 +72634,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -74903,9 +72647,9 @@ "tags": [ "two-factor-auth-controller" ], - "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "summary": "Get available 2FA providers (getAvailableTwoFaProviderInfos)", "description": "Get the list of 2FA provider infos available for user to use. Example:\n```\n[\n {\n \"type\": \"EMAIL\",\n \"default\": true,\n \"contact\": \"ab*****ko@gmail.com\"\n },\n {\n \"type\": \"TOTP\",\n \"default\": false,\n \"contact\": null\n },\n {\n \"type\": \"SMS\",\n \"default\": false,\n \"contact\": \"+38********12\"\n }\n]\n```", - "operationId": "getAvailableTwoFaProviders", + "operationId": "getAvailableTwoFaProviderInfos", "responses": { "200": { "description": "OK", @@ -75028,10 +72772,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75181,10 +72925,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75319,10 +73063,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75454,10 +73198,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75588,10 +73332,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75791,10 +73535,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -75994,10 +73738,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76150,10 +73894,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76163,7 +73907,7 @@ "tags": [ "user-controller" ], - "summary": "Get information about last visited and starred dashboards (getLastVisitedDashboards)", + "summary": "Get information about last visited and starred dashboards (getUserDashboardsInfo)", "description": "Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "getUserDashboardsInfo", "responses": { @@ -76285,10 +74029,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76440,10 +74184,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -76584,10 +74328,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76729,10 +74473,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -76864,10 +74608,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77003,10 +74747,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77148,10 +74892,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77161,7 +74905,7 @@ "tags": [ "user-controller" ], - "summary": "Get user settings (getUserSettings)", + "summary": "Get user settings (getGeneralUserSettings)", "description": "Fetch the User settings based on authorized user. ", "operationId": "getGeneralUserSettings", "responses": { @@ -77283,10 +75027,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77294,7 +75038,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putGeneralUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putGeneralUserSettings", "requestBody": { @@ -77419,10 +75163,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77432,9 +75176,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings (deleteGeneralUserSettings)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings_1", + "operationId": "deleteGeneralUserSettings", "parameters": [ { "name": "paths", @@ -77558,10 +75302,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77704,10 +75448,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -77715,7 +75459,7 @@ "tags": [ "user-controller" ], - "summary": "Update user settings (saveUserSettings)", + "summary": "Update user settings (putUserSettings)", "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", "operationId": "putUserSettings", "parameters": [ @@ -77851,10 +75595,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -77864,9 +75608,9 @@ "tags": [ "user-controller" ], - "summary": "Delete user settings (deleteUserSettings)", + "summary": "Delete user settings by type (deleteUserSettingsByType)", "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", - "operationId": "deleteUserSettings", + "operationId": "deleteUserSettingsByType", "parameters": [ { "name": "paths", @@ -77999,10 +75743,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78134,10 +75878,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78280,10 +76024,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -78417,10 +76161,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78563,10 +76307,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78709,10 +76453,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -78855,10 +76599,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79003,10 +76747,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79197,10 +76941,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79400,10 +77144,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79594,10 +77338,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79607,9 +77351,9 @@ "tags": [ "user-controller" ], - "summary": "Get Users By Ids (getUsersByIdsV2)", + "summary": "Get Users By Ids (getUsersByIds)", "description": "Requested users must be owned by tenant or assigned to customer which user is performing the request. ", - "operationId": "getUsersByIdsV2", + "operationId": "getUsersByIds", "parameters": [ { "name": "userIds", @@ -79746,10 +77490,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -79892,10 +77636,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80046,10 +77790,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80201,10 +77945,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -80338,10 +78082,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80487,10 +78231,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80633,10 +78377,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -80886,10 +78630,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81044,10 +78788,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81289,10 +79033,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81304,7 +79048,7 @@ ], "summary": "Get all Widget types for specified Bundle (getBundleWidgetTypes)", "description": "Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getBundleWidgetTypesV2", + "operationId": "getBundleWidgetTypes", "parameters": [ { "name": "widgetsBundleId", @@ -81438,10 +79182,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81583,10 +79327,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -81738,10 +79482,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] }, @@ -81875,10 +79619,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82028,10 +79772,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82181,10 +79925,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82401,10 +80145,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82414,9 +80158,9 @@ "tags": [ "widgets-bundle-controller" ], - "summary": "Get all Widget Bundles (getWidgetsBundlesV2)", + "summary": "Get all Widget Bundles (getAllWidgetsBundles)", "description": "Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", - "operationId": "getWidgetsBundlesV2", + "operationId": "getAllWidgetsBundles", "responses": { "200": { "description": "OK", @@ -82539,10 +80283,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -82691,10 +80435,10 @@ }, "security": [ { - "http_login_form": [] + "HttpLoginForm": [] }, { - "api_key_form": [] + "ApiKeyForm": [] } ] } @@ -83031,6 +80775,16 @@ "provider" ] }, + "AiModelExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AiModelId": { "type": "object", "properties": { @@ -83261,8 +81015,30 @@ "triggerType" ] }, + "AlarmAssignmentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -83463,6 +81239,29 @@ "triggerType" ] }, + "AlarmCommentRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "AlarmCommentType": { "type": "string", "enum": [ @@ -84183,7 +81982,6 @@ ] }, "AlarmRuleBooleanFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -84338,7 +82136,6 @@ ] }, "AlarmRuleDurationCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -84383,7 +82180,6 @@ ] }, "AlarmRuleNoDataFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -84406,7 +82202,6 @@ ] }, "AlarmRuleNumericFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -84429,7 +82224,6 @@ ] }, "AlarmRuleRepeatingCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -84467,7 +82261,6 @@ ] }, "AlarmRuleSimpleCondition": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleCondition" @@ -84509,7 +82302,6 @@ ] }, "AlarmRuleStringFilterPredicate": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" @@ -85020,6 +82812,29 @@ "triggerType" ] }, + "ApiUsageLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ApiUsageStateFilter": { "allOf": [ { @@ -85132,6 +82947,16 @@ "name" ] }, + "AssetExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetId": { "type": "object", "properties": { @@ -85285,6 +83110,16 @@ } } }, + "AssetProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "AssetProfileId": { "type": "object", "properties": { @@ -86101,12 +83936,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -86121,12 +83959,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -86141,12 +83982,15 @@ "type": "object", "properties": { "created": { + "type": "integer", "format": "int32" }, "updated": { + "type": "integer", "format": "int32" }, "errors": { + "type": "integer", "format": "int32" }, "errorsList": { @@ -86990,6 +84834,16 @@ "title" ] }, + "CustomerExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "CustomerId": { "type": "object", "properties": { @@ -87104,6 +84958,16 @@ "title" ] }, + "DashboardExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DashboardId": { "type": "object", "properties": { @@ -87294,7 +85158,6 @@ ] }, "DefaultDeviceConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/DeviceConfiguration" @@ -87363,35 +85226,6 @@ "visible" ] }, - "DefaultNotificationRuleRecipientsConfig": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" - }, - { - "type": "object", - "properties": { - "triggerType": { - "$ref": "#/components/schemas/NotificationRuleTriggerType" - }, - "targets": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 1 - } - } - } - ], - "description": "Default notification rule recipients configuration", - "required": [ - "targets", - "triggerType" - ] - }, "DefaultPageId": { "type": "string", "enum": [ @@ -87893,6 +85727,29 @@ "triggerType" ] }, + "DeviceActivityRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "DeviceConfiguration": { "type": "object", "description": "Device configuration", @@ -88311,6 +86168,16 @@ } } }, + "DeviceProfileExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "DeviceProfileId": { "type": "object", "properties": { @@ -88659,7 +86526,6 @@ ] }, "DummyJobConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/JobConfiguration" @@ -88958,6 +86824,29 @@ "triggerType" ] }, + "EdgeCommunicationFailureRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectionNotificationRuleTriggerConfig": { "allOf": [ { @@ -88988,6 +86877,29 @@ "triggerType" ] }, + "EdgeConnectionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EdgeConnectivityEvent": { "type": "string", "enum": [ @@ -89439,6 +87351,29 @@ "triggerType" ] }, + "EntitiesLimitRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EntityActionNotificationRuleTriggerConfig": { "allOf": [ { @@ -89470,8 +87405,30 @@ "triggerType" ] }, + "EntityActionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "EntityAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -89673,11 +87630,22 @@ "discriminator": { "propertyName": "entityType", "mapping": { + "CUSTOMER": "#/components/schemas/CustomerExportData", "DEVICE": "#/components/schemas/DeviceExportData", "RULE_CHAIN": "#/components/schemas/RuleChainExportData", "WIDGET_TYPE": "#/components/schemas/WidgetTypeExportData", "WIDGETS_BUNDLE": "#/components/schemas/WidgetsBundleExportData", - "OTA_PACKAGE": "#/components/schemas/OtaPackageExportData" + "OTA_PACKAGE": "#/components/schemas/OtaPackageExportData", + "TB_RESOURCE": "#/components/schemas/TbResourceExportData", + "DASHBOARD": "#/components/schemas/DashboardExportData", + "ASSET_PROFILE": "#/components/schemas/AssetProfileExportData", + "ASSET": "#/components/schemas/AssetExportData", + "DEVICE_PROFILE": "#/components/schemas/DeviceProfileExportData", + "ENTITY_VIEW": "#/components/schemas/EntityViewExportData", + "NOTIFICATION_TEMPLATE": "#/components/schemas/NotificationTemplateExportData", + "NOTIFICATION_TARGET": "#/components/schemas/NotificationTargetExportData", + "NOTIFICATION_RULE": "#/components/schemas/NotificationRuleExportData", + "AI_MODEL": "#/components/schemas/AiModelExportData" } }, "properties": { @@ -90230,6 +88198,16 @@ "type" ] }, + "EntityViewExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "EntityViewId": { "type": "object", "properties": { @@ -90448,7 +88426,6 @@ ] }, "EscalatedNotificationRuleRecipientsConfig": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" @@ -90601,9 +88578,6 @@ "FeaturesInfo": { "type": "object", "properties": { - "notificationEnabled": { - "type": "boolean" - }, "twoFaEnabled": { "type": "boolean" }, @@ -90615,6 +88589,9 @@ }, "oauthEnabled": { "type": "boolean" + }, + "notificationEnabled": { + "type": "boolean" } } }, @@ -90695,7 +88672,6 @@ } }, "GeofencingCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -91101,9 +89077,7 @@ "HasIdObject": { "type": "object", "properties": { - "id": { - - } + "id": {} } }, "HomeDashboardInfo": { @@ -91325,9 +89299,7 @@ }, "JsonNode": { "description": "A value representing the any type (object or primitive)", - "example": { - - } + "example": {} }, "JsonTransportPayloadConfiguration": { "allOf": [ @@ -91948,9 +89920,7 @@ "useOldApi": { "type": "boolean" }, - "id": { - - }, + "id": {}, "title": { "type": "string" }, @@ -92523,6 +90493,29 @@ "triggerType" ] }, + "NewPlatformVersionRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "NoSecLwM2MBootstrapServerCredential": { "allOf": [ { @@ -92957,6 +90950,7 @@ "sent": { "type": "object", "additionalProperties": { + "type": "integer", "format": "int32" }, "description": "Number of successfully sent notifications per delivery method", @@ -92976,6 +90970,7 @@ "description": "Errors per delivery method. Each entry maps recipient name to error message" }, "totalErrors": { + "type": "integer", "format": "int32", "description": "Total number of errors across all delivery methods" }, @@ -93048,6 +91043,16 @@ } } }, + "NotificationRuleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationRuleId": { "type": "object", "properties": { @@ -93132,20 +91137,20 @@ "discriminator": { "propertyName": "triggerType", "mapping": { - "ENTITY_ACTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", + "ENTITY_ACTION": "#/components/schemas/EntityActionRecipientsConfig", "ALARM": "#/components/schemas/EscalatedNotificationRuleRecipientsConfig", - "ALARM_COMMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ALARM_ASSIGNMENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "DEVICE_ACTIVITY": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_CONNECTION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "NEW_PLATFORM_VERSION": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "ENTITIES_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "API_USAGE_LIMIT": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RATE_LIMITS": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "TASK_PROCESSING_FAILURE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig", - "RESOURCES_SHORTAGE": "#/components/schemas/DefaultNotificationRuleRecipientsConfig" + "ALARM_COMMENT": "#/components/schemas/AlarmCommentRecipientsConfig", + "ALARM_ASSIGNMENT": "#/components/schemas/AlarmAssignmentRecipientsConfig", + "DEVICE_ACTIVITY": "#/components/schemas/DeviceActivityRecipientsConfig", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT": "#/components/schemas/RuleEngineComponentLifecycleEventRecipientsConfig", + "EDGE_CONNECTION": "#/components/schemas/EdgeConnectionRecipientsConfig", + "EDGE_COMMUNICATION_FAILURE": "#/components/schemas/EdgeCommunicationFailureRecipientsConfig", + "NEW_PLATFORM_VERSION": "#/components/schemas/NewPlatformVersionRecipientsConfig", + "ENTITIES_LIMIT": "#/components/schemas/EntitiesLimitRecipientsConfig", + "API_USAGE_LIMIT": "#/components/schemas/ApiUsageLimitRecipientsConfig", + "RATE_LIMITS": "#/components/schemas/RateLimitsRecipientsConfig", + "TASK_PROCESSING_FAILURE": "#/components/schemas/TaskProcessingFailureRecipientsConfig", + "RESOURCES_SHORTAGE": "#/components/schemas/ResourceShortageRecipientsConfig" } }, "properties": { @@ -93279,6 +91284,42 @@ "type" ] }, + "NotificationTargetExportData": { + "type": "object", + "properties": { + "entityType": { + "$ref": "#/components/schemas/EntityType" + }, + "entity": { + "$ref": "#/components/schemas/ExportableEntity" + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttributeExportData" + } + }, + "description": "Map of attributes where key is the scope of attributes and value is the list of attributes for that scope" + }, + "calculatedFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalculatedField" + } + } + }, + "required": [ + "entityType" + ] + }, "NotificationTargetId": { "type": "object", "properties": { @@ -93350,6 +91391,16 @@ "deliveryMethodsTemplates" ] }, + "NotificationTemplateExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "NotificationTemplateId": { "type": "object", "properties": { @@ -94168,7 +92219,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1 + "example": 1.0 }, "tag": { "type": "string", @@ -94332,7 +92383,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1 + "example": 1.0 }, "tag": { "type": "string", @@ -94475,9 +92526,7 @@ "type" ] }, - "OutputStrategy": { - - }, + "OutputStrategy": {}, "PSKLwM2MBootstrapServerCredential": { "allOf": [ { @@ -96239,7 +94288,6 @@ ] }, "PropagationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -96650,6 +94698,29 @@ "triggerType" ] }, + "RateLimitsRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ReferencedEntityKey": { "type": "object", "properties": { @@ -96665,7 +94736,6 @@ } }, "RelatedEntitiesAggregationCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -97004,6 +95074,29 @@ } } }, + "ResourceShortageRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "minItems": 1 + } + } + } + ], + "required": [ + "targets" + ] + }, "ResourceSubType": { "type": "string", "enum": [ @@ -97492,6 +95585,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": { @@ -97714,7 +95830,7 @@ "version": { "type": "string", "description": "OTA Package version.", - "example": 1 + "example": 1.0 }, "tag": { "type": "string", @@ -97782,7 +95898,6 @@ } }, "ScriptCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -97931,7 +96046,6 @@ ] }, "SimpleCalculatedFieldConfiguration": { - "type": "object", "allOf": [ { "$ref": "#/components/schemas/CalculatedFieldConfiguration" @@ -98665,9 +96779,7 @@ } } }, - "SystemLevelUsersFilter": { - - }, + "SystemLevelUsersFilter": {}, "TaskProcessingFailureNotificationRuleTriggerConfig": { "allOf": [ { @@ -98678,6 +96790,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": { @@ -98882,6 +97017,16 @@ } } }, + "TbResourceExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "required": [ + "entityType" + ] + }, "TbResourceId": { "type": "object", "properties": { @@ -99563,7 +97708,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": { @@ -100373,9 +98534,7 @@ "type" ] }, - "Version": { - - }, + "Version": {}, "VersionCreateConfig": { "type": "object", "properties": { @@ -101162,18 +99321,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/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index f1d8c6a3..a70987f6 100644 --- a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -3955,129 +3955,6 @@ private HttpRequest.Builder checkUpdatesRequestBuilder(Map heade return localVarRequestBuilder; } - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDevice(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return String - * @throws ApiException if fails to make API call - */ - public String claimDevice(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceToken, body, headers); - return localVarResponse.getData(); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body) throws ApiException { - return claimDeviceWithHttpInfo(deviceToken, body, null); - } - - /** - * Save claiming information (claimDevice) - * Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). - * @param deviceToken Your device access token. (required) - * @param body (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<String> - * @throws ApiException if fails to make API call - */ - public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceToken, body, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nullable String body, Map headers) throws ApiException { - // verify the required parameter 'deviceToken' is set - if (deviceToken == null) { - throw new ApiException(400, "Missing the required parameter 'deviceToken' when calling claimDevice"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/v1/{deviceToken}/claim" - .replace("{deviceToken}", ApiClient.urlEncode(deviceToken.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Claim device (claimDevice) * Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. @@ -4086,8 +3963,8 @@ private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1(deviceName, claimRequest, null); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDevice(deviceName, claimRequest, null); } /** @@ -4099,8 +3976,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return String * @throws ApiException if fails to make API call */ - public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = claimDevice1WithHttpInfo(deviceName, claimRequest, headers); + public String claimDevice(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + ApiResponse localVarResponse = claimDeviceWithHttpInfo(deviceName, claimRequest, headers); return localVarResponse.getData(); } @@ -4112,8 +3989,8 @@ public String claimDevice1(@javax.annotation.Nonnull String deviceName, @javax.a * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { - return claimDevice1WithHttpInfo(deviceName, claimRequest, null); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest) throws ApiException { + return claimDeviceWithHttpInfo(deviceName, claimRequest, null); } /** @@ -4125,8 +4002,8 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = claimDevice1RequestBuilder(deviceName, claimRequest, headers); + public ApiResponse claimDeviceWithHttpInfo(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = claimDeviceRequestBuilder(deviceName, claimRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -4137,7 +4014,7 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("claimDevice1", localVarResponse); + throw getApiException("claimDevice", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -4173,10 +4050,10 @@ public ApiResponse claimDevice1WithHttpInfo(@javax.annotation.Nonnull St } } - private HttpRequest.Builder claimDevice1RequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { + private HttpRequest.Builder claimDeviceRequestBuilder(@javax.annotation.Nonnull String deviceName, @javax.annotation.Nullable ClaimRequest claimRequest, Map headers) throws ApiException { // verify the required parameter 'deviceName' is set if (deviceName == null) { - throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice1"); + throw new ApiException(400, "Missing the required parameter 'deviceName' when calling claimDevice"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -4476,134 +4353,6 @@ private HttpRequest.Builder clearEventsRequestBuilder(@javax.annotation.Nonnull return localVarRequestBuilder; } - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @throws ApiException if fails to make API call - */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - codeProcessingUrl(code, state, null); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void codeProcessingUrl(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - codeProcessingUrlWithHttpInfo(code, state, headers); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { - return codeProcessingUrlWithHttpInfo(code, state, null); - } - - /** - * codeProcessingUrl - * - * @param code (required) - * @param state (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse codeProcessingUrlWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = codeProcessingUrlRequestBuilder(code, state, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("codeProcessingUrl", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder codeProcessingUrlRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { - // verify the required parameter 'code' is set - if (code == null) { - throw new ApiException(400, "Missing the required parameter 'code' when calling codeProcessingUrl"); - } - // verify the required parameter 'state' is set - if (state == null) { - throw new ApiException(400, "Missing the required parameter 'state' when calling codeProcessingUrl"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/admin/mail/oauth2/code"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "code"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); - localVarQueryParameterBaseName = "state"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Compare entity data to version (compareEntityDataToVersion) * Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. @@ -7437,6 +7186,110 @@ private HttpRequest.Builder deleteEntityViewRequestBuilder(@javax.annotation.Non return localVarRequestBuilder; } + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths) throws ApiException { + deleteGeneralUserSettings(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void deleteGeneralUserSettings(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + deleteGeneralUserSettingsWithHttpInfo(paths, headers); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { + return deleteGeneralUserSettingsWithHttpInfo(paths, null); + } + + /** + * Delete user settings (deleteGeneralUserSettings) + * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter + * @param paths paths (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGeneralUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteGeneralUserSettingsRequestBuilder(paths, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("deleteGeneralUserSettings", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder deleteGeneralUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { + // verify the required parameter 'paths' is set + if (paths == null) { + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteGeneralUserSettings"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/user/settings/{paths}" + .replace("{paths}", ApiClient.urlEncode(paths.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * deleteImage * @@ -8736,10 +8589,11 @@ private HttpRequest.Builder deleteQueueRequestBuilder(@javax.annotation.Nonnull * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return deleteRelation(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } /** @@ -8752,10 +8606,12 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + public EntityRelation deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse localVarResponse = deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); + return localVarResponse.getData(); } /** @@ -8767,10 +8623,10 @@ public void deleteRelation(@javax.annotation.Nonnull String fromId, @javax.annot * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { return deleteRelationWithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); } @@ -8784,10 +8640,10 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St * @param toType A string value representing the entity type. For example, 'DEVICE' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = deleteRelationRequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -8802,173 +8658,6 @@ public ApiResponse deleteRelationWithHttpInfo(@javax.annotation.Nonnull St throw getApiException("deleteRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelation"); - } - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelation"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelation"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelation"); - } - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "fromId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromId", fromId)); - localVarQueryParameterBaseName = "fromType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fromType", fromType)); - localVarQueryParameterBaseName = "relationType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationType", relationType)); - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - localVarQueryParameterBaseName = "toId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toId", toId)); - localVarQueryParameterBaseName = "toType"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("toType", toType)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation deleteRelationV2(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse localVarResponse = deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return deleteRelationV2WithHttpInfo(fromId, fromType, relationType, toId, toType, relationTypeGroup, null); - } - - /** - * Delete Relation (deleteRelationV2) - * Deletes a relation between two entities in the platform. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteRelationV2RequestBuilder(fromId, fromType, relationType, toId, toType, relationTypeGroup, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -9002,26 +8691,26 @@ public ApiResponse deleteRelationV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + private HttpRequest.Builder deleteRelationRequestBuilder(@javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String relationType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String toType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { // verify the required parameter 'fromId' is set if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'fromId' when calling deleteRelation"); } // verify the required parameter 'fromType' is set if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'fromType' when calling deleteRelation"); } // verify the required parameter 'relationType' is set if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'relationType' when calling deleteRelation"); } // verify the required parameter 'toId' is set if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'toId' when calling deleteRelation"); } // verify the required parameter 'toType' is set if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelationV2"); + throw new ApiException(400, "Missing the required parameter 'toType' when calling deleteRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -9070,7 +8759,7 @@ private HttpRequest.Builder deleteRelationV2RequestBuilder(@javax.annotation.Non } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -9081,7 +8770,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -9093,7 +8782,7 @@ public void deleteRelations(@javax.annotation.Nonnull String entityId, @javax.an } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -9105,7 +8794,7 @@ public ApiResponse deleteRelationsWithHttpInfo(@javax.annotation.Nonnull S } /** - * Delete common relations (deleteCommonRelations) + * Delete common relations (deleteRelations) * Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) @@ -10082,42 +9771,42 @@ private HttpRequest.Builder deleteUserRequestBuilder(@javax.annotation.Nonnull S } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - deleteUserSettings(paths, type, null); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + deleteUserSettingsByType(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void deleteUserSettings(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - deleteUserSettingsWithHttpInfo(paths, type, headers); + public void deleteUserSettingsByType(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + deleteUserSettingsByTypeWithHttpInfo(paths, type, headers); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { - return deleteUserSettingsWithHttpInfo(paths, type, null); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type) throws ApiException { + return deleteUserSettingsByTypeWithHttpInfo(paths, type, null); } /** - * Delete user settings (deleteUserSettings) + * Delete user settings by type (deleteUserSettingsByType) * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter * @param paths paths (required) * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) @@ -10125,8 +9814,8 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsRequestBuilder(paths, type, headers); + public ApiResponse deleteUserSettingsByTypeWithHttpInfo(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteUserSettingsByTypeRequestBuilder(paths, type, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -10137,7 +9826,7 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings", localVarResponse); + throw getApiException("deleteUserSettingsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -10162,14 +9851,14 @@ public ApiResponse deleteUserSettingsWithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { + private HttpRequest.Builder deleteUserSettingsByTypeRequestBuilder(@javax.annotation.Nonnull String paths, @javax.annotation.Nonnull String type, Map headers) throws ApiException { // verify the required parameter 'paths' is set if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettingsByType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettings"); + throw new ApiException(400, "Missing the required parameter 'type' when calling deleteUserSettingsByType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -10194,110 +9883,6 @@ private HttpRequest.Builder deleteUserSettingsRequestBuilder(@javax.annotation.N return localVarRequestBuilder; } - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @throws ApiException if fails to make API call - */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths) throws ApiException { - deleteUserSettings1(paths, null); - } - - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void deleteUserSettings1(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - deleteUserSettings1WithHttpInfo(paths, headers); - } - - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths) throws ApiException { - return deleteUserSettings1WithHttpInfo(paths, null); - } - - /** - * Delete user settings (deleteUserSettings) - * Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter - * @param paths paths (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse deleteUserSettings1WithHttpInfo(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = deleteUserSettings1RequestBuilder(paths, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("deleteUserSettings1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder deleteUserSettings1RequestBuilder(@javax.annotation.Nonnull String paths, Map headers) throws ApiException { - // verify the required parameter 'paths' is set - if (paths == null) { - throw new ApiException(400, "Missing the required parameter 'paths' when calling deleteUserSettings1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/user/settings/{paths}" - .replace("{paths}", ApiClient.urlEncode(paths.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Delete widget type (deleteWidgetType) * Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -11765,7 +11350,7 @@ private HttpRequest.Builder downloadResourceRequestBuilder(@javax.annotation.Non } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -11779,7 +11364,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -11795,7 +11380,7 @@ public File downloadResourceIfChanged(@javax.annotation.Nonnull String resourceT } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -11809,7 +11394,7 @@ public ApiResponse downloadResourceIfChangedWithHttpInfo(@javax.annotation } /** - * Download resource (downloadResource) + * Download resource (downloadResourceIfChanged) * Download resource with a given type and key for the given scope Available for any authorized user. * @param resourceType Type of the resource (required) * @param scope Scope of the resource (required) @@ -12532,6 +12117,129 @@ private HttpRequest.Builder findAlarmDataByQueryRequestBuilder(@javax.annotation return localVarRequestBuilder; } + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @return List<Asset> + * @throws ApiException if fails to make API call + */ + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQuery(assetSearchQuery, null); + } + + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @param headers Optional headers to include in the request + * @return List<Asset> + * @throws ApiException if fails to make API call + */ + public List findAssetsByQuery(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findAssetsByQueryWithHttpInfo(assetSearchQuery, headers); + return localVarResponse.getData(); + } + + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @return ApiResponse<List<Asset>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { + return findAssetsByQueryWithHttpInfo(assetSearchQuery, null); + } + + /** + * Find related assets (findAssetsByQuery) + * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. + * @param assetSearchQuery (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<Asset>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> findAssetsByQueryWithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findAssetsByQueryRequestBuilder(assetSearchQuery, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("findAssetsByQuery", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder findAssetsByQueryRequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'assetSearchQuery' is set + if (assetSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findAssetsByQuery"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/assets"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Find Available Entity Keys by Query (deprecated) * **Deprecated.** Use the V2 endpoint (`POST /api/v2/entitiesQuery/find/keys`) instead. Returns unique time series and/or attribute key names from entities matching the query. Executes the Entity Data Query to find up to 100 entities, then fetches and aggregates all distinct key names. Primarily used for UI features like autocomplete suggestions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -12863,62 +12571,50 @@ private HttpRequest.Builder findAvailableEntityKeysByQueryV2RequestBuilder(@java } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQuery(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<Device> * @throws ApiException if fails to make API call */ - public List findByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); + public List findDevicesByQuery(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findDevicesByQueryWithHttpInfo(deviceSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { + return findDevicesByQueryWithHttpInfo(deviceSearchQuery, null); } /** - * Get List of Relations (findByFromAndRelationType) - * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related devices (findDevicesByQuery) + * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param deviceSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<Device>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); + public ApiResponse> findDevicesByQueryWithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findDevicesByQueryRequestBuilder(deviceSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -12929,11 +12625,11 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromAndRelationType", localVarResponse); + throw getApiException("findDevicesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -12943,10 +12639,10 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -12965,193 +12661,27 @@ public ApiResponse> findByFromAndRelationTypeWithHttpInfo(@ } } - private HttpRequest.Builder findByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromAndRelationType"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromAndRelationType"); - } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByFromAndRelationType"); + private HttpRequest.Builder findDevicesByQueryRequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'deviceSearchQuery' is set + if (deviceSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findDevicesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/devices"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelation> - * @throws ApiException if fails to make API call - */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2(fromType, fromId, relationTypeGroup, null); - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return List<EntityRelation> - * @throws ApiException if fails to make API call - */ - public List findByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); - return localVarResponse.getData(); - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelation>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); - } - - /** - * Get List of Relations (findByFromV2) - * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> findByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByFromV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findByFromV2"); - } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findByFromV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relations/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -13164,50 +12694,50 @@ private HttpRequest.Builder findByFromV2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return List<EntityRelation> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQuery(entityRelationsQuery, null); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQuery(edgeSearchQuery, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelation> + * @return List<Edge> * @throws ApiException if fails to make API call */ - public List findByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQueryWithHttpInfo(entityRelationsQuery, headers); + public List findEdgesByQuery(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEdgesByQueryWithHttpInfo(edgeSearchQuery, headers); return localVarResponse.getData(); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelation>> + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { + return findEdgesByQueryWithHttpInfo(edgeSearchQuery, null); } /** - * Find related entities (findByQuery) - * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. - * @param entityRelationsQuery (required) + * Find related edges (findEdgesByQuery) + * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param edgeSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelation>> + * @return ApiResponse<List<Edge>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse> findEdgesByQueryWithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEdgesByQueryRequestBuilder(edgeSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13218,11 +12748,11 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery", localVarResponse); + throw getApiException("findEdgesByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13232,10 +12762,10 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13254,15 +12784,15 @@ public ApiResponse> findByQueryWithHttpInfo(@javax.annotati } } - private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findByQuery"); + private HttpRequest.Builder findEdgesByQueryRequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'edgeSearchQuery' is set + if (edgeSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findEdgesByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations"; + String localVarPath = "/api/edges"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13270,7 +12800,7 @@ private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -13287,50 +12817,50 @@ private HttpRequest.Builder findByQueryRequestBuilder(@javax.annotation.Nonnull } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return List<EntityView> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1(entityViewSearchQuery, null); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQuery(entityDataQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityView> + * @return PageDataEntityData * @throws ApiException if fails to make API call */ - public List findByQuery1(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery1WithHttpInfo(entityViewSearchQuery, headers); + public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); return localVarResponse.getData(); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) - * @return ApiResponse<List<EntityView>> + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { - return findByQuery1WithHttpInfo(entityViewSearchQuery, null); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { + return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); } /** - * Find related entity views (findByQuery) - * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityViewSearchQuery (required) + * Find Entity Data by Query + * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityDataQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityView>> + * @return ApiResponse<PageDataEntityData> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery1RequestBuilder(entityViewSearchQuery, headers); + public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13341,11 +12871,11 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery1", localVarResponse); + throw getApiException("findEntityDataByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13355,10 +12885,10 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13377,15 +12907,15 @@ public ApiResponse> findByQuery1WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'entityViewSearchQuery' is set - if (entityViewSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findByQuery1"); + private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { + // verify the required parameter 'entityDataQuery' is set + if (entityDataQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entityViews"; + String localVarPath = "/api/entitiesQuery/find"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13393,7 +12923,7 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -13410,50 +12940,58 @@ private HttpRequest.Builder findByQuery1RequestBuilder(@javax.annotation.Nonnull } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return List<Edge> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2(edgeSearchQuery, null); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<Edge> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery2(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery2WithHttpInfo(edgeSearchQuery, headers); + public List findEntityRelationInfosByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) - * @return ApiResponse<List<Edge>> + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery) throws ApiException { - return findByQuery2WithHttpInfo(edgeSearchQuery, null); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Find related edges (findByQuery) - * Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param edgeSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByFrom) + * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Edge>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery2RequestBuilder(edgeSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13464,11 +13002,11 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery2", localVarResponse); + throw getApiException("findEntityRelationInfosByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13478,10 +13016,10 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13500,27 +13038,42 @@ public ApiResponse> findByQuery2WithHttpInfo(@javax.annotation.Nonnul } } - private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull EdgeSearchQuery edgeSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'edgeSearchQuery' is set - if (edgeSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'edgeSearchQuery' when calling findByQuery2"); + private HttpRequest.Builder findEntityRelationInfosByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationInfosByFrom"); + } + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationInfosByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/edges"; + String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(edgeSearchQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -13533,50 +13086,50 @@ private HttpRequest.Builder findByQuery2RequestBuilder(@javax.annotation.Nonnull } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) - * @return List<Device> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3(deviceSearchQuery, null); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQuery(entityRelationsQuery, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return List<Device> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery3(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery3WithHttpInfo(deviceSearchQuery, headers); + public List findEntityRelationInfosByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) - * @return ApiResponse<List<Device>> + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery) throws ApiException { - return findByQuery3WithHttpInfo(deviceSearchQuery, null); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationInfosByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find related devices (findByQuery) - * Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param deviceSearchQuery (required) + * Find related entity infos (findEntityRelationInfosByQuery) + * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Device>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery3RequestBuilder(deviceSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13587,11 +13140,11 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery3", localVarResponse); + throw getApiException("findEntityRelationInfosByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13601,10 +13154,10 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13623,15 +13176,15 @@ public ApiResponse> findByQuery3WithHttpInfo(@javax.annotation.Nonn } } - private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull DeviceSearchQuery deviceSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'deviceSearchQuery' is set - if (deviceSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'deviceSearchQuery' when calling findByQuery3"); + private HttpRequest.Builder findEntityRelationInfosByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationInfosByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/devices"; + String localVarPath = "/api/relations/info"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -13639,7 +13192,7 @@ private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(deviceSearchQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -13656,50 +13209,58 @@ private HttpRequest.Builder findByQuery3RequestBuilder(@javax.annotation.Nonnull } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) - * @return List<Asset> + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4(assetSearchQuery, null); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByTo(toType, toId, relationTypeGroup, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<Asset> + * @return List<EntityRelationInfo> * @throws ApiException if fails to make API call */ - public List findByQuery4(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByQuery4WithHttpInfo(assetSearchQuery, headers); + public List findEntityRelationInfosByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) - * @return ApiResponse<List<Asset>> + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery) throws ApiException { - return findByQuery4WithHttpInfo(assetSearchQuery, null); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationInfosByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Find related assets (findByQuery) - * Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. - * @param assetSearchQuery (required) + * Get List of Relation Infos (findEntityRelationInfosByTo) + * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<Asset>> + * @return ApiResponse<List<EntityRelationInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByQuery4RequestBuilder(assetSearchQuery, headers); + public ApiResponse> findEntityRelationInfosByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationInfosByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13710,11 +13271,11 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByQuery4", localVarResponse); + throw getApiException("findEntityRelationInfosByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -13724,10 +13285,10 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -13746,27 +13307,42 @@ public ApiResponse> findByQuery4WithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull AssetSearchQuery assetSearchQuery, Map headers) throws ApiException { - // verify the required parameter 'assetSearchQuery' is set - if (assetSearchQuery == null) { - throw new ApiException(400, "Missing the required parameter 'assetSearchQuery' when calling findByQuery4"); + private HttpRequest.Builder findEntityRelationInfosByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationInfosByTo"); + } + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationInfosByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/assets"; + String localVarPath = "/api/relations/info/to/{toType}/{toId}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(assetSearchQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -13779,62 +13355,58 @@ private HttpRequest.Builder findByQuery4RequestBuilder(@javax.annotation.Nonnull } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFrom(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); + public List findEntityRelationsByFrom(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromWithHttpInfo(fromType, fromId, relationTypeGroup, null); } /** - * Get List of Relations (findByToAndRelationType) - * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * Get List of Relations (findEntityRelationsByFrom) + * Returns list of relation objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByFromWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromRequestBuilder(fromType, fromId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13845,7 +13417,7 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToAndRelationType", localVarResponse); + throw getApiException("findEntityRelationsByFrom", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -13881,26 +13453,21 @@ public ApiResponse> findByToAndRelationTypeWithHttpInfo(@ja } } - private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToAndRelationType"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToAndRelationType"); + private HttpRequest.Builder findEntityRelationsByFromRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFrom"); } - // verify the required parameter 'relationType' is set - if (relationType == null) { - throw new ApiException(400, "Missing the required parameter 'relationType' when calling findByToAndRelationType"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFrom"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())) - .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -13934,58 +13501,62 @@ private HttpRequest.Builder findByToAndRelationTypeRequestBuilder(@javax.annotat } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2(toType, toId, relationTypeGroup, null); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationType(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityRelationsByFromAndRelationType(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByFromAndRelationTypeWithHttpInfo(fromType, fromId, relationType, relationTypeGroup, null); } /** - * Get List of Relations (findByToV2) - * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByFromAndRelationType) + * Returns list of relation objects for the specified entity by the 'from' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) + * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByFromAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByFromAndRelationTypeRequestBuilder(fromType, fromId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13996,7 +13567,7 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findByToV2", localVarResponse); + throw getApiException("findEntityRelationsByFromAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -14032,21 +13603,26 @@ public ApiResponse> findByToV2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findByToV2"); + private HttpRequest.Builder findEntityRelationsByFromAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'fromType' is set + if (fromType == null) { + throw new ApiException(400, "Missing the required parameter 'fromType' when calling findEntityRelationsByFromAndRelationType"); } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findByToV2"); + // verify the required parameter 'fromId' is set + if (fromId == null) { + throw new ApiException(400, "Missing the required parameter 'fromId' when calling findEntityRelationsByFromAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByFromAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); + String localVarPath = "/api/relations/from/{fromType}/{fromId}/{relationType}" + .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) + .replace("{fromId}", ApiClient.urlEncode(fromId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -14080,50 +13656,50 @@ private HttpRequest.Builder findByToV2RequestBuilder(@javax.annotation.Nonnull S } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return PageDataEntityData + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQuery(entityDataQuery, null); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQuery(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return PageDataEntityData + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public PageDataEntityData findEntityDataByQuery(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - ApiResponse localVarResponse = findEntityDataByQueryWithHttpInfo(entityDataQuery, headers); + public List findEntityRelationsByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, headers); return localVarResponse.getData(); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) - * @return ApiResponse<PageDataEntityData> + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery) throws ApiException { - return findEntityDataByQueryWithHttpInfo(entityDataQuery, null); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { + return findEntityRelationsByQueryWithHttpInfo(entityRelationsQuery, null); } /** - * Find Entity Data by Query - * Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data. # Query Definition Main **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\" Optional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\". The **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity. The **page link** contains information about the page to fetch and the sort ordering. Let's review the example: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\", \"inherit\": false } }, \"type\": \"NUMERIC\" } } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"label\" }, { \"type\": \"ENTITY_FIELD\", \"key\": \"additionalInfo\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ], \"pageLink\": { \"page\": 0, \"pageSize\": 10, \"sortOrder\": { \"key\": { \"key\": \"name\", \"type\": \"ENTITY_FIELD\" }, \"direction\": \"ASC\" } } } ``` Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax: # Entity Filters Entity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases. ## Single Entity Allows to filter only one entity based on the id. For example, this entity filter selects certain device: ```json { \"type\": \"singleEntity\", \"singleEntity\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"DEVICE\" } } ``` ## Entity List Filter Allows to filter entities of the same type using their ids. For example, this entity filter selects two devices: ```json { \"type\": \"entityList\", \"entityType\": \"DEVICE\", \"entityList\": [ \"e6501f30-2a7a-11ec-94eb-213c95f54092\", \"e6657bf0-2a7a-11ec-94eb-213c95f54092\" ] } ``` ## Entity Name Filter Allows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality': ```json { \"type\": \"entityName\", \"entityType\": \"DEVICE\", \"entityNameFilter\": \"Air Quality\" } ``` ## Entity Type Filter Allows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers: ```json { \"type\": \"entityType\", \"entityType\": \"CUSTOMER\" } ``` ## Asset Type Filter Allows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla': ```json { \"type\": \"assetType\", \"assetType\": \"charging station\", \"assetNameFilter\": \"Tesla\" } ``` ## Device Type Filter Allows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC': ```json { \"type\": \"deviceType\", \"deviceType\": \"Temperature Sensor\", \"deviceNameFilter\": \"ABC\" } ``` ## Edge Type Filter Allows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada': ```json { \"type\": \"edgeType\", \"edgeType\": \"Factory\", \"edgeNameFilter\": \"Nevada\" } ``` ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` ## Api Usage Filter Allows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"apiUsageState\", \"customerId\": { \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\", \"entityType\": \"CUSTOMER\" } } ``` ## Relations Query Filter Allows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'. For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092': ```json { \"type\": \"relationsQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"filters\": [ { \"relationType\": \"Contains\", \"entityTypes\": [ \"DEVICE\", \"ASSET\" ] } ] } ``` ## Asset Search Query Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions. For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"assetSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"assetTypes\": [ \"charging station\" ] } ``` ## Device Search Query Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"deviceTypes\": [ \"Air Quality Sensor\", \"Charging port\" ] } ``` ## Entity View Query Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"entityViewSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 1, \"fetchLastLevelOnly\": false, \"relationType\": \"Contains\", \"entityViewTypes\": [ \"Concrete mixer\" ] } ``` ## Edge Search Query Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions. For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation: ```json { \"type\": \"deviceSearchQuery\", \"rootEntity\": { \"entityType\": \"ASSET\", \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\" }, \"direction\": \"FROM\", \"maxLevel\": 2, \"fetchLastLevelOnly\": true, \"relationType\": \"Contains\", \"edgeTypes\": [ \"Factory\" ] } ``` # Key Filters Key Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees: ```json { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ``` Now let's review 'key', 'valueType' and 'predicate' objects in detail. ## Filter Key Filter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'CLIENT_ATTRIBUTE' - used for client attributes; * 'SHARED_ATTRIBUTE' - used for shared attributes; * 'SERVER_ATTRIBUTE' - used for server attributes; * 'ATTRIBUTE' - used for any of the above; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": { \"sourceType\": \"CURRENT_USER\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. - * @param entityDataQuery (required) + * Find related entities (findEntityRelationsByQuery) + * Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. + * @param entityRelationsQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEntityData> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse findEntityDataByQueryWithHttpInfo(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findEntityDataByQueryRequestBuilder(entityDataQuery, headers); + public ApiResponse> findEntityRelationsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByQueryRequestBuilder(entityRelationsQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14134,11 +13710,11 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findEntityDataByQuery", localVarResponse); + throw getApiException("findEntityRelationsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14148,10 +13724,10 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEntityData responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14170,15 +13746,15 @@ public ApiResponse findEntityDataByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotation.Nonnull EntityDataQuery entityDataQuery, Map headers) throws ApiException { - // verify the required parameter 'entityDataQuery' is set - if (entityDataQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityDataQuery' when calling findEntityDataByQuery"); + private HttpRequest.Builder findEntityRelationsByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { + // verify the required parameter 'entityRelationsQuery' is set + if (entityRelationsQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findEntityRelationsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/entitiesQuery/find"; + String localVarPath = "/api/relations"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -14186,7 +13762,7 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityDataQuery); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -14203,58 +13779,58 @@ private HttpRequest.Builder findEntityDataByQueryRequestBuilder(@javax.annotatio } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2(fromType, fromId, relationTypeGroup, null); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByTo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByFromV2(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, headers); + public List findEntityRelationsByTo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByFromV2WithHttpInfo(fromType, fromId, relationTypeGroup, null); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToWithHttpInfo(toType, toId, relationTypeGroup, null); } /** - * Get List of Relation Infos (findInfoByFromV2) - * Returns list of relation info objects for the specified entity by the 'from' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param fromType A string value representing the entity type. For example, 'DEVICE' (required) - * @param fromId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get List of Relations (findEntityRelationsByTo) + * Returns list of relation objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByFromV2WithHttpInfo(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByFromV2RequestBuilder(fromType, fromId, relationTypeGroup, headers); + public ApiResponse> findEntityRelationsByToWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToRequestBuilder(toType, toId, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14265,11 +13841,11 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByFromV2", localVarResponse); + throw getApiException("findEntityRelationsByTo", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14279,10 +13855,10 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14301,21 +13877,21 @@ public ApiResponse> findInfoByFromV2WithHttpInfo(@javax } } - private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Nonnull String fromType, @javax.annotation.Nonnull String fromId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'fromType' is set - if (fromType == null) { - throw new ApiException(400, "Missing the required parameter 'fromType' when calling findInfoByFromV2"); + private HttpRequest.Builder findEntityRelationsByToRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByTo"); } - // verify the required parameter 'fromId' is set - if (fromId == null) { - throw new ApiException(400, "Missing the required parameter 'fromId' when calling findInfoByFromV2"); + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByTo"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/from/{fromType}/{fromId}" - .replace("{fromType}", ApiClient.urlEncode(fromType.toString())) - .replace("{fromId}", ApiClient.urlEncode(fromId.toString())); + String localVarPath = "/api/relations/to/{toType}/{toId}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -14349,50 +13925,62 @@ private HttpRequest.Builder findInfoByFromV2RequestBuilder(@javax.annotation.Non } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return List<EntityRelationInfo> + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQuery(entityRelationsQuery, null); + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationType(toType, toId, relationType, relationTypeGroup, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityRelation> * @throws ApiException if fails to make API call */ - public List findInfoByQuery(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByQueryWithHttpInfo(entityRelationsQuery, headers); + public List findEntityRelationsByToAndRelationType(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, headers); return localVarResponse.getData(); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) - * @return ApiResponse<List<EntityRelationInfo>> + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery) throws ApiException { - return findInfoByQueryWithHttpInfo(entityRelationsQuery, null); + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { + return findEntityRelationsByToAndRelationTypeWithHttpInfo(toType, toId, relationType, relationTypeGroup, null); } /** - * Find related entity infos (findInfoByQuery) - * Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param entityRelationsQuery (required) + * Get List of Relations (findEntityRelationsByToAndRelationType) + * Returns list of relation objects for the specified entity by the 'to' direction and relation type. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. + * @param toType A string value representing the entity type. For example, 'DEVICE' (required) + * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param relationType A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value. (required) + * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityRelation>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByQueryWithHttpInfo(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByQueryRequestBuilder(entityRelationsQuery, headers); + public ApiResponse> findEntityRelationsByToAndRelationTypeWithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityRelationsByToAndRelationTypeRequestBuilder(toType, toId, relationType, relationTypeGroup, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14403,11 +13991,11 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByQuery", localVarResponse); + throw getApiException("findEntityRelationsByToAndRelationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14417,10 +14005,10 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14439,27 +14027,47 @@ public ApiResponse> findInfoByQueryWithHttpInfo(@javax. } } - private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonnull EntityRelationsQuery entityRelationsQuery, Map headers) throws ApiException { - // verify the required parameter 'entityRelationsQuery' is set - if (entityRelationsQuery == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelationsQuery' when calling findInfoByQuery"); + private HttpRequest.Builder findEntityRelationsByToAndRelationTypeRequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nonnull String relationType, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { + // verify the required parameter 'toType' is set + if (toType == null) { + throw new ApiException(400, "Missing the required parameter 'toType' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'toId' is set + if (toId == null) { + throw new ApiException(400, "Missing the required parameter 'toId' when calling findEntityRelationsByToAndRelationType"); + } + // verify the required parameter 'relationType' is set + if (relationType == null) { + throw new ApiException(400, "Missing the required parameter 'relationType' when calling findEntityRelationsByToAndRelationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info"; + String localVarPath = "/api/relations/to/{toType}/{toId}/{relationType}" + .replace("{toType}", ApiClient.urlEncode(toType.toString())) + .replace("{toId}", ApiClient.urlEncode(toId.toString())) + .replace("{relationType}", ApiClient.urlEncode(relationType.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "relationTypeGroup"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } - localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelationsQuery); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -14472,58 +14080,50 @@ private HttpRequest.Builder findInfoByQueryRequestBuilder(@javax.annotation.Nonn } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return List<EntityRelationInfo> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2(toType, toId, relationTypeGroup, null); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQuery(entityViewSearchQuery, null); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return List<EntityRelationInfo> + * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List findInfoByToV2(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - ApiResponse> localVarResponse = findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, headers); + public List findEntityViewsByQuery(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + ApiResponse> localVarResponse = findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, headers); return localVarResponse.getData(); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) - * @return ApiResponse<List<EntityRelationInfo>> + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup) throws ApiException { - return findInfoByToV2WithHttpInfo(toType, toId, relationTypeGroup, null); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery) throws ApiException { + return findEntityViewsByQueryWithHttpInfo(entityViewSearchQuery, null); } /** - * Get List of Relation Infos (findInfoByToV2) - * Returns list of relation info objects for the specified entity by the 'to' direction. If the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. - * @param toType A string value representing the entity type. For example, 'DEVICE' (required) - * @param toId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param relationTypeGroup A string value representing relation type group. For example, 'COMMON' (optional) + * Find related entity views (findEntityViewsByQuery) + * Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityViewSearchQuery (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<EntityRelationInfo>> + * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> findInfoByToV2WithHttpInfo(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findInfoByToV2RequestBuilder(toType, toId, relationTypeGroup, headers); + public ApiResponse> findEntityViewsByQueryWithHttpInfo(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findEntityViewsByQueryRequestBuilder(entityViewSearchQuery, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14534,11 +14134,11 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findInfoByToV2", localVarResponse); + throw getApiException("findEntityViewsByQuery", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -14548,10 +14148,10 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - return new ApiResponse>( + return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -14570,42 +14170,27 @@ public ApiResponse> findInfoByToV2WithHttpInfo(@javax.a } } - private HttpRequest.Builder findInfoByToV2RequestBuilder(@javax.annotation.Nonnull String toType, @javax.annotation.Nonnull String toId, @javax.annotation.Nullable String relationTypeGroup, Map headers) throws ApiException { - // verify the required parameter 'toType' is set - if (toType == null) { - throw new ApiException(400, "Missing the required parameter 'toType' when calling findInfoByToV2"); - } - // verify the required parameter 'toId' is set - if (toId == null) { - throw new ApiException(400, "Missing the required parameter 'toId' when calling findInfoByToV2"); + private HttpRequest.Builder findEntityViewsByQueryRequestBuilder(@javax.annotation.Nonnull EntityViewSearchQuery entityViewSearchQuery, Map headers) throws ApiException { + // verify the required parameter 'entityViewSearchQuery' is set + if (entityViewSearchQuery == null) { + throw new ApiException(400, "Missing the required parameter 'entityViewSearchQuery' when calling findEntityViewsByQuery"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/relations/info/to/{toType}/{toId}" - .replace("{toType}", ApiClient.urlEncode(toType.toString())) - .replace("{toId}", ApiClient.urlEncode(toId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "relationTypeGroup"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("relationTypeGroup", relationTypeGroup)); + String localVarPath = "/api/entityViews"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityViewSearchQuery); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -14896,50 +14481,50 @@ private HttpRequest.Builder findTenantOAuth2ClientInfosRequestBuilder(@javax.ann } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2(clientIds, null); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIds(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<OAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public List findTenantOAuth2ClientInfosByIdsV2(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, headers); + public List findTenantOAuth2ClientInfosByIds(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, headers); return localVarResponse.getData(); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { - return findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(clientIds, null); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds) throws ApiException { + return findTenantOAuth2ClientInfosByIdsWithHttpInfo(clientIds, null); } /** - * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIdsV2) + * Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) * Fetch OAuth2 Client info objects based on the provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param clientIds A list of oauth2 ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<OAuth2ClientInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> findTenantOAuth2ClientInfosByIdsV2WithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsV2RequestBuilder(clientIds, headers); + public ApiResponse> findTenantOAuth2ClientInfosByIdsWithHttpInfo(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosByIdsRequestBuilder(clientIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -14950,7 +14535,7 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findTenantOAuth2ClientInfosByIdsV2", localVarResponse); + throw getApiException("findTenantOAuth2ClientInfosByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -14986,10 +14571,10 @@ public ApiResponse> findTenantOAuth2ClientInfosByIdsV2Wit } } - private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsV2RequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { + private HttpRequest.Builder findTenantOAuth2ClientInfosByIdsRequestBuilder(@javax.annotation.Nonnull List clientIds, Map headers) throws ApiException { // verify the required parameter 'clientIds' is set if (clientIds == null) { - throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'clientIds' when calling findTenantOAuth2ClientInfosByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -16608,7 +16193,7 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16626,12 +16211,12 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@javax.annotation.Nonnul * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarms(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntity(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16650,13 +16235,13 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return PageDataAlarmInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - ApiResponse localVarResponse = getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public PageDataAlarmInfo getAlarmsByEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + ApiResponse localVarResponse = getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); return localVarResponse.getData(); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16674,12 +16259,12 @@ public PageDataAlarmInfo getAlarms(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { - return getAlarmsWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator) throws ApiException { + return getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); } /** - * Get Alarms (getAlarms) + * Get Alarms (getAlarmsByEntity) * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -16698,8 +16283,8 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No * @return ApiResponse<PageDataAlarmInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAlarmsRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public ApiResponse getAlarmsByEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmsByEntityRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -16710,7 +16295,7 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAlarms", localVarResponse); + throw getApiException("getAlarmsByEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -16746,22 +16331,22 @@ public ApiResponse getAlarmsWithHttpInfo(@javax.annotation.No } } - private HttpRequest.Builder getAlarmsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { + private HttpRequest.Builder getAlarmsByEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String searchStatus, @javax.annotation.Nullable String status, @javax.annotation.Nullable String assigneeId, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable Boolean fetchOriginator, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmsByEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmsByEntity"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmsByEntity"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarms"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmsByEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -17427,6 +17012,115 @@ private HttpRequest.Builder getAllAlarmsV2RequestBuilder(@javax.annotation.Nonnu return localVarRequestBuilder; } + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return List<WidgetsBundle> + * @throws ApiException if fails to make API call + */ + public List getAllWidgetsBundles() throws ApiException { + return getAllWidgetsBundles(null); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return List<WidgetsBundle> + * @throws ApiException if fails to make API call + */ + public List getAllWidgetsBundles(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAllWidgetsBundlesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @return ApiResponse<List<WidgetsBundle>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllWidgetsBundlesWithHttpInfo() throws ApiException { + return getAllWidgetsBundlesWithHttpInfo(null); + } + + /** + * Get all Widget Bundles (getAllWidgetsBundles) + * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetsBundle>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getAllWidgetsBundlesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAllWidgetsBundlesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getAllWidgetsBundles", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getAllWidgetsBundlesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundles/all"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * getApplicationRedirect * @@ -18487,50 +18181,50 @@ private HttpRequest.Builder getAssetProfilesRequestBuilder(@javax.annotation.Non } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2(assetProfileIds, null); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIds(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<AssetProfileInfo> * @throws ApiException if fails to make API call */ - public List getAssetProfilesByIdsV2(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, headers); + public List getAssetProfilesByIds(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getAssetProfilesByIdsWithHttpInfo(assetProfileIds, headers); return localVarResponse.getData(); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { - return getAssetProfilesByIdsV2WithHttpInfo(assetProfileIds, null); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds) throws ApiException { + return getAssetProfilesByIdsWithHttpInfo(assetProfileIds, null); } /** - * Get Asset Profiles By Ids (getAssetProfilesByIdsV2) + * Get Asset Profiles By Ids (getAssetProfilesByIds) * Requested asset profiles must be owned by tenant which is performing the request. * @param assetProfileIds A list of asset profile ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<AssetProfileInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsV2RequestBuilder(assetProfileIds, headers); + public ApiResponse> getAssetProfilesByIdsWithHttpInfo(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAssetProfilesByIdsRequestBuilder(assetProfileIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -18541,7 +18235,7 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAssetProfilesByIdsV2", localVarResponse); + throw getApiException("getAssetProfilesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -18577,10 +18271,10 @@ public ApiResponse> getAssetProfilesByIdsV2WithHttpInfo(@ } } - private HttpRequest.Builder getAssetProfilesByIdsV2RequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { + private HttpRequest.Builder getAssetProfilesByIdsRequestBuilder(@javax.annotation.Nonnull List assetProfileIds, Map headers) throws ApiException { // verify the required parameter 'assetProfileIds' is set if (assetProfileIds == null) { - throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'assetProfileIds' when calling getAssetProfilesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -19937,205 +19631,10 @@ private HttpRequest.Builder getAuditLogsByCustomerIdRequestBuilder(@javax.annota } /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @return PageDataAuditLog - * @throws ApiException if fails to make API call - */ - public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByEntityId(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); - } - - /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @param headers Optional headers to include in the request - * @return PageDataAuditLog - * @throws ApiException if fails to make API call - */ - public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - ApiResponse localVarResponse = getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); - return localVarResponse.getData(); - } - - /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @return ApiResponse<PageDataAuditLog> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); - } - - /** - * Get audit logs by entity id (getAuditLogsByEntityId) - * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) - * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) - * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataAuditLog> - * @throws ApiException if fails to make API call - */ - public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuditLogsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuditLogsByEntityId", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataAuditLog responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getAuditLogsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAuditLogsByEntityId"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAuditLogsByEntityId"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByEntityId"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByEntityId"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/audit/logs/entity/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); - localVarQueryParameterBaseName = "actionTypes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("actionTypes", actionTypes)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20147,14 +19646,15 @@ private HttpRequest.Builder getAuditLogsByEntityIdRequestBuilder(@javax.annotati * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByUserId(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); + public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByEntityId(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20167,15 +19667,16 @@ public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String us * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - ApiResponse localVarResponse = getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); + public PageDataAuditLog getAuditLogsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + ApiResponse localVarResponse = getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); return localVarResponse.getData(); } /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20187,14 +19688,15 @@ public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String us * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { - return getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); + public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Get audit logs by user id (getAuditLogsByUserId) - * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. - * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get audit logs by entity id (getAuditLogsByEntityId) + * Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) @@ -20207,8 +19709,8 @@ public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.ann * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuditLogsByUserIdRequestBuilder(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); + public ApiResponse getAuditLogsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAuditLogsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20219,7 +19721,7 @@ public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuditLogsByUserId", localVarResponse); + throw getApiException("getAuditLogsByEntityId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20255,24 +19757,29 @@ public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.ann } } - private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException(400, "Missing the required parameter 'userId' when calling getAuditLogsByUserId"); + private HttpRequest.Builder getAuditLogsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAuditLogsByEntityId"); + } + // verify the required parameter 'entityId' is set + if (entityId == null) { + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAuditLogsByEntityId"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByUserId"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByEntityId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByUserId"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByEntityId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/audit/logs/user/{userId}" - .replace("{userId}", ApiClient.urlEncode(userId.toString())); + String localVarPath = "/api/audit/logs/entity/{entityType}/{entityId}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -20320,46 +19827,82 @@ private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return String + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) + * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public String getAuthorizationUrl() throws ApiException { - return getAuthorizationUrl(null); + public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByUserId(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) * @param headers Optional headers to include in the request - * @return String + * @return PageDataAuditLog * @throws ApiException if fails to make API call */ - public String getAuthorizationUrl(Map headers) throws ApiException { - ApiResponse localVarResponse = getAuthorizationUrlWithHttpInfo(headers); + public PageDataAuditLog getAuditLogsByUserId(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + ApiResponse localVarResponse = getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); return localVarResponse.getData(); } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) - * @return ApiResponse<String> + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) + * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuthorizationUrlWithHttpInfo() throws ApiException { - return getAuthorizationUrlWithHttpInfo(null); + public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes) throws ApiException { + return getAuditLogsByUserIdWithHttpInfo(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, null); } /** - * Redirect user to mail provider login page. - * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * Get audit logs by user id (getAuditLogsByUserId) + * Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * @param userId A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. (optional) + * @param sortProperty Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. (optional) + * @param actionTypes A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details. (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<String> + * @return ApiResponse<PageDataAuditLog> * @throws ApiException if fails to make API call */ - public ApiResponse getAuthorizationUrlWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAuthorizationUrlRequestBuilder(headers); + public ApiResponse getAuditLogsByUserIdWithHttpInfo(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAuditLogsByUserIdRequestBuilder(userId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, actionTypes, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20370,11 +19913,11 @@ public ApiResponse getAuthorizationUrlWithHttpInfo(Map h InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAuthorizationUrl", localVarResponse); + throw getApiException("getAuditLogsByUserId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -20384,10 +19927,10 @@ public ApiResponse getAuthorizationUrlWithHttpInfo(Map h String responseBody = new String(localVarResponseBody.readAllBytes()); - String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + PageDataAuditLog responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -20406,15 +19949,57 @@ public ApiResponse getAuthorizationUrlWithHttpInfo(Map h } } - private HttpRequest.Builder getAuthorizationUrlRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAuditLogsByUserIdRequestBuilder(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, @javax.annotation.Nullable String actionTypes, Map headers) throws ApiException { + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException(400, "Missing the required parameter 'userId' when calling getAuditLogsByUserId"); + } + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAuditLogsByUserId"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getAuditLogsByUserId"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/admin/mail/oauth2/authorize"; + String localVarPath = "/api/audit/logs/user/{userId}" + .replace("{userId}", ApiClient.urlEncode(userId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + localVarQueryParameterBaseName = "startTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); + localVarQueryParameterBaseName = "endTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "actionTypes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("actionTypes", actionTypes)); - localVarRequestBuilder.header("Accept", "application/text, application/json"); + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { @@ -20756,46 +20341,46 @@ private HttpRequest.Builder getAvailableDeliveryMethodsRequestBuilder(Map getAvailableTwoFaProviders() throws ApiException { - return getAvailableTwoFaProviders(null); + public List getAvailableTwoFaProviderInfos() throws ApiException { + return getAvailableTwoFaProviderInfos(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return List<TwoFaProviderInfo> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProvidersWithHttpInfo(headers); + public List getAvailableTwoFaProviderInfos(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderInfosWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo() throws ApiException { - return getAvailableTwoFaProvidersWithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderInfosWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderInfos) * Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProvidersWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProvidersRequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderInfosWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderInfosRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20806,7 +20391,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders", localVarResponse); + throw getApiException("getAvailableTwoFaProviderInfos", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20842,7 +20427,7 @@ public ApiResponse> getAvailableTwoFaProvidersWithHttpIn } } - private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderInfosRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -20865,46 +20450,46 @@ private HttpRequest.Builder getAvailableTwoFaProvidersRequestBuilder(Map getAvailableTwoFaProviders1() throws ApiException { - return getAvailableTwoFaProviders1(null); + public List getAvailableTwoFaProviderTypes() throws ApiException { + return getAvailableTwoFaProviderTypes(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return List<TwoFaProviderType> * @throws ApiException if fails to make API call */ - public List getAvailableTwoFaProviders1(Map headers) throws ApiException { - ApiResponse> localVarResponse = getAvailableTwoFaProviders1WithHttpInfo(headers); + public List getAvailableTwoFaProviderTypes(Map headers) throws ApiException { + ApiResponse> localVarResponse = getAvailableTwoFaProviderTypesWithHttpInfo(headers); return localVarResponse.getData(); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo() throws ApiException { - return getAvailableTwoFaProviders1WithHttpInfo(null); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo() throws ApiException { + return getAvailableTwoFaProviderTypesWithHttpInfo(null); } /** - * Get available 2FA providers (getAvailableTwoFaProviders) + * Get available 2FA providers (getAvailableTwoFaProviderTypes) * Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<List<TwoFaProviderType>> * @throws ApiException if fails to make API call */ - public ApiResponse> getAvailableTwoFaProviders1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviders1RequestBuilder(headers); + public ApiResponse> getAvailableTwoFaProviderTypesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAvailableTwoFaProviderTypesRequestBuilder(headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -20915,7 +20500,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAvailableTwoFaProviders1", localVarResponse); + throw getApiException("getAvailableTwoFaProviderTypes", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -20951,7 +20536,7 @@ public ApiResponse> getAvailableTwoFaProviders1WithHttpI } } - private HttpRequest.Builder getAvailableTwoFaProviders1RequestBuilder(Map headers) throws ApiException { + private HttpRequest.Builder getAvailableTwoFaProviderTypesRequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -21105,6 +20690,124 @@ private HttpRequest.Builder getBundleWidgetTypeFqnsRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypes(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return List<WidgetType> + * @throws ApiException if fails to make API call + */ + public List getBundleWidgetTypes(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + ApiResponse> localVarResponse = getBundleWidgetTypesWithHttpInfo(widgetsBundleId, headers); + return localVarResponse.getData(); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { + return getBundleWidgetTypesWithHttpInfo(widgetsBundleId, null); + } + + /** + * Get all Widget types for specified Bundle (getBundleWidgetTypes) + * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * @param widgetsBundleId Widget Bundle Id (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<List<WidgetType>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getBundleWidgetTypesWithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesRequestBuilder(widgetsBundleId, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getBundleWidgetTypes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getBundleWidgetTypesRequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { + // verify the required parameter 'widgetsBundleId' is set + if (widgetsBundleId == null) { + throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypes"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" + .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails) * Returns an array of Widget Type Details objects that belong to specified Widget Bundle.Widget Type Details extend Widget Type and add image and description properties. Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -21431,124 +21134,6 @@ private HttpRequest.Builder getBundleWidgetTypesInfosRequestBuilder(@javax.annot return localVarRequestBuilder; } - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return List<WidgetType> - * @throws ApiException if fails to make API call - */ - public List getBundleWidgetTypesV2(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, headers); - return localVarResponse.getData(); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId) throws ApiException { - return getBundleWidgetTypesV2WithHttpInfo(widgetsBundleId, null); - } - - /** - * Get all Widget types for specified Bundle (getBundleWidgetTypes) - * Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * @param widgetsBundleId Widget Bundle Id (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetType>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getBundleWidgetTypesV2WithHttpInfo(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getBundleWidgetTypesV2RequestBuilder(widgetsBundleId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getBundleWidgetTypesV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getBundleWidgetTypesV2RequestBuilder(@javax.annotation.Nonnull String widgetsBundleId, Map headers) throws ApiException { - // verify the required parameter 'widgetsBundleId' is set - if (widgetsBundleId == null) { - throw new ApiException(400, "Missing the required parameter 'widgetsBundleId' when calling getBundleWidgetTypesV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/widgetsBundles/{widgetsBundleId}/widgetTypes" - .replace("{widgetsBundleId}", ApiClient.urlEncode(widgetsBundleId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Calculated Field (getCalculatedFieldById) * Fetch the Calculated Field object based on the provided Calculated Field Id. @@ -22016,230 +21601,78 @@ private HttpRequest.Builder getCalculatedFieldsRequestBuilder(@javax.annotation. } /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return PageDataCalculatedField - * @throws ApiException if fails to make API call - */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); - } - - /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return PageDataCalculatedField - * @throws ApiException if fails to make API call - */ - public PageDataCalculatedField getCalculatedFieldsByEntityIdV2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); - return localVarResponse.getData(); - } - - /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return ApiResponse<PageDataCalculatedField> - * @throws ApiException if fails to make API call - */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getCalculatedFieldsByEntityIdV2WithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); - } - - /** - * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityIdV2) - * Fetch the Calculated Fields based on the provided Entity Id. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param type Calculated field type. If not specified, all types will be returned. (optional) - * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataCalculatedField> - * @throws ApiException if fails to make API call - */ - public ApiResponse getCalculatedFieldsByEntityIdV2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdV2RequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCalculatedFieldsByEntityIdV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataCalculatedField responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getCalculatedFieldsByEntityIdV2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityIdV2"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityIdV2"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityIdV2"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityIdV2"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/calculatedField/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "type"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return List<OAuth2ClientRegistrationTemplate> + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public List getClientRegistrationTemplates() throws ApiException { - return getClientRegistrationTemplates(null); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityId(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @param headers Optional headers to include in the request - * @return List<OAuth2ClientRegistrationTemplate> + * @return PageDataCalculatedField * @throws ApiException if fails to make API call */ - public List getClientRegistrationTemplates(Map headers) throws ApiException { - ApiResponse> localVarResponse = getClientRegistrationTemplatesWithHttpInfo(headers); + public PageDataCalculatedField getCalculatedFieldsByEntityId(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo() throws ApiException { - return getClientRegistrationTemplatesWithHttpInfo(null); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getCalculatedFieldsByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, null); } /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId) + * Fetch the Calculated Fields based on the provided Entity Id. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param type Calculated field type. If not specified, all types will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @return ApiResponse<PageDataCalculatedField> * @throws ApiException if fails to make API call */ - public ApiResponse> getClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplatesRequestBuilder(headers); + public ApiResponse getCalculatedFieldsByEntityIdWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCalculatedFieldsByEntityIdRequestBuilder(entityType, entityId, pageSize, page, type, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -22250,11 +21683,11 @@ public ApiResponse> getClientRegistration InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates", localVarResponse); + throw getApiException("getCalculatedFieldsByEntityId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), null @@ -22264,10 +21697,10 @@ public ApiResponse> getClientRegistration String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + PageDataCalculatedField responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse>( + return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue @@ -22286,122 +21719,56 @@ public ApiResponse> getClientRegistration } } - private HttpRequest.Builder getClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/oauth2/config/template"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); + private HttpRequest.Builder getCalculatedFieldsByEntityIdRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable CalculatedFieldType type, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getCalculatedFieldsByEntityId"); } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); + // verify the required parameter 'entityId' is set + if (entityId == null) { + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getCalculatedFieldsByEntityId"); } - return localVarRequestBuilder; - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1() throws ApiException { - return getClientRegistrationTemplates1(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @param headers Optional headers to include in the request - * @return com.fasterxml.jackson.databind.JsonNode - * @throws ApiException if fails to make API call - */ - public com.fasterxml.jackson.databind.JsonNode getClientRegistrationTemplates1(Map headers) throws ApiException { - ApiResponse localVarResponse = getClientRegistrationTemplates1WithHttpInfo(headers); - return localVarResponse.getData(); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo() throws ApiException { - return getClientRegistrationTemplates1WithHttpInfo(null); - } - - /** - * Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. - * Mail configuration template is set of default smtp settings for mail server that specific provider supports - * @param headers Optional headers to include in the request - * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> - * @throws ApiException if fails to make API call - */ - public ApiResponse getClientRegistrationTemplates1WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getClientRegistrationTemplates1RequestBuilder(headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getClientRegistrationTemplates1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getCalculatedFieldsByEntityId"); } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getCalculatedFieldsByEntityId"); } - } - - private HttpRequest.Builder getClientRegistrationTemplates1RequestBuilder(Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/mail/config/template"; + String localVarPath = "/api/calculatedField/{entityType}/{entityId}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Accept", "application/json"); @@ -24969,50 +24336,50 @@ private HttpRequest.Builder getCustomersRequestBuilder(@javax.annotation.Nonnull } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2(customerIds, null); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIds(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Customer> * @throws ApiException if fails to make API call */ - public List getCustomersByIdsV2(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getCustomersByIdsV2WithHttpInfo(customerIds, headers); + public List getCustomersByIds(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getCustomersByIdsWithHttpInfo(customerIds, headers); return localVarResponse.getData(); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { - return getCustomersByIdsV2WithHttpInfo(customerIds, null); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds) throws ApiException { + return getCustomersByIdsWithHttpInfo(customerIds, null); } /** - * Get customers by Customer Ids (getCustomersByIdsV2) + * Get customers by Customer Ids (getCustomersByIds) * Returns a list of Customer objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param customerIds A list of customer ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Customer>> * @throws ApiException if fails to make API call */ - public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsV2RequestBuilder(customerIds, headers); + public ApiResponse> getCustomersByIdsWithHttpInfo(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getCustomersByIdsRequestBuilder(customerIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -25023,7 +24390,7 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getCustomersByIdsV2", localVarResponse); + throw getApiException("getCustomersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -25059,10 +24426,10 @@ public ApiResponse> getCustomersByIdsV2WithHttpInfo(@javax.annota } } - private HttpRequest.Builder getCustomersByIdsV2RequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { + private HttpRequest.Builder getCustomersByIdsRequestBuilder(@javax.annotation.Nonnull List customerIds, Map headers) throws ApiException { // verify the required parameter 'customerIds' is set if (customerIds == null) { - throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'customerIds' when calling getCustomersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -25349,50 +24716,50 @@ private HttpRequest.Builder getDashboardInfoByIdRequestBuilder(@javax.annotation } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @return List<DashboardInfo> * @throws ApiException if fails to make API call */ - public List getDashboardsByIdsV2(@javax.annotation.Nonnull List dashboardIds) throws ApiException { - return getDashboardsByIdsV2(dashboardIds, null); + public List getDashboardsByIds(@javax.annotation.Nonnull List dashboardIds) throws ApiException { + return getDashboardsByIds(dashboardIds, null); } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<DashboardInfo> * @throws ApiException if fails to make API call */ - public List getDashboardsByIdsV2(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getDashboardsByIdsV2WithHttpInfo(dashboardIds, headers); + public List getDashboardsByIds(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getDashboardsByIdsWithHttpInfo(dashboardIds, headers); return localVarResponse.getData(); } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @return ApiResponse<List<DashboardInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List dashboardIds) throws ApiException { - return getDashboardsByIdsV2WithHttpInfo(dashboardIds, null); + public ApiResponse> getDashboardsByIdsWithHttpInfo(@javax.annotation.Nonnull List dashboardIds) throws ApiException { + return getDashboardsByIdsWithHttpInfo(dashboardIds, null); } /** - * Get dashboards by Dashboard Ids (getDashboardsByIdsV2) + * Get dashboards by Dashboard Ids (getDashboardsByIds) * Returns a list of DashboardInfo objects based on the provided ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param dashboardIds A list of dashboard ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<DashboardInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getDashboardsByIdsV2RequestBuilder(dashboardIds, headers); + public ApiResponse> getDashboardsByIdsWithHttpInfo(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDashboardsByIdsRequestBuilder(dashboardIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -25403,7 +24770,7 @@ public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax. InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getDashboardsByIdsV2", localVarResponse); + throw getApiException("getDashboardsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -25439,10 +24806,10 @@ public ApiResponse> getDashboardsByIdsV2WithHttpInfo(@javax. } } - private HttpRequest.Builder getDashboardsByIdsV2RequestBuilder(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { + private HttpRequest.Builder getDashboardsByIdsRequestBuilder(@javax.annotation.Nonnull List dashboardIds, Map headers) throws ApiException { // verify the required parameter 'dashboardIds' is set if (dashboardIds == null) { - throw new ApiException(400, "Missing the required parameter 'dashboardIds' when calling getDashboardsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'dashboardIds' when calling getDashboardsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -25807,157 +25174,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. If the user has the authority of 'TENANT_ADMIN', 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -26734,50 +25950,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. - * @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. + * @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. + * @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. + * @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. + * @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. - * @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. - * @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. - * @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(), @@ -26788,11 +26136,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 @@ -26802,10 +26150,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 @@ -26824,21 +26172,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("&"); @@ -26866,50 +26210,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(), @@ -26920,11 +26264,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 @@ -26934,10 +26278,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 @@ -26956,17 +26300,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("&"); @@ -30212,50 +29556,50 @@ private HttpRequest.Builder getEntityViewTypesRequestBuilder(Map } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2(entityViewIds, null); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIds(entityViewIds, null); } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<EntityView> * @throws ApiException if fails to make API call */ - public List getEntityViewsByIdsV2(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getEntityViewsByIdsV2WithHttpInfo(entityViewIds, headers); + public List getEntityViewsByIds(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getEntityViewsByIdsWithHttpInfo(entityViewIds, headers); return localVarResponse.getData(); } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { - return getEntityViewsByIdsV2WithHttpInfo(entityViewIds, null); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds) throws ApiException { + return getEntityViewsByIdsWithHttpInfo(entityViewIds, null); } /** - * Get Entity Views By Ids (getEntityViewsByIdsV2) + * Get Entity Views By Ids (getEntityViewsByIds) * Requested entity views must be owned by tenant or assigned to customer which user is performing the request. * @param entityViewIds A list of entity view ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<EntityView>> * @throws ApiException if fails to make API call */ - public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsV2RequestBuilder(entityViewIds, headers); + public ApiResponse> getEntityViewsByIdsWithHttpInfo(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEntityViewsByIdsRequestBuilder(entityViewIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30266,7 +29610,7 @@ public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEntityViewsByIdsV2", localVarResponse); + throw getApiException("getEntityViewsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30302,10 +29646,10 @@ public ApiResponse> getEntityViewsByIdsV2WithHttpInfo(@javax.an } } - private HttpRequest.Builder getEntityViewsByIdsV2RequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { + private HttpRequest.Builder getEntityViewsByIdsRequestBuilder(@javax.annotation.Nonnull List entityViewIds, Map headers) throws ApiException { // verify the required parameter 'entityViewIds' is set if (entityViewIds == null) { - throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'entityViewIds' when calling getEntityViewsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -30344,207 +29688,7 @@ private HttpRequest.Builder getEntityViewsByIdsV2RequestBuilder(@javax.annotatio } /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return PageDataEventInfo - * @throws ApiException if fails to make API call - */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @param headers Optional headers to include in the request - * @return PageDataEventInfo - * @throws ApiException if fails to make API call - */ - public PageDataEventInfo getEvents(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); - return localVarResponse.getData(); - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @return ApiResponse<PageDataEventInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEventsWithHttpInfo(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); - } - - /** - * Get Events (Deprecated) - * Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch The value is not used in searching. (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime Timestamp. Events with creation time before it won't be queried. (optional) - * @param endTime Timestamp. Events with creation time after it won't be queried. (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEventInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getEventsWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEventsRequestBuilder(entityType, entityId, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEventInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents"); - } - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents"); - } - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/events/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "tenantId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("tenantId", tenantId)); - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30560,12 +29704,12 @@ private HttpRequest.Builder getEventsRequestBuilder(@javax.annotation.Nonnull St * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilter(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30582,13 +29726,13 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByFilter(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30604,12 +29748,12 @@ public PageDataEventInfo getEvents1(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents1WithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByFilterWithHttpInfo(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by event filter (getEvents) + * Get Events by event filter (getEventsByFilter) * Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. # Event Filter Definition 6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. Note, * 'server' - string value representing the server name, identifier or ip address where the platform is running; * 'errorStr' - the case insensitive 'contains' filter based on error message. ## Error Event Filter ```json { \"eventType\":\"ERROR\", \"server\":\"ip-172-31-24-152\", \"method\":\"onClusterEventMsg\", \"errorStr\":\"Error Message\" } ``` * 'method' - string value representing the method name when the error happened. ## Lifecycle Event Filter ```json { \"eventType\":\"LC_EVENT\", \"server\":\"ip-172-31-24-152\", \"event\":\"STARTED\", \"status\":\"Success\", \"errorStr\":\"Error Message\" } ``` * 'event' - string value representing the lifecycle event type; * 'status' - string value representing status of the lifecycle event. ## Statistics Event Filter ```json { \"eventType\":\"STATS\", \"server\":\"ip-172-31-24-152\", \"messagesProcessed\":10, \"errorsOccurred\":5 } ``` * 'messagesProcessed' - the minimum number of successfully processed messages; * 'errorsOccurred' - the minimum number of errors occurred during messages processing. ## Debug Rule Node Event Filter ```json { \"eventType\":\"DEBUG_RULE_NODE\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` ## Debug Rule Chain Event Filter ```json { \"eventType\":\"DEBUG_RULE_CHAIN\", \"msgDirectionType\":\"IN\", \"server\":\"ip-172-31-24-152\", \"dataSearch\":\"humidity\", \"metadataSearch\":\"deviceName\", \"entityName\":\"DEVICE\", \"relationType\":\"Success\", \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"isError\":\"false\", \"errorStr\":\"Error Message\" } ``` * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity); * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message; * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message; * 'entityName' - string value representing the entity type; * 'relationType' - string value representing the type of message routing; * 'entityId' - string value representing the entity id in the event body (originator of the message); * 'msgType' - string value representing the message type; * 'isError' - boolean value to filter the errors. ## Debug Calculated Field Event Filter ```json { \"eventType\":\"DEBUG_CALCULATED_FIELD\", \"server\":\"ip-172-31-24-152\", \"isError\":\"false\", \"errorStr\":\"Error Message\" \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\", \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\", \"msgType\":\"POST_TELEMETRY_REQUEST\", \"arguments\":\"{ \"x\": { \"ts\": 1739432016629, \"value\": 20 }, \"y\": { \"ts\": 1739429717656, \"value\": 12 } }\", \"result\":\"{ \"x + y\": 32 }\", } ``` * 'entityId' - string value representing the entity id in the event body; * 'entityType' - string value representing the entity type; * 'msgId' - string value representing the message id in the rule engine; * 'msgType' - string value representing the message type; * 'arguments' - string value representing the arguments that were used in the calculation performed; * 'result' - string value representing the result of a calculation; * 'isError' - boolean value to filter the errors. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30626,8 +29770,8 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents1RequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByFilterWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByFilterRequestBuilder(entityType, entityId, tenantId, pageSize, page, eventFilter, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30638,7 +29782,7 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents1", localVarResponse); + throw getApiException("getEventsByFilter", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30674,30 +29818,30 @@ public ApiResponse getEvents1WithHttpInfo(@javax.annotation.N } } - private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getEventsByFilterRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull EventFilter eventFilter, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getEventsByFilter"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getEventsByFilter"); } // verify the required parameter 'tenantId' is set if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getEventsByFilter"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getEventsByFilter"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getEventsByFilter"); } // verify the required parameter 'eventFilter' is set if (eventFilter == null) { - throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEvents1"); + throw new ApiException(400, "Missing the required parameter 'eventFilter' when calling getEventsByFilter"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -30758,7 +29902,7 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30774,12 +29918,12 @@ private HttpRequest.Builder getEvents1RequestBuilder(@javax.annotation.Nonnull S * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByType(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30796,13 +29940,13 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return PageDataEventInfo * @throws ApiException if fails to make API call */ - public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - ApiResponse localVarResponse = getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public PageDataEventInfo getEventsByType(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + ApiResponse localVarResponse = getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); return localVarResponse.getData(); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30818,12 +29962,12 @@ public PageDataEventInfo getEvents2(@javax.annotation.Nonnull String entityType, * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { - return getEvents2WithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime) throws ApiException { + return getEventsByTypeWithHttpInfo(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, null); } /** - * Get Events by type (getEvents) + * Get Events by type (getEventsByType) * Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -30840,8 +29984,8 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N * @return ApiResponse<PageDataEventInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getEvents2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getEvents2RequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); + public ApiResponse getEventsByTypeWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String eventType, @javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, @javax.annotation.Nullable Long startTime, @javax.annotation.Nullable Long endTime, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getEventsByTypeRequestBuilder(entityType, entityId, eventType, tenantId, pageSize, page, textSearch, sortProperty, sortOrder, startTime, endTime, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -30852,7 +29996,7 @@ public ApiResponse getEvents2WithHttpInfo(@javax.annotation.N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getEvents2", localVarResponse); + throw getApiException("getEventsByType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -30888,30 +30032,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(); @@ -31076,170 +30220,7 @@ private HttpRequest.Builder getFeaturesInfoRequestBuilder(Map he } /** - * 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; - } - - /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call @@ -31249,7 +30230,7 @@ public com.fasterxml.jackson.databind.JsonNode getGeneralUserSettings() throws A } /** - * Get user settings (getUserSettings) + * Get user settings (getGeneralUserSettings) * Fetch the User settings based on authorized user. * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode @@ -31261,7 +30242,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> @@ -33616,6 +32597,224 @@ private HttpRequest.Builder getLwm2mListObjectsPageRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode getMailConfigTemplates() throws ApiException { + return getMailConfigTemplates(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports + * @param headers Optional headers to include in the request + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode getMailConfigTemplates(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailConfigTemplatesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailConfigTemplatesWithHttpInfo() throws ApiException { + return getMailConfigTemplatesWithHttpInfo(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Mail configuration template is set of default smtp settings for mail server that specific provider supports + * @param headers Optional headers to include in the request + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailConfigTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailConfigTemplatesRequestBuilder(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("getMailConfigTemplates", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getMailConfigTemplatesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/mail/config/template"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // 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 String getMailOAuth2AuthorizationUrl() throws ApiException { + return getMailOAuth2AuthorizationUrl(null); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return String + * @throws ApiException if fails to make API call + */ + public String getMailOAuth2AuthorizationUrl(Map headers) throws ApiException { + ApiResponse localVarResponse = getMailOAuth2AuthorizationUrlWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo() throws ApiException { + return getMailOAuth2AuthorizationUrlWithHttpInfo(null); + } + + /** + * Redirect user to mail provider login page. + * After user logged in and provided accessprovider sends authorization code to specified redirect uri.) + * @param headers Optional headers to include in the request + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse getMailOAuth2AuthorizationUrlWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getMailOAuth2AuthorizationUrlRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getMailOAuth2AuthorizationUrl", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + String responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getMailOAuth2AuthorizationUrlRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/admin/mail/oauth2/authorize"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/text, application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 log in processing URL (getMailProcessingUrl) * Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider and user consent for requested scope, it makes a redirect to this path so that the platform can do further log in processing and generating access tokens. Available for users with 'SYS_ADMIN' authority. @@ -33953,7 +33152,7 @@ private HttpRequest.Builder getMobileAppBundleInfoByIdRequestBuilder(@javax.anno } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @return MobileApp @@ -33964,7 +33163,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id) throws ApiE } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -33977,7 +33176,7 @@ public MobileApp getMobileAppById(@javax.annotation.Nonnull UUID id, Map getMobileAppByIdWithHttpInfo(@javax.annotation.Non } /** - * Get mobile info by id (getMobileAppInfoById) + * Get mobile info by id (getMobileAppById) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param headers Optional headers to include in the request @@ -35379,50 +34578,50 @@ private HttpRequest.Builder getNotificationTargetsRequestBuilder(@javax.annotati } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2(ids, null); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIds(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return List<NotificationTarget> * @throws ApiException if fails to make API call */ - public List getNotificationTargetsByIdsV2(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - ApiResponse> localVarResponse = getNotificationTargetsByIdsV2WithHttpInfo(ids, headers); + public List getNotificationTargetsByIds(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + ApiResponse> localVarResponse = getNotificationTargetsByIdsWithHttpInfo(ids, headers); return localVarResponse.getData(); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { - return getNotificationTargetsByIdsV2WithHttpInfo(ids, null); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids) throws ApiException { + return getNotificationTargetsByIdsWithHttpInfo(ids, null); } /** - * Get notification targets by ids (getNotificationTargetsByIdsV2) + * Get notification targets by ids (getNotificationTargetsByIds) * Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param ids Comma-separated list of uuids representing targets ids (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<NotificationTarget>> * @throws ApiException if fails to make API call */ - public ApiResponse> getNotificationTargetsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsV2RequestBuilder(ids, headers); + public ApiResponse> getNotificationTargetsByIdsWithHttpInfo(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsByIdsRequestBuilder(ids, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -35433,7 +34632,7 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsByIdsV2", localVarResponse); + throw getApiException("getNotificationTargetsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -35469,10 +34668,10 @@ public ApiResponse> getNotificationTargetsByIdsV2WithHt } } - private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsByIdsRequestBuilder(@javax.annotation.Nonnull List ids, Map headers) throws ApiException { // verify the required parameter 'ids' is set if (ids == null) { - throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'ids' when calling getNotificationTargetsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -35511,7 +34710,7 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35522,12 +34721,12 @@ private HttpRequest.Builder getNotificationTargetsByIdsV2RequestBuilder(@javax.a * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationType(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35539,13 +34738,13 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return PageDataNotificationTarget * @throws ApiException if fails to make API call */ - public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationTypeV2(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationType(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35556,12 +34755,12 @@ public PageDataNotificationTarget getNotificationTargetsBySupportedNotificationT * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationTypeV2) + * Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) * Returns the page of notification targets filtered by notification type that they can be used for. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param notificationType (required) * @param pageSize (required) @@ -35573,8 +34772,8 @@ public ApiResponse getNotificationTargetsBySupported * @return ApiResponse<PageDataNotificationTarget> * @throws ApiException if fails to make API call */ - public ApiResponse getNotificationTargetsBySupportedNotificationTypeV2WithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getNotificationTargetsBySupportedNotificationTypeWithHttpInfo(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getNotificationTargetsBySupportedNotificationTypeRequestBuilder(notificationType, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -35585,7 +34784,7 @@ public ApiResponse getNotificationTargetsBySupported InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getNotificationTargetsBySupportedNotificationTypeV2", localVarResponse); + throw getApiException("getNotificationTargetsBySupportedNotificationType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -35621,18 +34820,18 @@ public ApiResponse getNotificationTargetsBySupported } } - private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeV2RequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getNotificationTargetsBySupportedNotificationTypeRequestBuilder(@javax.annotation.Nonnull NotificationType notificationType, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'notificationType' is set if (notificationType == null) { - throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'notificationType' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getNotificationTargetsBySupportedNotificationType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationTypeV2"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getNotificationTargetsBySupportedNotificationType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -36253,6 +35452,115 @@ private HttpRequest.Builder getOAuth2ClientByIdRequestBuilder(@javax.annotation. return localVarRequestBuilder; } + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates() throws ApiException { + return getOAuth2ClientRegistrationTemplates(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return List<OAuth2ClientRegistrationTemplate> + * @throws ApiException if fails to make API call + */ + public List getOAuth2ClientRegistrationTemplates(Map headers) throws ApiException { + ApiResponse> localVarResponse = getOAuth2ClientRegistrationTemplatesWithHttpInfo(headers); + return localVarResponse.getData(); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo() throws ApiException { + return getOAuth2ClientRegistrationTemplatesWithHttpInfo(null); + } + + /** + * Get the list of all OAuth2 client registration templates (getOAuth2ClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + * Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients + * @param headers Optional headers to include in the request + * @return ApiResponse<List<OAuth2ClientRegistrationTemplate>> + * @throws ApiException if fails to make API call + */ + public ApiResponse> getOAuth2ClientRegistrationTemplatesWithHttpInfo(Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOAuth2ClientRegistrationTemplatesRequestBuilder(headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("getOAuth2ClientRegistrationTemplates", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); + + + return new ApiResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder getOAuth2ClientRegistrationTemplatesRequestBuilder(Map headers) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/oauth2/config/template"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Get OAuth2 clients (getOAuth2Clients) * Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header) @@ -36784,7 +36092,7 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36796,12 +36104,12 @@ private HttpRequest.Builder getOtaPackagesRequestBuilder(@javax.annotation.Nonnu * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileAndType(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36814,13 +36122,13 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return PageDataOtaPackageInfo * @throws ApiException if fails to make API call */ - public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataOtaPackageInfo getOtaPackagesByDeviceProfileAndType(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36832,12 +36140,12 @@ public PageDataOtaPackageInfo getOtaPackages1(@javax.annotation.Nonnull String d * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getOtaPackages1WithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get OTA Package Infos (getOtaPackages) + * Get OTA Package Infos by device profile and type (getOtaPackagesByDeviceProfileAndType) * Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param type OTA Package type. (required) @@ -36850,8 +36158,8 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an * @return ApiResponse<PageDataOtaPackageInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getOtaPackages1WithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getOtaPackages1RequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getOtaPackagesByDeviceProfileAndTypeWithHttpInfo(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getOtaPackagesByDeviceProfileAndTypeRequestBuilder(deviceProfileId, type, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -36862,7 +36170,7 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getOtaPackages1", localVarResponse); + throw getApiException("getOtaPackagesByDeviceProfileAndType", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -36898,22 +36206,22 @@ public ApiResponse getOtaPackages1WithHttpInfo(@javax.an } } - private HttpRequest.Builder getOtaPackages1RequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getOtaPackagesByDeviceProfileAndTypeRequestBuilder(@javax.annotation.Nonnull String deviceProfileId, @javax.annotation.Nonnull String type, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'deviceProfileId' is set if (deviceProfileId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'deviceProfileId' when calling getOtaPackagesByDeviceProfileAndType"); } // verify the required parameter 'type' is set if (type == null) { - throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'type' when calling getOtaPackagesByDeviceProfileAndType"); } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getOtaPackagesByDeviceProfileAndType"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackages1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getOtaPackagesByDeviceProfileAndType"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -37364,7 +36672,7 @@ private HttpRequest.Builder getPlatformTwoFaSettingsRequestBuilder(Map headers) throws ApiE } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @return ApiResponse<QrCodeSettings> * @throws ApiException if fails to make API call @@ -37396,7 +36704,7 @@ public ApiResponse getQrCodeSettingsWithHttpInfo() throws ApiExc } /** - * Get Mobile application settings (getMobileAppSettings) + * Get Mobile application settings (getQrCodeSettings) * The response payload contains configuration for android/iOS applications and platform qr code widget settings. Available for any authorized user. * @param headers Optional headers to include in the request * @return ApiResponse<QrCodeSettings> @@ -37827,50 +37135,50 @@ private HttpRequest.Builder getQueueStatsByIdRequestBuilder(@javax.annotation.No } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2(queueStatsIds, null); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIds(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<QueueStats> * @throws ApiException if fails to make API call */ - public List getQueueStatsByIdsV2(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, headers); + public List getQueueStatsByIds(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getQueueStatsByIdsWithHttpInfo(queueStatsIds, headers); return localVarResponse.getData(); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { - return getQueueStatsByIdsV2WithHttpInfo(queueStatsIds, null); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds) throws ApiException { + return getQueueStatsByIdsWithHttpInfo(queueStatsIds, null); } /** - * Get QueueStats By Ids (getQueueStatsByIdsV2) + * Get QueueStats By Ids (getQueueStatsByIds) * Fetch the Queue stats objects based on the provided ids. * @param queueStatsIds A list of queue stats ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<QueueStats>> * @throws ApiException if fails to make API call */ - public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsV2RequestBuilder(queueStatsIds, headers); + public ApiResponse> getQueueStatsByIdsWithHttpInfo(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getQueueStatsByIdsRequestBuilder(queueStatsIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -37881,7 +37189,7 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getQueueStatsByIdsV2", localVarResponse); + throw getApiException("getQueueStatsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -37917,10 +37225,10 @@ public ApiResponse> getQueueStatsByIdsV2WithHttpInfo(@javax.ann } } - private HttpRequest.Builder getQueueStatsByIdsV2RequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { + private HttpRequest.Builder getQueueStatsByIdsRequestBuilder(@javax.annotation.Nonnull List queueStatsIds, Map headers) throws ApiException { // verify the required parameter 'queueStatsIds' is set if (queueStatsIds == null) { - throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'queueStatsIds' when calling getQueueStatsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -39701,50 +39009,50 @@ private HttpRequest.Builder getRuleChainsRequestBuilder(@javax.annotation.Nonnul } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2(ruleChainIds, null); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIds(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<RuleChain> * @throws ApiException if fails to make API call */ - public List getRuleChainsByIdsV2(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, headers); + public List getRuleChainsByIds(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getRuleChainsByIdsWithHttpInfo(ruleChainIds, headers); return localVarResponse.getData(); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { - return getRuleChainsByIdsV2WithHttpInfo(ruleChainIds, null); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds) throws ApiException { + return getRuleChainsByIdsWithHttpInfo(ruleChainIds, null); } /** - * Get Rule Chains By Ids (getRuleChainsByIdsV2) + * Get Rule Chains By Ids (getRuleChainsByIds) * Requested rule chains must be owned by tenant which is performing the request. * @param ruleChainIds A list of rule chain ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<RuleChain>> * @throws ApiException if fails to make API call */ - public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsV2RequestBuilder(ruleChainIds, headers); + public ApiResponse> getRuleChainsByIdsWithHttpInfo(@javax.annotation.Nonnull List ruleChainIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getRuleChainsByIdsRequestBuilder(ruleChainIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -39755,7 +39063,7 @@ public ApiResponse> getRuleChainsByIdsV2WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getRuleChainsByIdsV2", localVarResponse); + throw getApiException("getRuleChainsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -39791,10 +39099,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(); @@ -40168,169 +39476,6 @@ private HttpRequest.Builder getShortCustomerInfoByIdRequestBuilder(@javax.annota 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 system info (getSystemInfo) * Get main information about system. Available for users with 'SYS_ADMIN' authority. @@ -40441,50 +39586,50 @@ private HttpRequest.Builder getSystemInfoRequestBuilder(Map head } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2(resourceIds, null); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIds(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<TbResourceInfo> * @throws ApiException if fails to make API call */ - public List getSystemOrTenantResourcesByIdsV2(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, headers); + public List getSystemOrTenantResourcesByIds(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, headers); return localVarResponse.getData(); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { - return getSystemOrTenantResourcesByIdsV2WithHttpInfo(resourceIds, null); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds) throws ApiException { + return getSystemOrTenantResourcesByIdsWithHttpInfo(resourceIds, null); } /** - * Get Resource Infos by ids (getSystemOrTenantResourcesByIdsV2) + * Get Resource Infos by ids (getSystemOrTenantResourcesByIds) * * @param resourceIds A list of resource ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<TbResourceInfo>> * @throws ApiException if fails to make API call */ - public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsV2RequestBuilder(resourceIds, headers); + public ApiResponse> getSystemOrTenantResourcesByIdsWithHttpInfo(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getSystemOrTenantResourcesByIdsRequestBuilder(resourceIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -40495,7 +39640,7 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getSystemOrTenantResourcesByIdsV2", localVarResponse); + throw getApiException("getSystemOrTenantResourcesByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -40531,10 +39676,10 @@ public ApiResponse> getSystemOrTenantResourcesByIdsV2WithHt } } - private HttpRequest.Builder getSystemOrTenantResourcesByIdsV2RequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { + private HttpRequest.Builder getSystemOrTenantResourcesByIdsRequestBuilder(@javax.annotation.Nonnull List resourceIds, Map headers) throws ApiException { // verify the required parameter 'resourceIds' is set if (resourceIds == null) { - throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'resourceIds' when calling getSystemOrTenantResourcesByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -41462,27 +40607,27 @@ private HttpRequest.Builder getTenantCustomerRequestBuilder(@javax.annotation.No } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboards(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41490,33 +40635,33 @@ public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Strin * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboards(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboardsWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsWithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards by System Administrator (getTenantDashboards) - * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. - * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get Tenant Dashboards (getTenantDashboards) + * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) + * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41524,8 +40669,8 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsWithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsRequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -41572,11 +40717,7 @@ public ApiResponse getTenantDashboardsWithHttpInfo(@javax } } - private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'tenantId' is set - if (tenantId == null) { - throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboards"); - } + private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards"); @@ -41588,8 +40729,7 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/{tenantId}/dashboards" - .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); + String localVarPath = "/api/tenant/dashboards"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -41598,6 +40738,8 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "mobile"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -41631,27 +40773,27 @@ private HttpRequest.Builder getTenantDashboardsRequestBuilder(@javax.annotation. } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantId(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41659,33 +40801,33 @@ public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Inte * @return PageDataDashboardInfo * @throws ApiException if fails to make API call */ - public PageDataDashboardInfo getTenantDashboards1(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - ApiResponse localVarResponse = getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public PageDataDashboardInfo getTenantDashboardsByTenantId(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + ApiResponse localVarResponse = getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); return localVarResponse.getData(); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { - return getTenantDashboards1WithHttpInfo(pageSize, page, mobile, textSearch, sortProperty, sortOrder, null); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder) throws ApiException { + return getTenantDashboardsByTenantIdWithHttpInfo(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, null); } /** - * Get Tenant Dashboards (getTenantDashboards) - * Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' authority. + * Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId) + * Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'SYS_ADMIN' authority. + * @param tenantId A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param mobile Exclude dashboards that are hidden for mobile (optional) * @param textSearch The case insensitive 'substring' filter based on the dashboard title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -41693,8 +40835,8 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java * @return ApiResponse<PageDataDashboardInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getTenantDashboards1WithHttpInfo(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDashboards1RequestBuilder(pageSize, page, mobile, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getTenantDashboardsByTenantIdWithHttpInfo(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantDashboardsByTenantIdRequestBuilder(tenantId, pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -41705,7 +40847,7 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantDashboards1", localVarResponse); + throw getApiException("getTenantDashboardsByTenantId", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -41741,19 +40883,24 @@ public ApiResponse getTenantDashboards1WithHttpInfo(@java } } - private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable Boolean mobile, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getTenantDashboardsByTenantIdRequestBuilder(@javax.annotation.Nonnull String tenantId, @javax.annotation.Nonnull Integer pageSize, @javax.annotation.Nonnull Integer page, @javax.annotation.Nullable String textSearch, @javax.annotation.Nullable String sortProperty, @javax.annotation.Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException(400, "Missing the required parameter 'tenantId' when calling getTenantDashboardsByTenantId"); + } // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDashboardsByTenantId"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboards1"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDashboardsByTenantId"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/tenant/dashboards"; + String localVarPath = "/api/tenant/{tenantId}/dashboards" + .replace("{tenantId}", ApiClient.urlEncode(tenantId.toString())); List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -41762,8 +40909,6 @@ private HttpRequest.Builder getTenantDashboards1RequestBuilder(@javax.annotation localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "mobile"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("mobile", mobile)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; @@ -43908,7 +43053,7 @@ private HttpRequest.Builder getTenantMobileAppBundleInfosRequestBuilder(@javax.a } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -43924,7 +43069,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -43942,7 +43087,7 @@ public PageDataMobileApp getTenantMobileApps(@javax.annotation.Nonnull Integer p } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -43958,7 +43103,7 @@ public ApiResponse getTenantMobileAppsWithHttpInfo(@javax.ann } /** - * Get mobile app infos (getTenantMobileAppInfos) + * Get mobile app infos (getTenantMobileApps) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45092,7 +44237,7 @@ private HttpRequest.Builder getTenantQueuesByServiceTypeRequestBuilder(@javax.an } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45107,7 +44252,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45124,7 +44269,7 @@ public PageDataTbResourceInfo getTenantResources(@javax.annotation.Nonnull Integ } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45139,7 +44284,7 @@ public ApiResponse getTenantResourcesWithHttpInfo(@javax } /** - * Get All Resource Infos (getAllResources) + * Get All Resource Infos (getTenantResources) * Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -45521,50 +44666,50 @@ private HttpRequest.Builder getTenantsRequestBuilder(@javax.annotation.Nonnull I } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2(tenantIds, null); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIds(tenantIds, null); } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<Tenant> * @throws ApiException if fails to make API call */ - public List getTenantsByIdsV2(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTenantsByIdsV2WithHttpInfo(tenantIds, headers); + public List getTenantsByIds(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getTenantsByIdsWithHttpInfo(tenantIds, headers); return localVarResponse.getData(); } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { - return getTenantsByIdsV2WithHttpInfo(tenantIds, null); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds) throws ApiException { + return getTenantsByIdsWithHttpInfo(tenantIds, null); } /** - * Get Tenants list (getTenantsByIdsV2) + * Get Tenants list (getTenantsByIds) * * @param tenantIds A list of tenant ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<Tenant>> * @throws ApiException if fails to make API call */ - public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsV2RequestBuilder(tenantIds, headers); + public ApiResponse> getTenantsByIdsWithHttpInfo(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getTenantsByIdsRequestBuilder(tenantIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -45575,7 +44720,7 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTenantsByIdsV2", localVarResponse); + throw getApiException("getTenantsByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -45611,10 +44756,10 @@ public ApiResponse> getTenantsByIdsV2WithHttpInfo(@javax.annotation } } - private HttpRequest.Builder getTenantsByIdsV2RequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { + private HttpRequest.Builder getTenantsByIdsRequestBuilder(@javax.annotation.Nonnull List tenantIds, Map headers) throws ApiException { // verify the required parameter 'tenantIds' is set if (tenantIds == null) { - throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'tenantIds' when calling getTenantsByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -45993,134 +45138,6 @@ private HttpRequest.Builder getTimeseriesKeysRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return List<String> - * @throws ApiException if fails to make API call - */ - public List getTimeseriesKeys1(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - ApiResponse> localVarResponse = getTimeseriesKeys1WithHttpInfo(deviceProfileId, headers); - return localVarResponse.getData(); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId) throws ApiException { - return getTimeseriesKeys1WithHttpInfo(deviceProfileId, null); - } - - /** - * Get time series keys (getTimeseriesKeys) - * Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. Available for users with 'TENANT_ADMIN' authority. - * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<List<String>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getTimeseriesKeys1WithHttpInfo(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTimeseriesKeys1RequestBuilder(deviceProfileId, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getTimeseriesKeys1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder getTimeseriesKeys1RequestBuilder(@javax.annotation.Nullable String deviceProfileId, Map headers) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/deviceProfile/devices/keys/timeseries"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "deviceProfileId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deviceProfileId", deviceProfileId)); - - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } - - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Get Trendz Settings (getTrendzSettings) * Retrieves Trendz settings for this tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -46755,7 +45772,7 @@ private HttpRequest.Builder getUserByIdRequestBuilder(@javax.annotation.Nonnull } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @return UserDashboardsInfo * @throws ApiException if fails to make API call @@ -46765,7 +45782,7 @@ public UserDashboardsInfo getUserDashboardsInfo() throws ApiException { } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param headers Optional headers to include in the request * @return UserDashboardsInfo @@ -46777,7 +45794,7 @@ public UserDashboardsInfo getUserDashboardsInfo(Map headers) thr } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @return ApiResponse<UserDashboardsInfo> * @throws ApiException if fails to make API call @@ -46787,7 +45804,7 @@ public ApiResponse getUserDashboardsInfoWithHttpInfo() throw } /** - * Get information about last visited and starred dashboards (getLastVisitedDashboards) + * Get information about last visited and starred dashboards (getUserDashboardsInfo) * Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param headers Optional headers to include in the request * @return ApiResponse<UserDashboardsInfo> @@ -47738,50 +46755,50 @@ private HttpRequest.Builder getUsersRequestBuilder(@javax.annotation.Nonnull Int } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2(userIds, null); + public List getUsersByIds(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIds(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return List<User> * @throws ApiException if fails to make API call */ - public List getUsersByIdsV2(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - ApiResponse> localVarResponse = getUsersByIdsV2WithHttpInfo(userIds, headers); + public List getUsersByIds(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + ApiResponse> localVarResponse = getUsersByIdsWithHttpInfo(userIds, headers); return localVarResponse.getData(); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { - return getUsersByIdsV2WithHttpInfo(userIds, null); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds) throws ApiException { + return getUsersByIdsWithHttpInfo(userIds, null); } /** - * Get Users By Ids (getUsersByIdsV2) + * Get Users By Ids (getUsersByIds) * Requested users must be owned by tenant or assigned to customer which user is performing the request. * @param userIds A list of user ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<User>> * @throws ApiException if fails to make API call */ - public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getUsersByIdsV2RequestBuilder(userIds, headers); + public ApiResponse> getUsersByIdsWithHttpInfo(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getUsersByIdsRequestBuilder(userIds, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -47792,7 +46809,7 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getUsersByIdsV2", localVarResponse); + throw getApiException("getUsersByIds", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -47828,10 +46845,10 @@ public ApiResponse> getUsersByIdsV2WithHttpInfo(@javax.annotation.Non } } - private HttpRequest.Builder getUsersByIdsV2RequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { + private HttpRequest.Builder getUsersByIdsRequestBuilder(@javax.annotation.Nonnull List userIds, Map headers) throws ApiException { // verify the required parameter 'userIds' is set if (userIds == null) { - throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIdsV2"); + throw new ApiException(400, "Missing the required parameter 'userIds' when calling getUsersByIds"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -49299,46 +48316,51 @@ private HttpRequest.Builder getWidgetsBundlesListRequestBuilder(@javax.annotatio } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return List<WidgetsBundle> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2() throws ApiException { - return getWidgetsBundlesV2(null); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + handleMailOAuth2Callback(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return List<WidgetsBundle> * @throws ApiException if fails to make API call */ - public List getWidgetsBundlesV2(Map headers) throws ApiException { - ApiResponse> localVarResponse = getWidgetsBundlesV2WithHttpInfo(headers); - return localVarResponse.getData(); + public void handleMailOAuth2Callback(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + handleMailOAuth2CallbackWithHttpInfo(code, state, headers); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. - * @return ApiResponse<List<WidgetsBundle>> + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo() throws ApiException { - return getWidgetsBundlesV2WithHttpInfo(null); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state) throws ApiException { + return handleMailOAuth2CallbackWithHttpInfo(code, state, null); } /** - * Get all Widget Bundles (getWidgetsBundlesV2) - * Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. Available for any authorized user. + * handleMailOAuth2Callback + * + * @param code (required) + * @param state (required) * @param headers Optional headers to include in the request - * @return ApiResponse<List<WidgetsBundle>> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getWidgetsBundlesV2RequestBuilder(headers); + public ApiResponse handleMailOAuth2CallbackWithHttpInfo(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleMailOAuth2CallbackRequestBuilder(code, state, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49349,27 +48371,16 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - List responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}); - - - return new ApiResponse>( + return new ApiResponse<>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseValue + null ); } finally { if (localVarResponseBody != null) { @@ -49385,13 +48396,38 @@ public ApiResponse> getWidgetsBundlesV2WithHttpInfo(Map headers) throws ApiException { + private HttpRequest.Builder handleMailOAuth2CallbackRequestBuilder(@javax.annotation.Nonnull String code, @javax.annotation.Nonnull String state, Map headers) throws ApiException { + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException(400, "Missing the required parameter 'code' when calling handleMailOAuth2Callback"); + } + // verify the required parameter 'state' is set + if (state == null) { + throw new ApiException(400, "Missing the required parameter 'state' when calling handleMailOAuth2Callback"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/widgetsBundles/all"; + String localVarPath = "/api/admin/mail/oauth2/code"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "code"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("code", code)); + localVarQueryParameterBaseName = "state"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("state", state)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Accept", "application/json"); @@ -49408,54 +48444,54 @@ private HttpRequest.Builder getWidgetsBundlesV2RequestBuilder(Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request - * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49466,7 +48502,7 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49502,19 +48538,19 @@ public ApiResponse handleOneWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/oneway/{deviceId}" + String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -49535,54 +48571,54 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1(deviceId, body, null); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleOneWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleOneWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleOneWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleOneWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send one-way RPC request (handleOneWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) + * Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleOneWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleOneWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49593,7 +48629,7 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleOneWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleOneWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49629,19 +48665,19 @@ public ApiResponse handleOneWayDeviceRPCRequest1WithHttpInfo(@javax.anno } } - private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleOneWayDeviceRPCRequestV2RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleOneWayDeviceRPCRequestV2"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleOneWayDeviceRPCRequestV2"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" + String localVarPath = "/api/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -49662,7 +48698,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49670,12 +48706,12 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequest1RequestBuilder(@javax.a * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest(entityType, entityId, body, null); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntity(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49684,13 +48720,13 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, headers); + public String handleRuleEngineRequestForEntity(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, headers); return localVarResponse.getData(); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49698,12 +48734,12 @@ public String handleRuleEngineRequest(@javax.annotation.Nonnull String entityTyp * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequestWithHttpInfo(entityType, entityId, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithHttpInfo(entityType, entityId, body, null); } /** - * Push entity message to the rule engine (handleRuleEngineRequest) + * Push entity message to the rule engine (handleRuleEngineRequestForEntity) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) @@ -49712,8 +48748,8 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestRequestBuilder(entityType, entityId, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityRequestBuilder(entityType, entityId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49724,7 +48760,7 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntity", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49760,18 +48796,18 @@ public ApiResponse handleRuleEngineRequestWithHttpInfo(@javax.annotation } } - private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntity"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntity"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -49798,62 +48834,66 @@ private HttpRequest.Builder handleRuleEngineRequestRequestBuilder(@javax.annotat } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1(entityType, entityId, timeout, body, null); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeout(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest1(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest1WithHttpInfo(entityType, entityId, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(entityType, entityId, queueName, timeout, body, null); } /** - * Push entity message with timeout to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequestForEntityWithQueueAndTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest1RequestBuilder(entityType, entityId, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithQueueAndTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(entityType, entityId, queueName, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -49864,7 +48904,7 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest1", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithQueueAndTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -49900,29 +48940,34 @@ public ApiResponse handleRuleEngineRequest1WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithQueueAndTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); + } + // verify the required parameter 'queueName' is set + if (queueName == null) { + throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithQueueAndTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) + .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -49943,66 +48988,62 @@ private HttpRequest.Builder handleRuleEngineRequest1RequestBuilder(@javax.annota } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2(entityType, entityId, queueName, timeout, body, null); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeout(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest2(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, headers); + public String handleRuleEngineRequestForEntityWithTimeout(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, headers); return localVarResponse.getData(); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest2WithHttpInfo(entityType, entityId, queueName, timeout, body, null); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(entityType, entityId, timeout, body, null); } /** - * Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) - * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Push entity message with timeout to the rule engine (handleRuleEngineRequestForEntityWithTimeout) + * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest2RequestBuilder(entityType, entityId, queueName, timeout, body, headers); + public ApiResponse handleRuleEngineRequestForEntityWithTimeoutWithHttpInfo(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(entityType, entityId, timeout, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50013,7 +49054,7 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest2", localVarResponse); + throw getApiException("handleRuleEngineRequestForEntityWithTimeout", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50049,34 +49090,29 @@ public ApiResponse handleRuleEngineRequest2WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull String queueName, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForEntityWithTimeoutRequestBuilder(@javax.annotation.Nonnull String entityType, @javax.annotation.Nonnull String entityId, @javax.annotation.Nonnull Integer timeout, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityType' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'entityId' is set if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequest2"); - } - // verify the required parameter 'queueName' is set - if (queueName == null) { - throw new ApiException(400, "Missing the required parameter 'queueName' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'entityId' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'timeout' is set if (timeout == null) { - throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'timeout' when calling handleRuleEngineRequestForEntityWithTimeout"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest2"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForEntityWithTimeout"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}" + String localVarPath = "/api/rule-engine/{entityType}/{entityId}/{timeout}" .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) - .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -50097,50 +49133,50 @@ private HttpRequest.Builder handleRuleEngineRequest2RequestBuilder(@javax.annota } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3(body, null); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUser(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleRuleEngineRequest3(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleRuleEngineRequest3WithHttpInfo(body, headers); + public String handleRuleEngineRequestForUser(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleRuleEngineRequestForUserWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { - return handleRuleEngineRequest3WithHttpInfo(body, null); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body) throws ApiException { + return handleRuleEngineRequestForUserWithHttpInfo(body, null); } /** - * Push user message to the rule engine (handleRuleEngineRequest) + * Push user message to the rule engine (handleRuleEngineRequestForUser) * Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequest3RequestBuilder(body, headers); + public ApiResponse handleRuleEngineRequestForUserWithHttpInfo(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleRuleEngineRequestForUserRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50151,7 +49187,7 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleRuleEngineRequest3", localVarResponse); + throw getApiException("handleRuleEngineRequestForUser", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50187,10 +49223,10 @@ public ApiResponse handleRuleEngineRequest3WithHttpInfo(@javax.annotatio } } - private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleRuleEngineRequestForUserRequestBuilder(@javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequest3"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleRuleEngineRequestForUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -50215,54 +49251,54 @@ private HttpRequest.Builder handleRuleEngineRequest3RequestBuilder(@javax.annota } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequestWithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV1WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request - * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) + * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestRequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV1RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50273,7 +49309,7 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV1", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50309,19 +49345,19 @@ public ApiResponse handleTwoWayDeviceRPCRequestWithHttpInfo(@javax.annot } } - private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder handleTwoWayDeviceRPCRequestV1RequestBuilder(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { // verify the required parameter 'deviceId' is set if (deviceId == null) { - throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'deviceId' when calling handleTwoWayDeviceRPCRequestV1"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequest"); + throw new ApiException(400, "Missing the required parameter 'body' when calling handleTwoWayDeviceRPCRequestV1"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/rpc/twoway/{deviceId}" + String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -50342,54 +49378,54 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestRequestBuilder(@javax.an } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1(deviceId, body, null); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return String * @throws ApiException if fails to make API call */ - public String handleTwoWayDeviceRPCRequest1(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - ApiResponse localVarResponse = handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, headers); + public String handleTwoWayDeviceRPCRequestV2(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + ApiResponse localVarResponse = handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, headers); return localVarResponse.getData(); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { - return handleTwoWayDeviceRPCRequest1WithHttpInfo(deviceId, body, null); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body) throws ApiException { + return handleTwoWayDeviceRPCRequestV2WithHttpInfo(deviceId, body, null); } /** - * Send two-way RPC request (handleTwoWayDeviceRPCRequest) - * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) + * Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param body (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call */ - public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequest1RequestBuilder(deviceId, body, headers); + public ApiResponse handleTwoWayDeviceRPCRequestV2WithHttpInfo(@javax.annotation.Nonnull String deviceId, @javax.annotation.Nonnull String body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = handleTwoWayDeviceRPCRequestV2RequestBuilder(deviceId, body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -50400,7 +49436,7 @@ public ApiResponse handleTwoWayDeviceRPCRequest1WithHttpInfo(@javax.anno InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("handleTwoWayDeviceRPCRequest1", localVarResponse); + throw getApiException("handleTwoWayDeviceRPCRequestV2", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -50436,19 +49472,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)); @@ -52762,387 +51798,6 @@ private HttpRequest.Builder markNotificationAsReadRequestBuilder(@javax.annotati return localVarRequestBuilder; } - /** - * 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 String - * @throws ApiException if fails to make API call - */ - public String postDeviceAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body) throws ApiException { - return postDeviceAttributes(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 String - * @throws ApiException if fails to make API call - */ - public String postDeviceAttributes(@javax.annotation.Nonnull String deviceToken, @javax.annotation.Nonnull String body, 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; - } - /** * Import the bulk of assets (processAssetsBulkImport) * There's an ability to import the bulk of assets using the only .csv file. @@ -53622,125 +52277,7 @@ private HttpRequest.Builder processSystemEdqsRequestRequestBuilder(@javax.annota } /** - * 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; - } - - /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @throws ApiException if fails to make API call @@ -53750,7 +52287,7 @@ public void putGeneralUserSettings(@javax.annotation.Nullable Object body) throw } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @param headers Optional headers to include in the request @@ -53761,7 +52298,7 @@ public void putGeneralUserSettings(@javax.annotation.Nullable Object body, Map putGeneralUserSettingsWithHttpInfo(@javax.annotation.Nu } /** - * Update user settings (saveUserSettings) + * Update user settings (putGeneralUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param body (required) * @param headers Optional headers to include in the request @@ -53849,7 +52386,7 @@ private HttpRequest.Builder putGeneralUserSettingsRequestBuilder(@javax.annotati } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -53860,7 +52397,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -53872,7 +52409,7 @@ public void putUserSettings(@javax.annotation.Nonnull String type, @javax.annota } /** - * Update user settings (saveUserSettings) + * Update user settings (putUserSettings) * Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} * @param type Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) * @param body (required) @@ -53884,7 +52421,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) @@ -54441,142 +52978,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. @@ -57226,129 +55627,6 @@ private HttpRequest.Builder saveDeviceProfileRequestBuilder(@javax.annotation.No return localVarRequestBuilder; } - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody) throws ApiException { - return saveDeviceWithCredentials(requestBody, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param headers Optional headers to include in the request - * @return Device - * @throws ApiException if fails to make API call - */ - public Device saveDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(requestBody, headers); - return localVarResponse.getData(); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws ApiException { - return saveDeviceWithCredentialsWithHttpInfo(requestBody, null); - } - - /** - * Save device with credentials (Deprecated) - * - * @param requestBody (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Device> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(requestBody, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { - // verify the required parameter 'requestBody' is set - if (requestBody == null) { - throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveDeviceWithCredentials"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/lwm2m/device-credentials"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Create Device (saveDevice) with credentials * Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\". You may find the example of device with different type of credentials below: - Credentials type: <b>\"Access token\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken\", \"label\":\"Label_DeviceWithCredantial_AccessToken\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une2\" } } ``` - Credentials type: <b>\"Access token\"</b> with <b>device profile default</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\", \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\", \"type\": \"default\" }, \"credentials\": { \"credentialsType\": \"ACCESS_TOKEN\", \"credentialsId\": \"6hmxew8pmmzng4e3une3\" } } ``` - Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\"). ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_X509_Certificate\", \"label\":\"Label_DeviceWithCredantial_X509_Certificate\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"X509_CERTIFICATE\", \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\", \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\" } } ``` - Credentials type: <b>\"MQTT_BASIC\"</b> with <b>device profile ID</b> below: ```json { \"device\": { \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\", \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\", \"deviceProfileId\":{ \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"MQTT_BASIC\", \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\" } } ``` - You may find the example of <b>LwM2M</b> device and <b>RPK</b> credentials below: Note: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\". ```json { \"device\": { \"name\":\"Name_LwRpk00000000\", \"label\":\"Label_LwRpk00000000\", \"deviceProfileId\":{ \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\", \"entityType\":\"DEVICE_PROFILE\" } }, \"credentials\": { \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\" } } ``` Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -57359,8 +55637,8 @@ private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annot * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentials(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -57374,8 +55652,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return Device * @throws ApiException if fails to make API call */ - public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - ApiResponse localVarResponse = saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public Device saveDeviceWithCredentials(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + ApiResponse localVarResponse = saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); return localVarResponse.getData(); } @@ -57389,8 +55667,8 @@ public Device saveDeviceWithCredentials1(@javax.annotation.Nonnull SaveDeviceWit * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { - return saveDeviceWithCredentials1WithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy) throws ApiException { + return saveDeviceWithCredentialsWithHttpInfo(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, null); } /** @@ -57404,8 +55682,8 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat * @return ApiResponse<Device> * @throws ApiException if fails to make API call */ - public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentials1RequestBuilder(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); + public ApiResponse saveDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveDeviceWithCredentialsRequestBuilder(saveDeviceWithCredentialsRequest, nameConflictPolicy, uniquifySeparator, uniquifyStrategy, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -57416,7 +55694,7 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveDeviceWithCredentials1", localVarResponse); + throw getApiException("saveDeviceWithCredentials", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -57452,10 +55730,10 @@ public ApiResponse saveDeviceWithCredentials1WithHttpInfo(@javax.annotat } } - private HttpRequest.Builder saveDeviceWithCredentials1RequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { + private HttpRequest.Builder saveDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull SaveDeviceWithCredentialsRequest saveDeviceWithCredentialsRequest, @javax.annotation.Nullable NameConflictPolicy nameConflictPolicy, @javax.annotation.Nullable String uniquifySeparator, @javax.annotation.Nullable UniquifyStrategy uniquifyStrategy, Map headers) throws ApiException { // verify the required parameter 'saveDeviceWithCredentialsRequest' is set if (saveDeviceWithCredentialsRequest == null) { - throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials1"); + throw new ApiException(400, "Missing the required parameter 'saveDeviceWithCredentialsRequest' when calling saveDeviceWithCredentials"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -58757,6 +57035,129 @@ private HttpRequest.Builder saveJwtSettingsRequestBuilder(@javax.annotation.Nonn return localVarRequestBuilder; } + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody) throws ApiException { + return saveLwm2mDeviceWithCredentials(requestBody, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @param headers Optional headers to include in the request + * @return Device + * @throws ApiException if fails to make API call + */ + public Device saveLwm2mDeviceWithCredentials(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { + ApiResponse localVarResponse = saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, headers); + return localVarResponse.getData(); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws ApiException { + return saveLwm2mDeviceWithCredentialsWithHttpInfo(requestBody, null); + } + + /** + * Save LwM2M device with credentials (saveLwm2mDeviceWithCredentials) (Deprecated) + * + * @param requestBody (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Device> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveLwm2mDeviceWithCredentialsWithHttpInfo(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveLwm2mDeviceWithCredentialsRequestBuilder(requestBody, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("saveLwm2mDeviceWithCredentials", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + + + String responseBody = new String(localVarResponseBody.readAllBytes()); + Device responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + + + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseValue + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder saveLwm2mDeviceWithCredentialsRequestBuilder(@javax.annotation.Nonnull Map requestBody, Map headers) throws ApiException { + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling saveLwm2mDeviceWithCredentials"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/lwm2m/device-credentials"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Save Or update Mobile app (saveMobileApp) * Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error. The pair of mobile app package name and platform type is unique for entire platform setup. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -60465,10 +58866,11 @@ private HttpRequest.Builder saveQueueRequestBuilder(@javax.annotation.Nonnull St * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - saveRelation(entityRelation, null); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + return saveRelation(entityRelation, null); } /** @@ -60476,20 +58878,22 @@ public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request + * @return EntityRelation * @throws ApiException if fails to make API call */ - public void saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - saveRelationWithHttpInfo(entityRelation, headers); + public EntityRelation saveRelation(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + ApiResponse localVarResponse = saveRelationWithHttpInfo(entityRelation, headers); + return localVarResponse.getData(); } /** * Create Relation (saveRelation) * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { return saveRelationWithHttpInfo(entityRelation, null); } @@ -60498,10 +58902,10 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. * @param entityRelation (required) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<EntityRelation> * @throws ApiException if fails to make API call */ - public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = saveRelationRequestBuilder(entityRelation, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -60516,118 +58920,6 @@ public ApiResponse saveRelationWithHttpInfo(@javax.annotation.Nonnull Enti throw getApiException("saveRelation", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - // verify the required parameter 'entityRelation' is set - if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/relation"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(entityRelation); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return EntityRelation - * @throws ApiException if fails to make API call - */ - public EntityRelation saveRelationV2(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRelationV2WithHttpInfo(entityRelation, headers); - return localVarResponse.getData(); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation) throws ApiException { - return saveRelationV2WithHttpInfo(entityRelation, null); - } - - /** - * Create Relation (saveRelationV2) - * Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. If the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer. - * @param entityRelation (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<EntityRelation> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRelationV2RequestBuilder(entityRelation, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRelationV2", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { return new ApiResponse( localVarResponse.statusCode(), @@ -60661,10 +58953,10 @@ public ApiResponse saveRelationV2WithHttpInfo(@javax.annotation. } } - private HttpRequest.Builder saveRelationV2RequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { + private HttpRequest.Builder saveRelationRequestBuilder(@javax.annotation.Nonnull EntityRelation entityRelation, Map headers) throws ApiException { // verify the required parameter 'entityRelation' is set if (entityRelation == null) { - throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelationV2"); + throw new ApiException(400, "Missing the required parameter 'entityRelation' when calling saveRelation"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -61070,129 +59362,6 @@ private HttpRequest.Builder saveRuleChainRequestBuilder(@javax.annotation.Nonnul return localVarRequestBuilder; } - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return RuleChain - * @throws ApiException if fails to make API call - */ - public RuleChain saveRuleChain1(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - ApiResponse localVarResponse = saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, headers); - return localVarResponse.getData(); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest) throws ApiException { - return saveRuleChain1WithHttpInfo(defaultRuleChainCreateRequest, null); - } - - /** - * Create Default Rule Chain - * Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. Available for users with 'TENANT_ADMIN' authority. - * @param defaultRuleChainCreateRequest (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<RuleChain> - * @throws ApiException if fails to make API call - */ - public ApiResponse saveRuleChain1WithHttpInfo(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = saveRuleChain1RequestBuilder(defaultRuleChainCreateRequest, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("saveRuleChain1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } - - - - String responseBody = new String(localVarResponseBody.readAllBytes()); - RuleChain responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - - - return new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseValue - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder saveRuleChain1RequestBuilder(@javax.annotation.Nonnull DefaultRuleChainCreateRequest defaultRuleChainCreateRequest, Map headers) throws ApiException { - // verify the required parameter 'defaultRuleChainCreateRequest' is set - if (defaultRuleChainCreateRequest == null) { - throw new ApiException(400, "Missing the required parameter 'defaultRuleChainCreateRequest' when calling saveRuleChain1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/ruleChain/device/default"; - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(defaultRuleChainCreateRequest); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Update Rule Chain Metadata * Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections. Available for users with 'TENANT_ADMIN' authority. @@ -63515,6 +61684,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. @@ -64219,280 +62511,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. @@ -64612,54 +62630,50 @@ private HttpRequest.Builder syncEdgeRequestBuilder(@javax.annotation.Nonnull Str } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScript(body, scriptLang, null); + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScript(body, null); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - ApiResponse localVarResponse = testScriptWithHttpInfo(body, scriptLang, headers); + public com.fasterxml.jackson.databind.JsonNode testCalculatedFieldScript(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + ApiResponse localVarResponse = testCalculatedFieldScriptWithHttpInfo(body, headers); return localVarResponse.getData(); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { - return testScriptWithHttpInfo(body, scriptLang, null); + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { + return testCalculatedFieldScriptWithHttpInfo(body, null); } /** - * Test Script function - * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test JS request. See API call description above. (required) - * @param scriptLang Script language: JS or TBEL (optional) + * Test Script expression + * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test calculated field TBEL expression. (required) * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScriptRequestBuilder(body, scriptLang, headers); + public ApiResponse testCalculatedFieldScriptWithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testCalculatedFieldScriptRequestBuilder(body, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -64670,7 +62684,7 @@ public ApiResponse testScriptWithHttpIn InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript", localVarResponse); + throw getApiException("testCalculatedFieldScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -64706,32 +62720,17 @@ public ApiResponse testScriptWithHttpIn } } - private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + private HttpRequest.Builder testCalculatedFieldScriptRequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testCalculatedFieldScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/ruleChain/testScript"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "scriptLang"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + String localVarPath = "/api/calculatedField/testScript"; - if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - StringJoiner queryJoiner = new StringJoiner("&"); - localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); - if (localVarQueryStringJoiner.length() != 0) { - queryJoiner.add(localVarQueryStringJoiner.toString()); - } - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); - } else { - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); @@ -64754,50 +62753,54 @@ private HttpRequest.Builder testScriptRequestBuilder(@javax.annotation.Nullable } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1(body, null); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScript(body, scriptLang, null); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public com.fasterxml.jackson.databind.JsonNode testScript1(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - ApiResponse localVarResponse = testScript1WithHttpInfo(body, headers); + public com.fasterxml.jackson.databind.JsonNode testRuleChainScript(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + ApiResponse localVarResponse = testRuleChainScriptWithHttpInfo(body, scriptLang, headers); return localVarResponse.getData(); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body) throws ApiException { - return testScript1WithHttpInfo(body, null); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang) throws ApiException { + return testRuleChainScriptWithHttpInfo(body, scriptLang, null); } /** - * Test Script expression - * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. - * @param body Test calculated field TBEL expression. (required) + * Test Script function + * Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test JS request. See API call description above. (required) + * @param scriptLang Script language: JS or TBEL (optional) * @param headers Optional headers to include in the request * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse testScript1WithHttpInfo(@javax.annotation.Nullable Object body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testScript1RequestBuilder(body, headers); + public ApiResponse testRuleChainScriptWithHttpInfo(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testRuleChainScriptRequestBuilder(body, scriptLang, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -64808,7 +62811,7 @@ public ApiResponse testScript1WithHttpI InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("testScript1", localVarResponse); + throw getApiException("testRuleChainScript", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -64844,17 +62847,32 @@ public ApiResponse testScript1WithHttpI } } - private HttpRequest.Builder testScript1RequestBuilder(@javax.annotation.Nullable Object body, Map headers) throws ApiException { + private HttpRequest.Builder testRuleChainScriptRequestBuilder(@javax.annotation.Nullable Object body, @javax.annotation.Nullable ScriptLanguage scriptLang, Map headers) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testScript1"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testRuleChainScript"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/calculatedField/testScript"; + String localVarPath = "/api/ruleChain/testScript"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "scriptLang"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scriptLang", scriptLang)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); @@ -66838,6 +64856,124 @@ private HttpRequest.Builder updateDeviceCredentialsRequestBuilder(@javax.annotat return localVarRequestBuilder; } + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @throws ApiException if fails to make API call + */ + public void updateDomainOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateDomainOauth2Clients(id, UUID, null); + } + + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @param headers Optional headers to include in the request + * @throws ApiException if fails to make API call + */ + public void updateDomainOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateDomainOauth2ClientsWithHttpInfo(id, UUID, headers); + } + + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateDomainOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateDomainOauth2ClientsWithHttpInfo(id, UUID, null); + } + + /** + * Update oauth2 clients (updateDomainOauth2Clients) + * Update oauth2 clients for the specified domain. + * @param id (required) + * @param UUID (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateDomainOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateDomainOauth2ClientsRequestBuilder(id, UUID, headers); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + InputStream localVarResponseBody = null; + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("updateDomainOauth2Clients", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody != null) { + localVarResponseBody.readAllBytes(); + } + return new ApiResponse<>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } finally { + if (localVarResponseBody != null) { + localVarResponseBody.close(); + } + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder updateDomainOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateDomainOauth2Clients"); + } + // verify the required parameter 'UUID' is set + if (UUID == null) { + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateDomainOauth2Clients"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/api/domain/{id}/oauth2Clients" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(UUID); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * updateImage * @@ -67285,42 +65421,42 @@ private HttpRequest.Builder updateImagePublicStatusRequestBuilder(@javax.annotat } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients(id, UUID, null); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + updateMobileAppBundleOauth2Clients(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @param headers Optional headers to include in the request * @throws ApiException if fails to make API call */ - public void updateOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2ClientsWithHttpInfo(id, UUID, headers); + public void updateMobileAppBundleOauth2Clients(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, headers); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2ClientsWithHttpInfo(id, UUID, null); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { + return updateMobileAppBundleOauth2ClientsWithHttpInfo(id, UUID, null); } /** - * Update oauth2 clients (updateOauth2Clients) + * Update oauth2 clients (updateMobileAppBundleOauth2Clients) * Update oauth2 clients of the specified mobile app bundle. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param id (required) * @param UUID (required) @@ -67328,8 +65464,8 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2ClientsRequestBuilder(id, UUID, headers); + public ApiResponse updateMobileAppBundleOauth2ClientsWithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateMobileAppBundleOauth2ClientsRequestBuilder(id, UUID, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -67340,7 +65476,7 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients", localVarResponse); + throw getApiException("updateMobileAppBundleOauth2Clients", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody != null) { @@ -67365,14 +65501,14 @@ public ApiResponse updateOauth2ClientsWithHttpInfo(@javax.annotation.Nonnu } } - private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { + private HttpRequest.Builder updateMobileAppBundleOauth2ClientsRequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { // verify the required parameter 'id' is set if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'id' when calling updateMobileAppBundleOauth2Clients"); } // verify the required parameter 'UUID' is set if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients"); + throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateMobileAppBundleOauth2Clients"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -67402,124 +65538,6 @@ private HttpRequest.Builder updateOauth2ClientsRequestBuilder(@javax.annotation. return localVarRequestBuilder; } - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @throws ApiException if fails to make API call - */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - updateOauth2Clients1(id, UUID, null); - } - - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @param headers Optional headers to include in the request - * @throws ApiException if fails to make API call - */ - public void updateOauth2Clients1(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - updateOauth2Clients1WithHttpInfo(id, UUID, headers); - } - - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID) throws ApiException { - return updateOauth2Clients1WithHttpInfo(id, UUID, null); - } - - /** - * Update oauth2 clients (updateOauth2Clients) - * Update oauth2 clients for the specified domain. - * @param id (required) - * @param UUID (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse updateOauth2Clients1WithHttpInfo(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateOauth2Clients1RequestBuilder(id, UUID, headers); - try { - HttpResponse localVarResponse = memberVarHttpClient.send( - localVarRequestBuilder.build(), - HttpResponse.BodyHandlers.ofInputStream()); - if (memberVarResponseInterceptor != null) { - memberVarResponseInterceptor.accept(localVarResponse); - } - InputStream localVarResponseBody = null; - try { - if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("updateOauth2Clients1", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody != null) { - localVarResponseBody.readAllBytes(); - } - return new ApiResponse<>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - } finally { - if (localVarResponseBody != null) { - localVarResponseBody.close(); - } - } - } catch (IOException e) { - throw new ApiException(e); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new ApiException(e); - } - } - - private HttpRequest.Builder updateOauth2Clients1RequestBuilder(@javax.annotation.Nonnull UUID id, @javax.annotation.Nonnull List UUID, Map headers) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException(400, "Missing the required parameter 'id' when calling updateOauth2Clients1"); - } - // verify the required parameter 'UUID' is set - if (UUID == null) { - throw new ApiException(400, "Missing the required parameter 'UUID' when calling updateOauth2Clients1"); - } - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/api/domain/{id}/oauth2Clients" - .replace("{id}", ApiClient.urlEncode(id.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - localVarRequestBuilder.header("Content-Type", "application/json"); - localVarRequestBuilder.header("Accept", "application/json"); - - try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(UUID); - localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * updateResourceData * diff --git a/ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java b/ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java new file mode 100644 index 00000000..0a9d6d84 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AiModelExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AiModelExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AiModelExportData extends EntityExportData { + public AiModelExportData() { + } + + @Override + public AiModelExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AiModelExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AiModelExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AiModelExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AiModelExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AiModelExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AiModelExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AiModelExportData", AiModelExportData.class); + JSON.registerDiscriminator(AiModelExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java new file mode 100644 index 00000000..62a6084e --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmAssignmentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmAssignmentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmAssignmentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmAssignmentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmAssignmentRecipientsConfig() { + } + + public AlarmAssignmentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmAssignmentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmAssignmentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmAssignmentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmAssignmentRecipientsConfig alarmAssignmentRecipientsConfig = (AlarmAssignmentRecipientsConfig) o; + return Objects.equals(this.targets, alarmAssignmentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmAssignmentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmAssignmentRecipientsConfig", AlarmAssignmentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmAssignmentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java new file mode 100644 index 00000000..910e38e3 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AlarmCommentRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AlarmCommentRecipientsConfig + */ +@JsonPropertyOrder({ + AlarmCommentRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class AlarmCommentRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public AlarmCommentRecipientsConfig() { + } + + public AlarmCommentRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public AlarmCommentRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public AlarmCommentRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this AlarmCommentRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmCommentRecipientsConfig alarmCommentRecipientsConfig = (AlarmCommentRecipientsConfig) o; + return Objects.equals(this.targets, alarmCommentRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmCommentRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AlarmCommentRecipientsConfig", AlarmCommentRecipientsConfig.class); + JSON.registerDiscriminator(AlarmCommentRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java new file mode 100644 index 00000000..09389b53 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/ApiUsageLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ApiUsageLimitRecipientsConfig + */ +@JsonPropertyOrder({ + ApiUsageLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ApiUsageLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ApiUsageLimitRecipientsConfig() { + } + + public ApiUsageLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ApiUsageLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ApiUsageLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ApiUsageLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiUsageLimitRecipientsConfig apiUsageLimitRecipientsConfig = (ApiUsageLimitRecipientsConfig) o; + return Objects.equals(this.targets, apiUsageLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiUsageLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ApiUsageLimitRecipientsConfig", ApiUsageLimitRecipientsConfig.class); + JSON.registerDiscriminator(ApiUsageLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetExportData.java b/ce/src/main/java/org/thingsboard/client/model/AssetExportData.java new file mode 100644 index 00000000..b2464a0f --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AssetExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetExportData extends EntityExportData { + public AssetExportData() { + } + + @Override + public AssetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetExportData", AssetExportData.class); + JSON.registerDiscriminator(AssetExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java b/ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java new file mode 100644 index 00000000..94e83fb2 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/AssetProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * AssetProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class AssetProfileExportData extends EntityExportData { + public AssetProfileExportData() { + } + + @Override + public AssetProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public AssetProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public AssetProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public AssetProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public AssetProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this AssetProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AssetProfileExportData", AssetProfileExportData.class); + JSON.registerDiscriminator(AssetProfileExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java index d2703af9..989314e3 100644 --- a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java +++ b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultAsset.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultAsset { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultAsset { public BulkImportResultAsset() { } - public BulkImportResultAsset created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultAsset created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultAsset created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultAsset updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultAsset updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultAsset errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultAsset errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultAsset bulkImportResultAsset = (BulkImportResultAsset) o; - return equalsNullable(this.created, bulkImportResultAsset.created) && - equalsNullable(this.updated, bulkImportResultAsset.updated) && - equalsNullable(this.errors, bulkImportResultAsset.errors) && + return Objects.equals(this.created, bulkImportResultAsset.created) && + Objects.equals(this.updated, bulkImportResultAsset.updated) && + Objects.equals(this.errors, bulkImportResultAsset.errors) && Objects.equals(this.errorsList, bulkImportResultAsset.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java index dfd9c000..04a16777 100644 --- a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java +++ b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultDevice.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultDevice { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultDevice { public BulkImportResultDevice() { } - public BulkImportResultDevice created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultDevice created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultDevice created(@javax.annotation.Nullable Object created) * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultDevice updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultDevice updated(@javax.annotation.Nullable Object updated) * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultDevice errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultDevice errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultDevice bulkImportResultDevice = (BulkImportResultDevice) o; - return equalsNullable(this.created, bulkImportResultDevice.created) && - equalsNullable(this.updated, bulkImportResultDevice.updated) && - equalsNullable(this.errors, bulkImportResultDevice.errors) && + return Objects.equals(this.created, bulkImportResultDevice.created) && + Objects.equals(this.updated, bulkImportResultDevice.updated) && + Objects.equals(this.errors, bulkImportResultDevice.errors) && Objects.equals(this.errorsList, bulkImportResultDevice.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java index db2ffa8f..15572565 100644 --- a/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java +++ b/ce/src/main/java/org/thingsboard/client/model/BulkImportResultEdge.java @@ -29,10 +29,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,13 +45,16 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BulkImportResultEdge { public static final String JSON_PROPERTY_CREATED = "created"; - private JsonNullable created = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer created; public static final String JSON_PROPERTY_UPDATED = "updated"; - private JsonNullable updated = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer updated; public static final String JSON_PROPERTY_ERRORS = "errors"; - private JsonNullable errors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer errors; public static final String JSON_PROPERTY_ERRORS_LIST = "errorsList"; @javax.annotation.Nullable @@ -64,8 +63,8 @@ public class BulkImportResultEdge { public BulkImportResultEdge() { } - public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + public BulkImportResultEdge created(@javax.annotation.Nullable Integer created) { + this.created = created; return this; } @@ -74,30 +73,22 @@ public BulkImportResultEdge created(@javax.annotation.Nullable Object created) { * @return created */ @javax.annotation.Nullable - @JsonIgnore - public Object getCreated() { - return created.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getCreated_JsonNullable() { + public Integer getCreated() { return created; } - - @JsonProperty(JSON_PROPERTY_CREATED) - public void setCreated_JsonNullable(JsonNullable created) { - this.created = created; - } - public void setCreated(@javax.annotation.Nullable Object created) { - this.created = JsonNullable.of(created); + + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreated(@javax.annotation.Nullable Integer created) { + this.created = created; } - public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + public BulkImportResultEdge updated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; return this; } @@ -106,30 +97,22 @@ public BulkImportResultEdge updated(@javax.annotation.Nullable Object updated) { * @return updated */ @javax.annotation.Nullable - @JsonIgnore - public Object getUpdated() { - return updated.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getUpdated_JsonNullable() { + public Integer getUpdated() { return updated; } - - @JsonProperty(JSON_PROPERTY_UPDATED) - public void setUpdated_JsonNullable(JsonNullable updated) { - this.updated = updated; - } - public void setUpdated(@javax.annotation.Nullable Object updated) { - this.updated = JsonNullable.of(updated); + + @JsonProperty(value = JSON_PROPERTY_UPDATED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdated(@javax.annotation.Nullable Integer updated) { + this.updated = updated; } - public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + public BulkImportResultEdge errors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; return this; } @@ -138,25 +121,17 @@ public BulkImportResultEdge errors(@javax.annotation.Nullable Object errors) { * @return errors */ @javax.annotation.Nullable - @JsonIgnore - public Object getErrors() { - return errors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getErrors_JsonNullable() { + public Integer getErrors() { return errors; } - - @JsonProperty(JSON_PROPERTY_ERRORS) - public void setErrors_JsonNullable(JsonNullable errors) { - this.errors = errors; - } - public void setErrors(@javax.annotation.Nullable Object errors) { - this.errors = JsonNullable.of(errors); + + @JsonProperty(value = JSON_PROPERTY_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(@javax.annotation.Nullable Integer errors) { + this.errors = errors; } @@ -204,26 +179,15 @@ public boolean equals(Object o) { return false; } BulkImportResultEdge bulkImportResultEdge = (BulkImportResultEdge) o; - return equalsNullable(this.created, bulkImportResultEdge.created) && - equalsNullable(this.updated, bulkImportResultEdge.updated) && - equalsNullable(this.errors, bulkImportResultEdge.errors) && + return Objects.equals(this.created, bulkImportResultEdge.created) && + Objects.equals(this.updated, bulkImportResultEdge.updated) && + Objects.equals(this.errors, bulkImportResultEdge.errors) && Objects.equals(this.errorsList, bulkImportResultEdge.errorsList); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(hashCodeNullable(created), hashCodeNullable(updated), hashCodeNullable(errors), errorsList); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(created, updated, errors, errorsList); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java b/ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java new file mode 100644 index 00000000..af5c6235 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/CustomerExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * CustomerExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class CustomerExportData extends EntityExportData { + public CustomerExportData() { + } + + @Override + public CustomerExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public CustomerExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public CustomerExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public CustomerExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public CustomerExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this CustomerExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CustomerExportData", CustomerExportData.class); + JSON.registerDiscriminator(CustomerExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java b/ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java new file mode 100644 index 00000000..236285a8 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/DashboardExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DashboardExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DashboardExportData extends EntityExportData { + public DashboardExportData() { + } + + @Override + public DashboardExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DashboardExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DashboardExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DashboardExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DashboardExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DashboardExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DashboardExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DashboardExportData", DashboardExportData.class); + JSON.registerDiscriminator(DashboardExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java index e786f73b..7678be98 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityNotificationRuleTriggerConfig.java @@ -172,6 +172,12 @@ public void setNotifyOn(@javax.annotation.Nonnull Set notifyOn) { } + @Override + public DeviceActivityNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this DeviceActivityNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java new file mode 100644 index 00000000..937ead2e --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceActivityRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceActivityRecipientsConfig + */ +@JsonPropertyOrder({ + DeviceActivityRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class DeviceActivityRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public DeviceActivityRecipientsConfig() { + } + + public DeviceActivityRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public DeviceActivityRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public DeviceActivityRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this DeviceActivityRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceActivityRecipientsConfig deviceActivityRecipientsConfig = (DeviceActivityRecipientsConfig) o; + return Objects.equals(this.targets, deviceActivityRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceActivityRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceActivityRecipientsConfig", DeviceActivityRecipientsConfig.class); + JSON.registerDiscriminator(DeviceActivityRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java new file mode 100644 index 00000000..8d7146a3 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/DeviceProfileExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * DeviceProfileExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class DeviceProfileExportData extends EntityExportData { + public DeviceProfileExportData() { + } + + @Override + public DeviceProfileExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public DeviceProfileExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public DeviceProfileExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public DeviceProfileExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public DeviceProfileExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this DeviceProfileExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceProfileExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DeviceProfileExportData", DeviceProfileExportData.class); + JSON.registerDiscriminator(DeviceProfileExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java index ac43f101..77fcc393 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setEdges(@javax.annotation.Nullable Set edges) { } + @Override + public EdgeCommunicationFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeCommunicationFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java similarity index 70% rename from ce/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java rename to ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java index c3c292af..c598e977 100644 --- a/ce/src/main/java/org/thingsboard/client/model/DefaultNotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeCommunicationFailureRecipientsConfig.java @@ -41,11 +41,10 @@ import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * Default notification rule recipients configuration + * EdgeCommunicationFailureRecipientsConfig */ @JsonPropertyOrder({ - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TRIGGER_TYPE, - DefaultNotificationRuleRecipientsConfig.JSON_PROPERTY_TARGETS + EdgeCommunicationFailureRecipientsConfig.JSON_PROPERTY_TARGETS }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -54,48 +53,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) -public class DefaultNotificationRuleRecipientsConfig extends NotificationRuleRecipientsConfig { - public static final String JSON_PROPERTY_TRIGGER_TYPE = "triggerType"; - @javax.annotation.Nonnull - private NotificationRuleTriggerType triggerType = NotificationRuleTriggerType.ENTITY_ACTION; - +public class EdgeCommunicationFailureRecipientsConfig extends NotificationRuleRecipientsConfig { public static final String JSON_PROPERTY_TARGETS = "targets"; @javax.annotation.Nonnull private List targets = new ArrayList<>(); - public DefaultNotificationRuleRecipientsConfig() { - } - - public DefaultNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get triggerType - * @return triggerType - */ - @javax.annotation.Nonnull - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NotificationRuleTriggerType getTriggerType() { - return triggerType; - } - - - @JsonProperty(value = JSON_PROPERTY_TRIGGER_TYPE, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { - this.triggerType = triggerType; + public EdgeCommunicationFailureRecipientsConfig() { } - - public DefaultNotificationRuleRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + public EdgeCommunicationFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { this.targets = targets; return this; } - public DefaultNotificationRuleRecipientsConfig addTargetsItem(UUID targetsItem) { + public EdgeCommunicationFailureRecipientsConfig addTargetsItem(UUID targetsItem) { if (this.targets == null) { this.targets = new ArrayList<>(); } @@ -122,8 +93,14 @@ public void setTargets(@javax.annotation.Nonnull List targets) { } + @Override + public EdgeCommunicationFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** - * Return true if this DefaultNotificationRuleRecipientsConfig object is equal to o. + * Return true if this EdgeCommunicationFailureRecipientsConfig object is equal to o. */ @Override public boolean equals(Object o) { @@ -133,23 +110,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DefaultNotificationRuleRecipientsConfig defaultNotificationRuleRecipientsConfig = (DefaultNotificationRuleRecipientsConfig) o; - return Objects.equals(this.triggerType, defaultNotificationRuleRecipientsConfig.triggerType) && - Objects.equals(this.targets, defaultNotificationRuleRecipientsConfig.targets) && + EdgeCommunicationFailureRecipientsConfig edgeCommunicationFailureRecipientsConfig = (EdgeCommunicationFailureRecipientsConfig) o; + return Objects.equals(this.targets, edgeCommunicationFailureRecipientsConfig.targets) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(triggerType, targets, super.hashCode()); + return Objects.hash(targets, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DefaultNotificationRuleRecipientsConfig {\n"); + sb.append("class EdgeCommunicationFailureRecipientsConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" triggerType: ").append(toIndentedString(triggerType)).append("\n"); sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,8 +194,8 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("DefaultNotificationRuleRecipientsConfig", DefaultNotificationRuleRecipientsConfig.class); - JSON.registerDiscriminator(DefaultNotificationRuleRecipientsConfig.class, "triggerType", mappings); + mappings.put("EdgeCommunicationFailureRecipientsConfig", EdgeCommunicationFailureRecipientsConfig.class); + JSON.registerDiscriminator(EdgeCommunicationFailureRecipientsConfig.class, "triggerType", mappings); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java index bca83fc2..ddb2335e 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionNotificationRuleTriggerConfig.java @@ -134,6 +134,12 @@ public void setNotifyOn(@javax.annotation.Nullable Set no } + @Override + public EdgeConnectionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EdgeConnectionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java new file mode 100644 index 00000000..e8a8443d --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EdgeConnectionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EdgeConnectionRecipientsConfig + */ +@JsonPropertyOrder({ + EdgeConnectionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EdgeConnectionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EdgeConnectionRecipientsConfig() { + } + + public EdgeConnectionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EdgeConnectionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EdgeConnectionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EdgeConnectionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EdgeConnectionRecipientsConfig edgeConnectionRecipientsConfig = (EdgeConnectionRecipientsConfig) o; + return Objects.equals(this.targets, edgeConnectionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EdgeConnectionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EdgeConnectionRecipientsConfig", EdgeConnectionRecipientsConfig.class); + JSON.registerDiscriminator(EdgeConnectionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java index e7fd1178..0c43a420 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitNotificationRuleTriggerConfig.java @@ -125,6 +125,12 @@ public void setThreshold(@javax.annotation.Nullable Float threshold) { } + @Override + public EntitiesLimitNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntitiesLimitNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java new file mode 100644 index 00000000..0008b4fc --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EntitiesLimitRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntitiesLimitRecipientsConfig + */ +@JsonPropertyOrder({ + EntitiesLimitRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntitiesLimitRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntitiesLimitRecipientsConfig() { + } + + public EntitiesLimitRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntitiesLimitRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntitiesLimitRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntitiesLimitRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntitiesLimitRecipientsConfig entitiesLimitRecipientsConfig = (EntitiesLimitRecipientsConfig) o; + return Objects.equals(this.targets, entitiesLimitRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntitiesLimitRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntitiesLimitRecipientsConfig", EntitiesLimitRecipientsConfig.class); + JSON.registerDiscriminator(EntitiesLimitRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java index 033afe05..1b5d49b5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityActionNotificationRuleTriggerConfig.java @@ -182,6 +182,12 @@ public void setDeleted(@javax.annotation.Nullable Boolean deleted) { } + @Override + public EntityActionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EntityActionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java new file mode 100644 index 00000000..80c67578 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EntityActionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityActionRecipientsConfig + */ +@JsonPropertyOrder({ + EntityActionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class EntityActionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public EntityActionRecipientsConfig() { + } + + public EntityActionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public EntityActionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public EntityActionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this EntityActionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityActionRecipientsConfig entityActionRecipientsConfig = (EntityActionRecipientsConfig) o; + return Objects.equals(this.targets, entityActionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityActionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityActionRecipientsConfig", EntityActionRecipientsConfig.class); + JSON.registerDiscriminator(EntityActionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java b/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java index 4217352d..ac37f160 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java +++ b/ce/src/main/java/org/thingsboard/client/model/EntityExportData.java @@ -61,9 +61,20 @@ ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) @JsonSubTypes({ + @JsonSubTypes.Type(value = AiModelExportData.class, name = "AI_MODEL"), + @JsonSubTypes.Type(value = AssetExportData.class, name = "ASSET"), + @JsonSubTypes.Type(value = AssetProfileExportData.class, name = "ASSET_PROFILE"), + @JsonSubTypes.Type(value = CustomerExportData.class, name = "CUSTOMER"), + @JsonSubTypes.Type(value = DashboardExportData.class, name = "DASHBOARD"), @JsonSubTypes.Type(value = DeviceExportData.class, name = "DEVICE"), + @JsonSubTypes.Type(value = DeviceProfileExportData.class, name = "DEVICE_PROFILE"), + @JsonSubTypes.Type(value = EntityViewExportData.class, name = "ENTITY_VIEW"), + @JsonSubTypes.Type(value = NotificationRuleExportData.class, name = "NOTIFICATION_RULE"), + @JsonSubTypes.Type(value = NotificationTargetExportData.class, name = "NOTIFICATION_TARGET"), + @JsonSubTypes.Type(value = NotificationTemplateExportData.class, name = "NOTIFICATION_TEMPLATE"), @JsonSubTypes.Type(value = OtaPackageExportData.class, name = "OTA_PACKAGE"), @JsonSubTypes.Type(value = RuleChainExportData.class, name = "RULE_CHAIN"), + @JsonSubTypes.Type(value = TbResourceExportData.class, name = "TB_RESOURCE"), @JsonSubTypes.Type(value = WidgetsBundleExportData.class, name = "WIDGETS_BUNDLE"), @JsonSubTypes.Type(value = WidgetTypeExportData.class, name = "WIDGET_TYPE"), }) @@ -360,9 +371,20 @@ public String toUrlQueryString(String prefix) { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); + mappings.put("AI_MODEL", AiModelExportData.class); + mappings.put("ASSET", AssetExportData.class); + mappings.put("ASSET_PROFILE", AssetProfileExportData.class); + mappings.put("CUSTOMER", CustomerExportData.class); + mappings.put("DASHBOARD", DashboardExportData.class); mappings.put("DEVICE", DeviceExportData.class); + mappings.put("DEVICE_PROFILE", DeviceProfileExportData.class); + mappings.put("ENTITY_VIEW", EntityViewExportData.class); + mappings.put("NOTIFICATION_RULE", NotificationRuleExportData.class); + mappings.put("NOTIFICATION_TARGET", NotificationTargetExportData.class); + mappings.put("NOTIFICATION_TEMPLATE", NotificationTemplateExportData.class); mappings.put("OTA_PACKAGE", OtaPackageExportData.class); mappings.put("RULE_CHAIN", RuleChainExportData.class); + mappings.put("TB_RESOURCE", TbResourceExportData.class); mappings.put("WIDGETS_BUNDLE", WidgetsBundleExportData.class); mappings.put("WIDGET_TYPE", WidgetTypeExportData.class); mappings.put("EntityExportData", EntityExportData.class); diff --git a/ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java b/ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java new file mode 100644 index 00000000..caf77159 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/EntityViewExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * EntityViewExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class EntityViewExportData extends EntityExportData { + public EntityViewExportData() { + } + + @Override + public EntityViewExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public EntityViewExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public EntityViewExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public EntityViewExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public EntityViewExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this EntityViewExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityViewExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EntityViewExportData", EntityViewExportData.class); + JSON.registerDiscriminator(EntityViewExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java index efdd05d3..6867a75b 100644 --- a/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/EscalatedNotificationRuleRecipientsConfig.java @@ -94,6 +94,12 @@ public void setEscalationTable(@javax.annotation.Nonnull Map> } + @Override + public EscalatedNotificationRuleRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this EscalatedNotificationRuleRecipientsConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java index 40c38765..e5644cd0 100644 --- a/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/FeaturesInfo.java @@ -35,18 +35,14 @@ * FeaturesInfo */ @JsonPropertyOrder({ - FeaturesInfo.JSON_PROPERTY_NOTIFICATION_ENABLED, FeaturesInfo.JSON_PROPERTY_TWO_FA_ENABLED, FeaturesInfo.JSON_PROPERTY_EMAIL_ENABLED, FeaturesInfo.JSON_PROPERTY_SMS_ENABLED, - FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED + FeaturesInfo.JSON_PROPERTY_OAUTH_ENABLED, + FeaturesInfo.JSON_PROPERTY_NOTIFICATION_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_NOTIFICATION_ENABLED = "notificationEnabled"; - @javax.annotation.Nullable - private Boolean notificationEnabled; - public static final String JSON_PROPERTY_TWO_FA_ENABLED = "twoFaEnabled"; @javax.annotation.Nullable private Boolean twoFaEnabled; @@ -63,33 +59,13 @@ public class FeaturesInfo { @javax.annotation.Nullable private Boolean oauthEnabled; - public FeaturesInfo() { - } - - public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { - this.notificationEnabled = notificationEnabled; - return this; - } - - /** - * Get notificationEnabled - * @return notificationEnabled - */ + public static final String JSON_PROPERTY_NOTIFICATION_ENABLED = "notificationEnabled"; @javax.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getNotificationEnabled() { - return notificationEnabled; - } - + private Boolean notificationEnabled; - @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { - this.notificationEnabled = notificationEnabled; + public FeaturesInfo() { } - public FeaturesInfo twoFaEnabled(@javax.annotation.Nullable Boolean twoFaEnabled) { this.twoFaEnabled = twoFaEnabled; return this; @@ -186,6 +162,30 @@ public void setOauthEnabled(@javax.annotation.Nullable Boolean oauthEnabled) { } + public FeaturesInfo notificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { + this.notificationEnabled = notificationEnabled; + return this; + } + + /** + * Get notificationEnabled + * @return notificationEnabled + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotificationEnabled() { + return notificationEnabled; + } + + + @JsonProperty(value = JSON_PROPERTY_NOTIFICATION_ENABLED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationEnabled(@javax.annotation.Nullable Boolean notificationEnabled) { + this.notificationEnabled = notificationEnabled; + } + + /** * Return true if this FeaturesInfo object is equal to o. */ @@ -198,27 +198,27 @@ public boolean equals(Object o) { return false; } FeaturesInfo featuresInfo = (FeaturesInfo) o; - return Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled) && - Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && + return Objects.equals(this.twoFaEnabled, featuresInfo.twoFaEnabled) && Objects.equals(this.emailEnabled, featuresInfo.emailEnabled) && Objects.equals(this.smsEnabled, featuresInfo.smsEnabled) && - Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled); + Objects.equals(this.oauthEnabled, featuresInfo.oauthEnabled) && + Objects.equals(this.notificationEnabled, featuresInfo.notificationEnabled); } @Override public int hashCode() { - return Objects.hash(notificationEnabled, twoFaEnabled, emailEnabled, smsEnabled, oauthEnabled); + return Objects.hash(twoFaEnabled, emailEnabled, smsEnabled, oauthEnabled, notificationEnabled); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FeaturesInfo {\n"); - sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append(" twoFaEnabled: ").append(toIndentedString(twoFaEnabled)).append("\n"); sb.append(" emailEnabled: ").append(toIndentedString(emailEnabled)).append("\n"); sb.append(" smsEnabled: ").append(toIndentedString(smsEnabled)).append("\n"); sb.append(" oauthEnabled: ").append(toIndentedString(oauthEnabled)).append("\n"); + sb.append(" notificationEnabled: ").append(toIndentedString(notificationEnabled)).append("\n"); sb.append("}"); return sb.toString(); } @@ -266,11 +266,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // 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())))); - } - // add `twoFaEnabled` to the URL query string if (getTwoFaEnabled() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stwoFaEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTwoFaEnabled())))); @@ -291,6 +286,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%soauthEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getOauthEnabled())))); } + // add `notificationEnabled` to the URL query string + if (getNotificationEnabled() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%snotificationEnabled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getNotificationEnabled())))); + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java index 910f35c6..ebb08c63 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class NewPlatformVersionNotificationRuleTriggerConfig extends Notificatio public NewPlatformVersionNotificationRuleTriggerConfig() { } + @Override + public NewPlatformVersionNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this NewPlatformVersionNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java new file mode 100644 index 00000000..97cc594a --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NewPlatformVersionRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NewPlatformVersionRecipientsConfig + */ +@JsonPropertyOrder({ + NewPlatformVersionRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class NewPlatformVersionRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public NewPlatformVersionRecipientsConfig() { + } + + public NewPlatformVersionRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public NewPlatformVersionRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public NewPlatformVersionRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this NewPlatformVersionRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewPlatformVersionRecipientsConfig newPlatformVersionRecipientsConfig = (NewPlatformVersionRecipientsConfig) o; + return Objects.equals(this.targets, newPlatformVersionRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewPlatformVersionRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NewPlatformVersionRecipientsConfig", NewPlatformVersionRecipientsConfig.class); + JSON.registerDiscriminator(NewPlatformVersionRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java index 626f631e..554869c1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRequestStats.java @@ -29,10 +29,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -50,14 +46,15 @@ public class NotificationRequestStats { public static final String JSON_PROPERTY_SENT = "sent"; @javax.annotation.Nullable - private Map sent = new HashMap<>(); + private Map sent = new HashMap<>(); public static final String JSON_PROPERTY_ERRORS = "errors"; @javax.annotation.Nullable private Map> errors = new HashMap<>(); public static final String JSON_PROPERTY_TOTAL_ERRORS = "totalErrors"; - private JsonNullable totalErrors = JsonNullable.of(null); + @javax.annotation.Nullable + private Integer totalErrors; public static final String JSON_PROPERTY_ERROR = "error"; @javax.annotation.Nullable @@ -66,12 +63,12 @@ public class NotificationRequestStats { public NotificationRequestStats() { } - public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { + public NotificationRequestStats sent(@javax.annotation.Nullable Map sent) { this.sent = sent; return this; } - public NotificationRequestStats putSentItem(String key, Object sentItem) { + public NotificationRequestStats putSentItem(String key, Integer sentItem) { if (this.sent == null) { this.sent = new HashMap<>(); } @@ -85,15 +82,15 @@ public NotificationRequestStats putSentItem(String key, Object sentItem) { */ @javax.annotation.Nullable @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getSent() { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getSent() { return sent; } @JsonProperty(value = JSON_PROPERTY_SENT, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setSent(@javax.annotation.Nullable Map sent) { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSent(@javax.annotation.Nullable Map sent) { this.sent = sent; } @@ -130,35 +127,27 @@ public void setErrors(@javax.annotation.Nullable Map } - public NotificationRequestStats totalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + public NotificationRequestStats totalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; return this; } /** - * Get totalErrors + * Total number of errors across all delivery methods * @return totalErrors */ @javax.annotation.Nullable - @JsonIgnore - public Object getTotalErrors() { - return totalErrors.orElse(null); - } - @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getTotalErrors_JsonNullable() { + public Integer getTotalErrors() { return totalErrors; } - - @JsonProperty(JSON_PROPERTY_TOTAL_ERRORS) - public void setTotalErrors_JsonNullable(JsonNullable totalErrors) { - this.totalErrors = totalErrors; - } - public void setTotalErrors(@javax.annotation.Nullable Object totalErrors) { - this.totalErrors = JsonNullable.of(totalErrors); + + @JsonProperty(value = JSON_PROPERTY_TOTAL_ERRORS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalErrors(@javax.annotation.Nullable Integer totalErrors) { + this.totalErrors = totalErrors; } @@ -200,24 +189,13 @@ public boolean equals(Object o) { NotificationRequestStats notificationRequestStats = (NotificationRequestStats) o; return Objects.equals(this.sent, notificationRequestStats.sent) && Objects.equals(this.errors, notificationRequestStats.errors) && - equalsNullable(this.totalErrors, notificationRequestStats.totalErrors) && + Objects.equals(this.totalErrors, notificationRequestStats.totalErrors) && Objects.equals(this.error, notificationRequestStats.error); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { - return Objects.hash(sent, errors, hashCodeNullable(totalErrors), error); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(sent, errors, totalErrors, error); } @Override diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java new file mode 100644 index 00000000..15ccb3a8 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationRuleExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationRuleExportData extends EntityExportData { + public NotificationRuleExportData() { + } + + @Override + public NotificationRuleExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationRuleExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationRuleExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationRuleExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationRuleExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationRuleExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRuleExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationRuleExportData", NotificationRuleExportData.class); + JSON.registerDiscriminator(NotificationRuleExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java index 0caf12f1..39e2665d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationRuleRecipientsConfig.java @@ -50,19 +50,19 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = EscalatedNotificationRuleRecipientsConfig.class, name = "ALARM"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ALARM_COMMENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "API_USAGE_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "DEVICE_ACTIVITY"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "EDGE_CONNECTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITIES_LIMIT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "ENTITY_ACTION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RATE_LIMITS"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), - @JsonSubTypes.Type(value = DefaultNotificationRuleRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), + @JsonSubTypes.Type(value = AlarmAssignmentRecipientsConfig.class, name = "ALARM_ASSIGNMENT"), + @JsonSubTypes.Type(value = AlarmCommentRecipientsConfig.class, name = "ALARM_COMMENT"), + @JsonSubTypes.Type(value = ApiUsageLimitRecipientsConfig.class, name = "API_USAGE_LIMIT"), + @JsonSubTypes.Type(value = DeviceActivityRecipientsConfig.class, name = "DEVICE_ACTIVITY"), + @JsonSubTypes.Type(value = EdgeCommunicationFailureRecipientsConfig.class, name = "EDGE_COMMUNICATION_FAILURE"), + @JsonSubTypes.Type(value = EdgeConnectionRecipientsConfig.class, name = "EDGE_CONNECTION"), + @JsonSubTypes.Type(value = EntitiesLimitRecipientsConfig.class, name = "ENTITIES_LIMIT"), + @JsonSubTypes.Type(value = EntityActionRecipientsConfig.class, name = "ENTITY_ACTION"), + @JsonSubTypes.Type(value = NewPlatformVersionRecipientsConfig.class, name = "NEW_PLATFORM_VERSION"), + @JsonSubTypes.Type(value = RateLimitsRecipientsConfig.class, name = "RATE_LIMITS"), + @JsonSubTypes.Type(value = ResourceShortageRecipientsConfig.class, name = "RESOURCES_SHORTAGE"), + @JsonSubTypes.Type(value = RuleEngineComponentLifecycleEventRecipientsConfig.class, name = "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"), + @JsonSubTypes.Type(value = TaskProcessingFailureRecipientsConfig.class, name = "TASK_PROCESSING_FAILURE"), }) public class NotificationRuleRecipientsConfig { @@ -180,19 +180,19 @@ public String toUrlQueryString(String prefix) { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); mappings.put("ALARM", EscalatedNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_ASSIGNMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ALARM_COMMENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("API_USAGE_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("DEVICE_ACTIVITY", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_COMMUNICATION_FAILURE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("EDGE_CONNECTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITIES_LIMIT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("ENTITY_ACTION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("NEW_PLATFORM_VERSION", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RATE_LIMITS", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RESOURCES_SHORTAGE", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", DefaultNotificationRuleRecipientsConfig.class); - mappings.put("TASK_PROCESSING_FAILURE", DefaultNotificationRuleRecipientsConfig.class); + mappings.put("ALARM_ASSIGNMENT", AlarmAssignmentRecipientsConfig.class); + mappings.put("ALARM_COMMENT", AlarmCommentRecipientsConfig.class); + mappings.put("API_USAGE_LIMIT", ApiUsageLimitRecipientsConfig.class); + mappings.put("DEVICE_ACTIVITY", DeviceActivityRecipientsConfig.class); + mappings.put("EDGE_COMMUNICATION_FAILURE", EdgeCommunicationFailureRecipientsConfig.class); + mappings.put("EDGE_CONNECTION", EdgeConnectionRecipientsConfig.class); + mappings.put("ENTITIES_LIMIT", EntitiesLimitRecipientsConfig.class); + mappings.put("ENTITY_ACTION", EntityActionRecipientsConfig.class); + mappings.put("NEW_PLATFORM_VERSION", NewPlatformVersionRecipientsConfig.class); + mappings.put("RATE_LIMITS", RateLimitsRecipientsConfig.class); + mappings.put("RESOURCES_SHORTAGE", ResourceShortageRecipientsConfig.class); + mappings.put("RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", RuleEngineComponentLifecycleEventRecipientsConfig.class); + mappings.put("TASK_PROCESSING_FAILURE", TaskProcessingFailureRecipientsConfig.class); mappings.put("NotificationRuleRecipientsConfig", NotificationRuleRecipientsConfig.class); JSON.registerDiscriminator(NotificationRuleRecipientsConfig.class, "triggerType", mappings); } diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java new file mode 100644 index 00000000..083f4934 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTargetExportData.java @@ -0,0 +1,344 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * NotificationTargetExportData + */ +@JsonPropertyOrder({ + NotificationTargetExportData.JSON_PROPERTY_ENTITY_TYPE, + NotificationTargetExportData.JSON_PROPERTY_ENTITY, + NotificationTargetExportData.JSON_PROPERTY_RELATIONS, + NotificationTargetExportData.JSON_PROPERTY_ATTRIBUTES, + NotificationTargetExportData.JSON_PROPERTY_CALCULATED_FIELDS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class NotificationTargetExportData { + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + @javax.annotation.Nonnull + private EntityType entityType; + + public static final String JSON_PROPERTY_ENTITY = "entity"; + @javax.annotation.Nullable + private ExportableEntity entity; + + public static final String JSON_PROPERTY_RELATIONS = "relations"; + @javax.annotation.Nullable + private List relations = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @javax.annotation.Nullable + private Map> attributes = new HashMap<>(); + + public static final String JSON_PROPERTY_CALCULATED_FIELDS = "calculatedFields"; + @javax.annotation.Nullable + private List calculatedFields = new ArrayList<>(); + + public NotificationTargetExportData() { + } + + public NotificationTargetExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * @return entityType + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityType getEntityType() { + return entityType; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(@javax.annotation.Nonnull EntityType entityType) { + this.entityType = entityType; + } + + + public NotificationTargetExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.entity = entity; + return this; + } + + /** + * Get entity + * @return entity + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExportableEntity getEntity() { + return entity; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntity(@javax.annotation.Nullable ExportableEntity entity) { + this.entity = entity; + } + + + public NotificationTargetExportData relations(@javax.annotation.Nullable List relations) { + this.relations = relations; + return this; + } + + public NotificationTargetExportData addRelationsItem(EntityRelation relationsItem) { + if (this.relations == null) { + this.relations = new ArrayList<>(); + } + this.relations.add(relationsItem); + return this; + } + + /** + * Get relations + * @return relations + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_RELATIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRelations() { + return relations; + } + + + @JsonProperty(value = JSON_PROPERTY_RELATIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelations(@javax.annotation.Nullable List relations) { + this.relations = relations; + } + + + public NotificationTargetExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.attributes = attributes; + return this; + } + + public NotificationTargetExportData putAttributesItem(String key, List attributesItem) { + if (this.attributes == null) { + this.attributes = new HashMap<>(); + } + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Map of attributes where key is the scope of attributes and value is the list of attributes for that scope + * @return attributes + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getAttributes() { + return attributes; + } + + + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(@javax.annotation.Nullable Map> attributes) { + this.attributes = attributes; + } + + + public NotificationTargetExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.calculatedFields = calculatedFields; + return this; + } + + public NotificationTargetExportData addCalculatedFieldsItem(CalculatedField calculatedFieldsItem) { + if (this.calculatedFields == null) { + this.calculatedFields = new ArrayList<>(); + } + this.calculatedFields.add(calculatedFieldsItem); + return this; + } + + /** + * Get calculatedFields + * @return calculatedFields + */ + @javax.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CALCULATED_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCalculatedFields() { + return calculatedFields; + } + + + @JsonProperty(value = JSON_PROPERTY_CALCULATED_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCalculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.calculatedFields = calculatedFields; + } + + + /** + * Return true if this NotificationTargetExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationTargetExportData notificationTargetExportData = (NotificationTargetExportData) o; + return Objects.equals(this.entityType, notificationTargetExportData.entityType) && + Objects.equals(this.entity, notificationTargetExportData.entity) && + Objects.equals(this.relations, notificationTargetExportData.relations) && + Objects.equals(this.attributes, notificationTargetExportData.attributes) && + Objects.equals(this.calculatedFields, notificationTargetExportData.calculatedFields); + } + + @Override + public int hashCode() { + return Objects.hash(entityType, entity, relations, attributes, calculatedFields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTargetExportData {\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); + sb.append(" relations: ").append(toIndentedString(relations)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" calculatedFields: ").append(toIndentedString(calculatedFields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java new file mode 100644 index 00000000..be691034 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/NotificationTemplateExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * NotificationTemplateExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class NotificationTemplateExportData extends EntityExportData { + public NotificationTemplateExportData() { + } + + @Override + public NotificationTemplateExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public NotificationTemplateExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public NotificationTemplateExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public NotificationTemplateExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public NotificationTemplateExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this NotificationTemplateExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationTemplateExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("NotificationTemplateExportData", NotificationTemplateExportData.class); + JSON.registerDiscriminator(NotificationTemplateExportData.class, "entityType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java index a5469145..e52858c5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/RateLimitsNotificationRuleTriggerConfig.java @@ -95,6 +95,12 @@ public void setApis(@javax.annotation.Nullable Set apis) { } + @Override + public RateLimitsNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RateLimitsNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java new file mode 100644 index 00000000..ddd4e212 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/RateLimitsRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RateLimitsRecipientsConfig + */ +@JsonPropertyOrder({ + RateLimitsRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RateLimitsRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RateLimitsRecipientsConfig() { + } + + public RateLimitsRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RateLimitsRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RateLimitsRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RateLimitsRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RateLimitsRecipientsConfig rateLimitsRecipientsConfig = (RateLimitsRecipientsConfig) o; + return Objects.equals(this.targets, rateLimitsRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RateLimitsRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RateLimitsRecipientsConfig", RateLimitsRecipientsConfig.class); + JSON.registerDiscriminator(RateLimitsRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java new file mode 100644 index 00000000..fec24a83 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/ResourceShortageRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * ResourceShortageRecipientsConfig + */ +@JsonPropertyOrder({ + ResourceShortageRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class ResourceShortageRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public ResourceShortageRecipientsConfig() { + } + + public ResourceShortageRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public ResourceShortageRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public ResourceShortageRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this ResourceShortageRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceShortageRecipientsConfig resourceShortageRecipientsConfig = (ResourceShortageRecipientsConfig) o; + return Objects.equals(this.targets, resourceShortageRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceShortageRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("ResourceShortageRecipientsConfig", ResourceShortageRecipientsConfig.class); + JSON.registerDiscriminator(ResourceShortageRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java index 0519c2bf..95d50463 100644 --- a/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/ResourcesShortageNotificationRuleTriggerConfig.java @@ -143,6 +143,12 @@ public void setStorageThreshold(@javax.annotation.Nullable Float storageThreshol } + @Override + public ResourcesShortageNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this ResourcesShortageNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java index 3c22091f..c42a67e4 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig.java @@ -259,6 +259,12 @@ public void setOnlyRuleNodeLifecycleFailures(@javax.annotation.Nullable Boolean } + @Override + public RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java new file mode 100644 index 00000000..ba2ded17 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/RuleEngineComponentLifecycleEventRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * RuleEngineComponentLifecycleEventRecipientsConfig + */ +@JsonPropertyOrder({ + RuleEngineComponentLifecycleEventRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class RuleEngineComponentLifecycleEventRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public RuleEngineComponentLifecycleEventRecipientsConfig() { + } + + public RuleEngineComponentLifecycleEventRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public RuleEngineComponentLifecycleEventRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public RuleEngineComponentLifecycleEventRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this RuleEngineComponentLifecycleEventRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuleEngineComponentLifecycleEventRecipientsConfig ruleEngineComponentLifecycleEventRecipientsConfig = (RuleEngineComponentLifecycleEventRecipientsConfig) o; + return Objects.equals(this.targets, ruleEngineComponentLifecycleEventRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuleEngineComponentLifecycleEventRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("RuleEngineComponentLifecycleEventRecipientsConfig", RuleEngineComponentLifecycleEventRecipientsConfig.class); + JSON.registerDiscriminator(RuleEngineComponentLifecycleEventRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java index 464e1cb0..ca2153f1 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java +++ b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureNotificationRuleTriggerConfig.java @@ -53,6 +53,12 @@ public class TaskProcessingFailureNotificationRuleTriggerConfig extends Notifica public TaskProcessingFailureNotificationRuleTriggerConfig() { } + @Override + public TaskProcessingFailureNotificationRuleTriggerConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + /** * Return true if this TaskProcessingFailureNotificationRuleTriggerConfig object is equal to o. */ diff --git a/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java new file mode 100644 index 00000000..b6f7856b --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/TaskProcessingFailureRecipientsConfig.java @@ -0,0 +1,201 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.thingsboard.client.model.NotificationRuleRecipientsConfig; +import org.thingsboard.client.model.NotificationRuleTriggerType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TaskProcessingFailureRecipientsConfig + */ +@JsonPropertyOrder({ + TaskProcessingFailureRecipientsConfig.JSON_PROPERTY_TARGETS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "triggerType", // ignore manually set triggerType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the triggerType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType", visible = true) + +public class TaskProcessingFailureRecipientsConfig extends NotificationRuleRecipientsConfig { + public static final String JSON_PROPERTY_TARGETS = "targets"; + @javax.annotation.Nonnull + private List targets = new ArrayList<>(); + + public TaskProcessingFailureRecipientsConfig() { + } + + public TaskProcessingFailureRecipientsConfig targets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + return this; + } + + public TaskProcessingFailureRecipientsConfig addTargetsItem(UUID targetsItem) { + if (this.targets == null) { + this.targets = new ArrayList<>(); + } + this.targets.add(targetsItem); + return this; + } + + /** + * Get targets + * @return targets + */ + @javax.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTargets() { + return targets; + } + + + @JsonProperty(value = JSON_PROPERTY_TARGETS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTargets(@javax.annotation.Nonnull List targets) { + this.targets = targets; + } + + + @Override + public TaskProcessingFailureRecipientsConfig triggerType(@javax.annotation.Nonnull NotificationRuleTriggerType triggerType) { + this.setTriggerType(triggerType); + return this; + } + + /** + * Return true if this TaskProcessingFailureRecipientsConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaskProcessingFailureRecipientsConfig taskProcessingFailureRecipientsConfig = (TaskProcessingFailureRecipientsConfig) o; + return Objects.equals(this.targets, taskProcessingFailureRecipientsConfig.targets) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(targets, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaskProcessingFailureRecipientsConfig {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `triggerType` to the URL query string + if (getTriggerType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%striggerType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTriggerType())))); + } + + // add `targets` to the URL query string + if (getTargets() != null) { + for (int i = 0; i < getTargets().size(); i++) { + if (getTargets().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stargets%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getTargets().get(i))))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TaskProcessingFailureRecipientsConfig", TaskProcessingFailureRecipientsConfig.class); + JSON.registerDiscriminator(TaskProcessingFailureRecipientsConfig.class, "triggerType", mappings); +} +} + diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java new file mode 100644 index 00000000..90e90f36 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceExportData.java @@ -0,0 +1,213 @@ +/** + * Copyright © 2026-2026 ThingsBoard, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.thingsboard.client.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.AttributeExportData; +import org.thingsboard.client.model.CalculatedField; +import org.thingsboard.client.model.EntityExportData; +import org.thingsboard.client.model.EntityRelation; +import org.thingsboard.client.model.EntityType; +import org.thingsboard.client.model.ExportableEntity; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.JSON; +import org.thingsboard.client.ApiClient; +/** + * TbResourceExportData + */ +@JsonPropertyOrder({ +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +@JsonIgnoreProperties( + value = "entityType", // ignore manually set entityType, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the entityType to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "entityType", visible = true) + +public class TbResourceExportData extends EntityExportData { + public TbResourceExportData() { + } + + @Override + public TbResourceExportData entityType(@javax.annotation.Nonnull EntityType entityType) { + this.setEntityType(entityType); + return this; + } + + @Override + public TbResourceExportData entity(@javax.annotation.Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public TbResourceExportData relations(@javax.annotation.Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public TbResourceExportData attributes(@javax.annotation.Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public TbResourceExportData calculatedFields(@javax.annotation.Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this TbResourceExportData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TbResourceExportData {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `entity` to the URL query string + if (getEntity() != null) { + joiner.add(getEntity().toUrlQueryString(prefix + "entity" + suffix)); + } + + // add `relations` to the URL query string + if (getRelations() != null) { + for (int i = 0; i < getRelations().size(); i++) { + if (getRelations().get(i) != null) { + joiner.add(getRelations().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%srelations%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (String _key : getAttributes().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sattributes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getAttributes().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getAttributes().get(_key))))); + } + } + + // add `calculatedFields` to the URL query string + if (getCalculatedFields() != null) { + for (int i = 0; i < getCalculatedFields().size(); i++) { + if (getCalculatedFields().get(i) != null) { + joiner.add(getCalculatedFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scalculatedFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("TbResourceExportData", TbResourceExportData.class); + JSON.registerDiscriminator(TbResourceExportData.class, "entityType", mappings); +} +} + From 48e7f26eaf8c64a43306d6754408197a1854e81f Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 3 Mar 2026 16:58:11 +0200 Subject: [PATCH 2/2] Regenerate client --- ce/docs/TbResource.md | 2 +- ce/docs/TbResourceInfo.md | 2 +- .../thingsboard/client/model/TbResource.java | 56 +++++++++---------- .../client/model/TbResourceInfo.java | 56 +++++++++---------- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/ce/docs/TbResource.md b/ce/docs/TbResource.md index 9d107784..e0042cae 100644 --- a/ce/docs/TbResource.md +++ b/ce/docs/TbResource.md @@ -24,8 +24,8 @@ A JSON value representing the Resource. | **preview** | **String** | | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | diff --git a/ce/docs/TbResourceInfo.md b/ce/docs/TbResourceInfo.md index 4a87a800..fe6ef5bc 100644 --- a/ce/docs/TbResourceInfo.md +++ b/ce/docs/TbResourceInfo.md @@ -22,8 +22,8 @@ A JSON value representing the Resource Info. | **descriptor** | **com.fasterxml.jackson.databind.JsonNode** | Resource descriptor. | [optional] | | **name** | **String** | | [optional] [readonly] | | **_public** | **Boolean** | | [optional] | -| **publicLink** | **String** | | [optional] [readonly] | | **link** | **String** | | [optional] [readonly] | +| **publicLink** | **String** | | [optional] [readonly] | diff --git a/ce/src/main/java/org/thingsboard/client/model/TbResource.java b/ce/src/main/java/org/thingsboard/client/model/TbResource.java index 55c80c42..c7038ad5 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResource.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResource.java @@ -54,8 +54,8 @@ TbResource.JSON_PROPERTY_PREVIEW, TbResource.JSON_PROPERTY_NAME, TbResource.JSON_PROPERTY_PUBLIC, - TbResource.JSON_PROPERTY_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 { @@ -119,14 +119,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() { } @@ -136,16 +136,16 @@ public TbResource( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_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; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResource id(@javax.annotation.Nullable TbResourceId id) { @@ -469,28 +469,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; } @@ -523,13 +523,13 @@ public boolean equals(Object o) { Objects.equals(this.preview, tbResource.preview) && Objects.equals(this.name, tbResource.name) && Objects.equals(this._public, tbResource._public) && - Objects.equals(this.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, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, data, preview, name, _public, link, publicLink); } @Override @@ -551,8 +551,8 @@ public String toString() { sb.append(" preview: ").append(toIndentedString(preview)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" 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(); } @@ -675,16 +675,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `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/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java index cd300caa..2e666e3d 100644 --- a/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java +++ b/ce/src/main/java/org/thingsboard/client/model/TbResourceInfo.java @@ -52,8 +52,8 @@ TbResourceInfo.JSON_PROPERTY_DESCRIPTOR, TbResourceInfo.JSON_PROPERTY_NAME, TbResourceInfo.JSON_PROPERTY_PUBLIC, - TbResourceInfo.JSON_PROPERTY_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 { @@ -109,14 +109,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() { } @@ -126,16 +126,16 @@ public TbResourceInfo( @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_ETAG) String etag, @JsonProperty(JSON_PROPERTY_NAME) String name, - @JsonProperty(JSON_PROPERTY_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; this.tenantId = tenantId; this.etag = etag; this.name = name; - this.publicLink = publicLink; this.link = link; + this.publicLink = publicLink; } public TbResourceInfo id(@javax.annotation.Nullable TbResourceId id) { @@ -411,28 +411,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; } @@ -463,13 +463,13 @@ public boolean equals(Object o) { Objects.equals(this.descriptor, tbResourceInfo.descriptor) && Objects.equals(this.name, tbResourceInfo.name) && Objects.equals(this._public, tbResourceInfo._public) && - Objects.equals(this.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, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, publicLink, link); + return Objects.hash(id, createdTime, tenantId, title, resourceType, resourceSubType, resourceKey, publicResourceKey, etag, fileName, descriptor, name, _public, link, publicLink); } @Override @@ -489,8 +489,8 @@ public String toString() { sb.append(" descriptor: ").append(toIndentedString(descriptor)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" 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(); } @@ -603,16 +603,16 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPublic())))); } - // add `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(); } }