From 03cd36ce94c798f0b2659bd1ef549be5a647c988 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Mon, 27 Jul 2026 10:27:33 +0100 Subject: [PATCH] Update PAAS OpenAPI spec in master (from develop/4.4) --- paas/docs/AiChatControllerApi.md | 7 +- paas/docs/AiDeviceDashboardControllerApi.md | 32 + paas/docs/Alarm.md | 2 +- paas/docs/AlarmControllerApi.md | 2 +- paas/docs/AlarmData.md | 2 +- paas/docs/AlarmInfo.md | 2 +- paas/docs/Asset.md | 2 +- paas/docs/AssetControllerApi.md | 4 +- paas/docs/AssetInfo.md | 2 +- paas/docs/AvailableEntityKeys.md | 4 +- paas/docs/AvailableEntityKeysV2.md | 2 +- paas/docs/CsvReportTemplateConfig.md | 15 +- paas/docs/CustomerControllerApi.md | 4 +- paas/docs/Dashboard.md | 2 +- paas/docs/DashboardControllerApi.md | 4 +- paas/docs/DashboardInfo.md | 2 +- paas/docs/Device.md | 2 +- paas/docs/DeviceControllerApi.md | 4 +- paas/docs/DeviceInfo.md | 2 +- paas/docs/Edge.md | 4 +- paas/docs/EdgeControllerApi.md | 4 +- paas/docs/EdgeInfo.md | 4 +- paas/docs/EntityDataDiff.md | 12 +- paas/docs/EntityExportData.md | 12 +- paas/docs/EntityExportSettings.md | 1 + paas/docs/EntityGroup.md | 2 +- paas/docs/EntityGroupControllerApi.md | 8 +- paas/docs/EntityGroupExportData.md | 7 +- paas/docs/EntityGroupInfo.md | 4 +- paas/docs/EntityView.md | 2 +- paas/docs/EntityViewControllerApi.md | 4 +- paas/docs/EntityViewInfo.md | 2 +- paas/docs/GroupPermissionInfo.md | 6 +- paas/docs/HeaderFooter.md | 15 +- paas/docs/HomeDashboard.md | 2 +- paas/docs/IntegrationControllerApi.md | 25 + paas/docs/Job.md | 2 + paas/docs/JobControllerApi.md | 13 +- paas/docs/LoginWhiteLabelingParams.md | 1 + paas/docs/PageDataAlarmData.md | 2 +- paas/docs/PageDataAlarmInfo.md | 2 +- paas/docs/PageDataAsset.md | 2 +- paas/docs/PageDataAssetInfo.md | 2 +- paas/docs/PageDataDashboardInfo.md | 2 +- paas/docs/PageDataDevice.md | 2 +- paas/docs/PageDataDeviceInfo.md | 2 +- paas/docs/PageDataEdge.md | 4 +- paas/docs/PageDataEdgeInfo.md | 4 +- paas/docs/PageDataEntityGroupInfo.md | 4 +- paas/docs/PageDataEntityView.md | 2 +- paas/docs/PageDataEntityViewInfo.md | 2 +- paas/docs/PageDataJob.md | 2 + paas/docs/PageDataReportTemplateInfo.md | 2 +- paas/docs/PageDataRole.md | 6 +- paas/docs/PageDataScheduledReportInfo.md | 2 +- paas/docs/PageDataSchedulerEventInfo.md | 2 +- .../PageDataSchedulerEventWithCustomerInfo.md | 2 +- paas/docs/PdfReportTemplateConfig.md | 15 +- paas/docs/ReportBarChartWithLabelsSettings.md | 15 +- paas/docs/ReportComponent.md | 15 +- paas/docs/ReportControllerApi.md | 11 +- paas/docs/ReportRangeChartSettings.md | 15 +- paas/docs/ReportRequest.md | 15 +- paas/docs/ReportTemplate.md | 17 +- paas/docs/ReportTemplateConfig.md | 15 +- paas/docs/ReportTemplateControllerApi.md | 8 +- paas/docs/ReportTemplateInfo.md | 2 +- paas/docs/ReportTimeSeriesChartSettings.md | 15 +- paas/docs/Role.md | 6 +- paas/docs/SaveDeviceWithCredentialsRequest.md | 2 +- paas/docs/ScheduledReportInfo.md | 2 +- paas/docs/SchedulerEvent.md | 2 +- paas/docs/SchedulerEventControllerApi.md | 4 +- paas/docs/SchedulerEventInfo.md | 2 +- paas/docs/SchedulerEventWithCustomerInfo.md | 2 +- paas/docs/SimpleValueSourceConfig.md | 33 + paas/docs/SolutionControllerApi.md | 125 - paas/docs/SolutionData.md | 12 +- .../docs/SolutionExportImportControllerApi.md | 6 +- paas/docs/SolutionExportRequest.md | 4 +- paas/docs/SolutionExportResponse.md | 12 +- paas/docs/SolutionImportResult.md | 2 +- paas/docs/SolutionInstallResponse.md | 34 - paas/docs/SolutionTemplateLevel.md | 25 - paas/docs/SubscriptionExceptionErrorCode.md | 2 - paas/docs/TbChatRequest.md | 2 +- paas/docs/TbUserMessage.md | 2 +- paas/docs/TenantSolutionTemplateDetails.md | 36 - paas/docs/TenantSolutionTemplateInfo.md | 37 - .../TenantSolutionTemplateInstructions.md | 33 - .../ThingsboardCredentialsExpiredResponse.md | 2 +- paas/docs/ThingsboardErrorResponse.md | 2 +- paas/docs/TimeSeriesChartYAxisSettings.md | 18 +- paas/docs/TimeseriesChartComponent.md | 15 +- paas/docs/UserControllerApi.md | 4 +- paas/docs/UserExportData.md | 539 ++ paas/docs/WhiteLabelingParams.md | 1 + paas/docs/WidgetsBundleExportData.md | 2 +- paas/spec/openapi.json | 8009 ++++++++--------- .../org/thingsboard/client/ApiClient.java | 4 +- .../org/thingsboard/client/Configuration.java | 2 +- .../client/api/ThingsboardApi.java | 745 +- .../org/thingsboard/client/model/Alarm.java | 2 +- .../thingsboard/client/model/AlarmData.java | 2 +- .../thingsboard/client/model/AlarmInfo.java | 2 +- .../org/thingsboard/client/model/Asset.java | 14 +- .../thingsboard/client/model/AssetInfo.java | 14 +- .../client/model/AvailableEntityKeys.java | 4 +- .../client/model/AvailableEntityKeysV2.java | 2 +- .../thingsboard/client/model/Dashboard.java | 4 +- .../client/model/DashboardInfo.java | 4 +- .../org/thingsboard/client/model/Device.java | 14 +- .../thingsboard/client/model/DeviceInfo.java | 14 +- .../org/thingsboard/client/model/Edge.java | 16 +- .../thingsboard/client/model/EdgeInfo.java | 16 +- .../client/model/EntityExportData.java | 2 + .../client/model/EntityExportSettings.java | 42 +- .../thingsboard/client/model/EntityGroup.java | 2 +- .../client/model/EntityGroupExportData.java | 61 +- .../client/model/EntityGroupInfo.java | 20 +- .../thingsboard/client/model/EntityView.java | 14 +- .../client/model/EntityViewInfo.java | 14 +- .../client/model/HomeDashboard.java | 4 +- .../org/thingsboard/client/model/Job.java | 73 +- .../model/LoginWhiteLabelingParams.java | 38 +- .../model/MobileSelfRegistrationParams.java | 6 + .../client/model/ReportTemplate.java | 14 +- .../client/model/ReportTemplateInfo.java | 14 +- .../org/thingsboard/client/model/Role.java | 18 +- .../client/model/ScheduledReportInfo.java | 14 +- .../client/model/SchedulerEvent.java | 14 +- .../client/model/SchedulerEventInfo.java | 14 +- .../model/SchedulerEventWithCustomerInfo.java | 14 +- .../client/model/SimpleValueSourceConfig.java | 372 + .../client/model/SolutionExportRequest.java | 100 +- .../client/model/SolutionImportResult.java | 2 +- .../client/model/SolutionInstallResponse.java | 338 - .../client/model/SolutionTemplateLevel.java | 82 - .../model/SubscriptionExceptionErrorCode.java | 4 +- .../client/model/TbUserMessage.java | 2 +- .../model/TenantSolutionTemplateDetails.java | 518 -- .../model/TenantSolutionTemplateInfo.java | 542 -- .../TenantSolutionTemplateInstructions.java | 302 - .../model/TimeSeriesChartYAxisSettings.java | 21 +- .../client/model/UserExportData.java | 209 + .../model/WebSelfRegistrationParams.java | 6 + .../client/model/WhiteLabelingParams.java | 38 +- .../client/model/WidgetsBundleExportData.java | 2 +- 148 files changed, 6097 insertions(+), 7070 deletions(-) create mode 100644 paas/docs/AiDeviceDashboardControllerApi.md create mode 100644 paas/docs/SimpleValueSourceConfig.md delete mode 100644 paas/docs/SolutionControllerApi.md delete mode 100644 paas/docs/SolutionInstallResponse.md delete mode 100644 paas/docs/SolutionTemplateLevel.md delete mode 100644 paas/docs/TenantSolutionTemplateDetails.md delete mode 100644 paas/docs/TenantSolutionTemplateInfo.md delete mode 100644 paas/docs/TenantSolutionTemplateInstructions.md create mode 100644 paas/docs/UserExportData.md create mode 100644 paas/src/main/java/org/thingsboard/client/model/SimpleValueSourceConfig.java delete mode 100644 paas/src/main/java/org/thingsboard/client/model/SolutionInstallResponse.java delete mode 100644 paas/src/main/java/org/thingsboard/client/model/SolutionTemplateLevel.java delete mode 100644 paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateDetails.java delete mode 100644 paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInfo.java delete mode 100644 paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInstructions.java create mode 100644 paas/src/main/java/org/thingsboard/client/model/UserExportData.java diff --git a/paas/docs/AiChatControllerApi.md b/paas/docs/AiChatControllerApi.md index dda839c3..3111fde1 100644 --- a/paas/docs/AiChatControllerApi.md +++ b/paas/docs/AiChatControllerApi.md @@ -7,7 +7,7 @@ com.fasterxml.jackson.databind.JsonNode createChat(@Nonnull Object body) // crea void deleteChat(@Nonnull UUID chatId) // deleteChat com.fasterxml.jackson.databind.JsonNode getChatMessages(@Nonnull UUID chatId) // getChatMessages com.fasterxml.jackson.databind.JsonNode listChats(@Nonnull ChatType chatType) // listChats -List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body) // sendChatMessage +List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull Object body, @Nullable String acceptLanguage) // sendChatMessage void updateChat(@Nonnull UUID chatId, @Nonnull Object body) // updateChat ``` @@ -103,7 +103,7 @@ listChats ## sendChatMessage ``` -List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body) +List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull Object body, @Nullable String acceptLanguage) ``` **POST** `/api/ai/chats/{chatId}/messages` @@ -117,7 +117,8 @@ sendChatMessage |------------- | ------------- | ------------- | -------------| | **chatId** | **UUID** | | | | **xAuthorization** | **String** | | | -| **body** | **String** | | | +| **body** | **Object** | | | +| **acceptLanguage** | **String** | | [optional] | ### Return type diff --git a/paas/docs/AiDeviceDashboardControllerApi.md b/paas/docs/AiDeviceDashboardControllerApi.md new file mode 100644 index 00000000..75f721d7 --- /dev/null +++ b/paas/docs/AiDeviceDashboardControllerApi.md @@ -0,0 +1,32 @@ +# AiDeviceDashboardControllerApi + +`ThingsboardClient` methods: + +``` +com.fasterxml.jackson.databind.JsonNode generateDashboard(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nonnull Object body) // generateDashboard +``` + + +## generateDashboard + +``` +com.fasterxml.jackson.databind.JsonNode generateDashboard(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nonnull Object body) +``` + +**POST** `/api/ai/devices/{deviceId}/dashboard` + +generateDashboard + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **deviceId** | **UUID** | | | +| **xAuthorization** | **String** | | | +| **body** | **Object** | | | + +### Return type + +**com.fasterxml.jackson.databind.JsonNode** + diff --git a/paas/docs/Alarm.md b/paas/docs/Alarm.md index 97a88af3..20aaadfe 100644 --- a/paas/docs/Alarm.md +++ b/paas/docs/Alarm.md @@ -10,7 +10,7 @@ | **id** | **AlarmId** | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | **createdTime** | **Long** | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | **type** | **String** | representing type of the Alarm | | | **originator** | **EntityId** | JSON object with alarm originator id | | | **severity** | **AlarmSeverity** | Alarm severity | | diff --git a/paas/docs/AlarmControllerApi.md b/paas/docs/AlarmControllerApi.md index 8411c255..9c3902bc 100644 --- a/paas/docs/AlarmControllerApi.md +++ b/paas/docs/AlarmControllerApi.md @@ -370,7 +370,7 @@ Alarm saveAlarm(@Nonnull Alarm alarm) Create or Update Alarm (saveAlarm) -Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. The alarm originator is an immutable routing key: when updating an existing alarm, the 'originator' in the request body must match the stored alarm's originator. A request that references an existing alarm id but carries a different originator is treated as a lookup miss and causes a 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters diff --git a/paas/docs/AlarmData.md b/paas/docs/AlarmData.md index b3bc76c0..74276958 100644 --- a/paas/docs/AlarmData.md +++ b/paas/docs/AlarmData.md @@ -10,7 +10,7 @@ | **id** | **AlarmId** | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | **createdTime** | **Long** | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | **type** | **String** | representing type of the Alarm | | | **originator** | **EntityId** | JSON object with alarm originator id | | | **severity** | **AlarmSeverity** | Alarm severity | | diff --git a/paas/docs/AlarmInfo.md b/paas/docs/AlarmInfo.md index aa377adc..4d5425e3 100644 --- a/paas/docs/AlarmInfo.md +++ b/paas/docs/AlarmInfo.md @@ -10,7 +10,7 @@ | **id** | **AlarmId** | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | **createdTime** | **Long** | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | **type** | **String** | representing type of the Alarm | | | **originator** | **EntityId** | JSON object with alarm originator id | | | **severity** | **AlarmSeverity** | Alarm severity | | diff --git a/paas/docs/Asset.md b/paas/docs/Asset.md index 1e6ac7ac..a1921605 100644 --- a/paas/docs/Asset.md +++ b/paas/docs/Asset.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | **name** | **String** | Unique Asset Name in scope of Tenant | | | **type** | **String** | Asset type | [optional] | | **label** | **String** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/AssetControllerApi.md b/paas/docs/AssetControllerApi.md index f325dfb9..25e1f7e7 100644 --- a/paas/docs/AssetControllerApi.md +++ b/paas/docs/AssetControllerApi.md @@ -88,7 +88,7 @@ Returns a page of asset info objects owned by the tenant or the customer of a cu |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **assetProfileId** | **String** | A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the asset name. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, label, customerTitle] | @@ -237,7 +237,7 @@ Returns a page of asset info objects owned by the specified customer. Asset Info | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **assetProfileId** | **String** | A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the asset name. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, label, customerTitle] | diff --git a/paas/docs/AssetInfo.md b/paas/docs/AssetInfo.md index 2497f2b8..ec7ca019 100644 --- a/paas/docs/AssetInfo.md +++ b/paas/docs/AssetInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the asset. May include: 'description' (string). | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | **name** | **String** | Unique Asset Name in scope of Tenant | | | **type** | **String** | Asset type | [optional] | | **label** | **String** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/AvailableEntityKeys.md b/paas/docs/AvailableEntityKeys.md index b2ab947c..9faa8bfb 100644 --- a/paas/docs/AvailableEntityKeys.md +++ b/paas/docs/AvailableEntityKeys.md @@ -10,8 +10,8 @@ Contains unique time series and attribute key names discovered from entities mat | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **entityTypes** | **Set\** | Set of entity types found among the matched entities. | | -| **timeseries** | **Set\** | | | -| **attribute** | **Set\** | | | +| **timeseries** | **Set\** | List of unique time series key names available on the matched entities. | | +| **attribute** | **Set\** | List of unique attribute key names available on the matched entities. | | diff --git a/paas/docs/AvailableEntityKeysV2.md b/paas/docs/AvailableEntityKeysV2.md index 2c8fb09d..bccc8e9b 100644 --- a/paas/docs/AvailableEntityKeysV2.md +++ b/paas/docs/AvailableEntityKeysV2.md @@ -11,7 +11,7 @@ Contains unique time series and attribute key names discovered from entities mat |------------ | ------------- | ------------- | -------------| | **totalEntities** | **Integer** | Total number of entities that matched the query filter. | | | **entityTypes** | **Set\** | Set of entity types found among the matched entities. | | -| **timeseries** | **List\** | | [optional] | +| **timeseries** | **List\** | List of unique time series keys available on the matched entities, sorted alphabetically. Omitted when timeseries keys were not requested. | [optional] | | **attributes** | **Map\\>** | Map of attribute scope to the list of unique attribute keys available on the matched entities. Only scopes supported by the matched entity types are included. Omitted when attribute keys were not requested or when none of the requested scopes apply to the matched entity types. | [optional] | diff --git a/paas/docs/CsvReportTemplateConfig.md b/paas/docs/CsvReportTemplateConfig.md index 179f0fa8..94eef4de 100644 --- a/paas/docs/CsvReportTemplateConfig.md +++ b/paas/docs/CsvReportTemplateConfig.md @@ -751,8 +751,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -934,6 +934,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/CustomerControllerApi.md b/paas/docs/CustomerControllerApi.md index 9c47779e..fd30f592 100644 --- a/paas/docs/CustomerControllerApi.md +++ b/paas/docs/CustomerControllerApi.md @@ -62,7 +62,7 @@ Returns a page of customer info objects owned by the tenant or the customer of a |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the customer title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title, email, country, city] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -116,7 +116,7 @@ Returns a page of customer info objects owned by the specified customer. You can | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the customer title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title, email, country, city] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/paas/docs/Dashboard.md b/paas/docs/Dashboard.md index 1c228af6..00130149 100644 --- a/paas/docs/Dashboard.md +++ b/paas/docs/Dashboard.md @@ -18,7 +18,7 @@ | **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. | [optional] | | **resources** | **List\** | | [optional] | | **version** | **Long** | | [optional] | diff --git a/paas/docs/DashboardControllerApi.md b/paas/docs/DashboardControllerApi.md index 811c9785..ab13626f 100644 --- a/paas/docs/DashboardControllerApi.md +++ b/paas/docs/DashboardControllerApi.md @@ -96,7 +96,7 @@ Returns a page of dashboard info objects owned by the tenant or the customer of |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [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] | @@ -126,7 +126,7 @@ Returns a page of dashboard info objects owned by the specified customer. The Da | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the dashboard title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, title] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/paas/docs/DashboardInfo.md b/paas/docs/DashboardInfo.md index b17a581d..9b6a3377 100644 --- a/paas/docs/DashboardInfo.md +++ b/paas/docs/DashboardInfo.md @@ -18,7 +18,7 @@ | **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. | [optional] | | **resources** | **List\** | | [optional] | | **version** | **Long** | | [optional] | | **groups** | **List\** | Groups | [optional] | diff --git a/paas/docs/Device.md b/paas/docs/Device.md index a5763e2d..00151848 100644 --- a/paas/docs/Device.md +++ b/paas/docs/Device.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | **name** | **String** | Unique Device Name in scope of Tenant | [optional] | | **type** | **String** | Device Profile Name | [optional] | | **label** | **String** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/DeviceControllerApi.md b/paas/docs/DeviceControllerApi.md index e0b283f4..68ba774b 100644 --- a/paas/docs/DeviceControllerApi.md +++ b/paas/docs/DeviceControllerApi.md @@ -198,7 +198,7 @@ Returns a page of device info objects owned by the tenant or the customer of a c |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | | **active** | **Boolean** | A boolean value representing the device active flag. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the device name. | [optional] | @@ -230,7 +230,7 @@ Returns a page of device info objects owned by the specified customer. Device In | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **deviceProfileId** | **String** | A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | [optional] | | **active** | **Boolean** | A boolean value representing the device active flag. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the device name. | [optional] | diff --git a/paas/docs/DeviceInfo.md b/paas/docs/DeviceInfo.md index 46b125ca..14c75e09 100644 --- a/paas/docs/DeviceInfo.md +++ b/paas/docs/DeviceInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | **name** | **String** | Unique Device Name in scope of Tenant | [optional] | | **type** | **String** | Device Profile Name | [optional] | | **label** | **String** | Label that may be used in widgets | [optional] | diff --git a/paas/docs/Edge.md b/paas/docs/Edge.md index 68bb81a8..5606a85b 100644 --- a/paas/docs/Edge.md +++ b/paas/docs/Edge.md @@ -12,8 +12,8 @@ A JSON value representing the edge. | **id** | **EdgeId** | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | **createdTime** | **Long** | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | | **rootRuleChainId** | **RuleChainId** | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | **name** | **String** | Unique Edge Name in scope of Tenant | | | **type** | **String** | Edge type | | diff --git a/paas/docs/EdgeControllerApi.md b/paas/docs/EdgeControllerApi.md index 7f1ea69a..934d2427 100644 --- a/paas/docs/EdgeControllerApi.md +++ b/paas/docs/EdgeControllerApi.md @@ -171,7 +171,7 @@ Returns a page of edge info objects owned by the tenant or the customer of a cur |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **type** | **String** | A string value representing the edge type. For example, 'default' | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the edge name. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, label, customerTitle] | @@ -202,7 +202,7 @@ Returns a page of edge info objects owned by the specified customer. You can spe | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **type** | **String** | A string value representing the edge type. For example, 'default' | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the edge name. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type, label, customerTitle] | diff --git a/paas/docs/EdgeInfo.md b/paas/docs/EdgeInfo.md index ecec7a26..1b7aa689 100644 --- a/paas/docs/EdgeInfo.md +++ b/paas/docs/EdgeInfo.md @@ -10,8 +10,8 @@ | **id** | **EdgeId** | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | **createdTime** | **Long** | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] | | **rootRuleChainId** | **RuleChainId** | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | **name** | **String** | Unique Edge Name in scope of Tenant | | | **type** | **String** | Edge type | | diff --git a/paas/docs/EntityDataDiff.md b/paas/docs/EntityDataDiff.md index 406e70c4..6f37b468 100644 --- a/paas/docs/EntityDataDiff.md +++ b/paas/docs/EntityDataDiff.md @@ -54,9 +54,10 @@ #### EntityGroupExportData *(extends EntityExportData, entityType=`ENTITY_GROUP`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| permissions | List | | [optional] | -| groupOtaPackages | List | | [optional] | -| groupEntities | Boolean | | [optional] | +| permissions | List | Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group. | [optional] | +| groupOtaPackages | List | OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group. | [optional] | +| groupEntities | Boolean | Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default). | [optional] | +| memberIds | List | External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched. | [optional] | #### EntityViewExportData *(extends EntityExportData, entityType=`ENTITY_VIEW`)* *See EntityExportData for properties.* @@ -93,10 +94,13 @@ #### TbResourceExportData *(extends EntityExportData, entityType=`TB_RESOURCE`)* *See EntityExportData for properties.* +#### UserExportData *(extends EntityExportData, entityType=`USER`)* +*See EntityExportData for properties.* + #### WidgetsBundleExportData *(extends EntityExportData, entityType=`WIDGETS_BUNDLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| widgets | List | | [optional] | +| widgets | List | List of widgets in the bundle | [optional] | | fqns | List | | [optional] | #### WidgetTypeExportData *(extends EntityExportData, entityType=`WIDGET_TYPE`)* diff --git a/paas/docs/EntityExportData.md b/paas/docs/EntityExportData.md index 21f09065..92825323 100644 --- a/paas/docs/EntityExportData.md +++ b/paas/docs/EntityExportData.md @@ -48,9 +48,10 @@ Base export container for ThingsBoard entities #### EntityGroupExportData *(entityType=`ENTITY_GROUP`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| permissions | List | | [optional] | -| groupOtaPackages | List | | [optional] | -| groupEntities | Boolean | | [optional] | +| permissions | List | Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group. | [optional] | +| groupOtaPackages | List | OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group. | [optional] | +| groupEntities | Boolean | Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default). | [optional] | +| memberIds | List | External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched. | [optional] | #### EntityViewExportData *(entityType=`ENTITY_VIEW`)* *(no additional properties)* @@ -87,10 +88,13 @@ Base export container for ThingsBoard entities #### TbResourceExportData *(entityType=`TB_RESOURCE`)* *(no additional properties)* +#### UserExportData *(entityType=`USER`)* +*(no additional properties)* + #### WidgetsBundleExportData *(entityType=`WIDGETS_BUNDLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| widgets | List | | [optional] | +| widgets | List | List of widgets in the bundle | [optional] | | fqns | List | | [optional] | #### WidgetTypeExportData *(entityType=`WIDGET_TYPE`)* diff --git a/paas/docs/EntityExportSettings.md b/paas/docs/EntityExportSettings.md index f0951236..0e125fa3 100644 --- a/paas/docs/EntityExportSettings.md +++ b/paas/docs/EntityExportSettings.md @@ -13,6 +13,7 @@ | **exportCalculatedFields** | **Boolean** | | [optional] | | **exportPermissions** | **Boolean** | | [optional] | | **exportGroupEntities** | **Boolean** | | [optional] | +| **embedGroupMembers** | **Boolean** | | [optional] | diff --git a/paas/docs/EntityGroup.md b/paas/docs/EntityGroup.md index 854b42ed..afb91e6e 100644 --- a/paas/docs/EntityGroup.md +++ b/paas/docs/EntityGroup.md @@ -13,7 +13,7 @@ A JSON value representing the entity group. | **createdTime** | **Long** | Timestamp of the entity group creation, in milliseconds | [optional] [readonly] | | **type** | **TypeEnum** | | | | **name** | **String** | Name of the entity group | | -| **ownerId** | **EntityId** | JSON object with the owner of the group - Tenant or Customer Id. | [optional] | +| **ownerId** | **EntityId** | JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | **version** | **Long** | | [optional] | diff --git a/paas/docs/EntityGroupControllerApi.md b/paas/docs/EntityGroupControllerApi.md index 6d163e42..5659e235 100644 --- a/paas/docs/EntityGroupControllerApi.md +++ b/paas/docs/EntityGroupControllerApi.md @@ -930,16 +930,16 @@ void shareEntityGroupToChildOwnerUserGroup(@Nonnull String entityGroupId, @Nonnu Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup) -Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. +Share the entity group with the specified user group using the specified role. Unlike the 'shareEntityGroup' API method, this method is designed for sharing 'down' the owner hierarchy and does not require 'WRITE' permission for the shared entity group or the target user group. In particular, it allows the current user to re-share an entity group that was shared with them by the parent owner: for example, a customer user may re-share a tenant-owned dashboard group with a user group of their sub-customer. The following security checks are performed: * the target user group must belong to the current user's owner or to one of its sub-customers; * the current user must have the 'SHARE_GROUP' operation granted for the shared entity group: either as a generic permission for the corresponding entity group resource (applies only if the shared entity group belongs to the current user's owner hierarchy), or as a group permission created when the entity group was shared with the current user's user group using a group role that includes the 'SHARE_GROUP' operation; * the specified role must be a group role that is readable by the current user, so it must belong to the current user's owner or to one of its sub-customers; * the operations of the specified role must be a subset of the operations the current user was granted for the shared entity group (always passes if the current user was granted the 'ALL' operation). If the specified role also includes the 'SHARE_GROUP' operation, the members of the target user group will be able to re-share the entity group further down their own owner hierarchy in the same way. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **entityGroupId** | **String** | A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **userGroupId** | **String** | A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **roleId** | **String** | A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **entityGroupId** | **String** | ID of the entity group to share | | +| **userGroupId** | **String** | ID of the user group to share the entity group with. The user group must belong to the current user's owner or to one of its sub-customers | | +| **roleId** | **String** | ID of the group role that defines the set of operations to grant to the target user group | | ### Return type diff --git a/paas/docs/EntityGroupExportData.md b/paas/docs/EntityGroupExportData.md index 3f0a9434..87524eb2 100644 --- a/paas/docs/EntityGroupExportData.md +++ b/paas/docs/EntityGroupExportData.md @@ -9,9 +9,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **permissions** | **List\** | | [optional] | -| **groupOtaPackages** | **List\** | | [optional] | -| **groupEntities** | **Boolean** | | [optional] | +| **permissions** | **List\** | Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group. | [optional] | +| **groupOtaPackages** | **List\** | OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group. | [optional] | +| **groupEntities** | **Boolean** | Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default). | [optional] | +| **memberIds** | **List\** | External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched. | [optional] | diff --git a/paas/docs/EntityGroupInfo.md b/paas/docs/EntityGroupInfo.md index 7a03fed9..c28557d4 100644 --- a/paas/docs/EntityGroupInfo.md +++ b/paas/docs/EntityGroupInfo.md @@ -11,11 +11,11 @@ | **createdTime** | **Long** | Timestamp of the entity group creation, in milliseconds | [optional] [readonly] | | **type** | **TypeEnum** | | | | **name** | **String** | Name of the entity group | | -| **ownerId** | **EntityId** | JSON object with the owner of the group - Tenant or Customer Id. | [optional] | +| **ownerId** | **EntityId** | JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). | [optional] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | **version** | **Long** | | [optional] | -| **ownerIds** | **Set\** | | [optional] | +| **ownerIds** | **Set\** | List of the entity group owners. | | | **edgeGroupAll** | **Boolean** | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | **groupAll** | **Boolean** | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | **tenantId** | **TenantId** | | [optional] | diff --git a/paas/docs/EntityView.md b/paas/docs/EntityView.md index 7714565d..fcc19f9f 100644 --- a/paas/docs/EntityView.md +++ b/paas/docs/EntityView.md @@ -14,7 +14,7 @@ A JSON object representing the entity view. | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | **entityId** | **EntityId** | JSON object with the referenced Entity Id (Device or Asset). | | | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | **name** | **String** | Entity View name | | | **type** | **String** | Device Profile Name | | | **keys** | **TelemetryEntityView** | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/EntityViewControllerApi.md b/paas/docs/EntityViewControllerApi.md index 2ff0afc4..0c768d80 100644 --- a/paas/docs/EntityViewControllerApi.md +++ b/paas/docs/EntityViewControllerApi.md @@ -87,7 +87,7 @@ Returns a page of entity view info objects owned by the tenant or the customer o |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **type** | **String** | ## 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\" } ``` | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the entity view name. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type] | @@ -118,7 +118,7 @@ Returns a page of entity view info objects owned by the specified customer. Enti | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **type** | **String** | ## 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\" } ``` | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the entity view name. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, type] | diff --git a/paas/docs/EntityViewInfo.md b/paas/docs/EntityViewInfo.md index feae27f9..1f095251 100644 --- a/paas/docs/EntityViewInfo.md +++ b/paas/docs/EntityViewInfo.md @@ -12,7 +12,7 @@ | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | **entityId** | **EntityId** | JSON object with the referenced Entity Id (Device or Asset). | | | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | **name** | **String** | Entity View name | | | **type** | **String** | Device Profile Name | | | **keys** | **TelemetryEntityView** | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/GroupPermissionInfo.md b/paas/docs/GroupPermissionInfo.md index bf521b82..f389721e 100644 --- a/paas/docs/GroupPermissionInfo.md +++ b/paas/docs/GroupPermissionInfo.md @@ -41,11 +41,11 @@ | createdTime | Long | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the role. May include: 'description' (string). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | name | String | Role Name | | | type | RoleType | Type of the role: generic or group | | -| permissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of permissions. Structure is specific for role type | | -| excludedPermissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] | +| permissions | com.fasterxml.jackson.databind.JsonNode | Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping `Resource` enum names to arrays of `Operation` enum names allowed on that resource. The wildcard entry `{\"ALL\":[\"ALL\"]}` grants every operation on every resource. * GROUP — JSON array of `Operation` enum names that apply to the entity group this role is bound to via `GroupPermission.entityGroupId`. Only operations with `allowedForGroupRole=true` may appear (see `Operation` enum). The wildcard entry `[\"ALL\"]` grants every supported operation on the bound entity group. | | +| excludedPermissions | com.fasterxml.jackson.databind.JsonNode | Operations to subtract from those granted by `permissions`. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant of `permissions`: a JSON object mapping `Resource` enum names to non-empty arrays of `Operation` enum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g. `permissions={\"ALL\":[\"ALL\"]}` combined with `excludedPermissions={\"DEVICE\":[\"DELETE\"]}` grants everything except deleting devices). May be null or an empty object when no exclusions apply. | [optional] | | version | Long | | [optional] | | ownerId | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/HeaderFooter.md b/paas/docs/HeaderFooter.md index dd602327..7dacecc0 100644 --- a/paas/docs/HeaderFooter.md +++ b/paas/docs/HeaderFooter.md @@ -484,8 +484,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -631,6 +631,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/HomeDashboard.md b/paas/docs/HomeDashboard.md index ee14218a..8caca812 100644 --- a/paas/docs/HomeDashboard.md +++ b/paas/docs/HomeDashboard.md @@ -18,7 +18,7 @@ | **assignedCustomers** | **Set\** | List of assigned customers with their info. | [optional] | | **mobileHide** | **Boolean** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | **mobileOrder** | **Integer** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **_configuration** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. | [optional] | | **resources** | **List\** | | [optional] | | **version** | **Long** | | [optional] | | **hideDashboardToolbar** | **Boolean** | Hide dashboard toolbar flag. Useful for rendering dashboards on mobile. | [optional] | diff --git a/paas/docs/IntegrationControllerApi.md b/paas/docs/IntegrationControllerApi.md index 26cce367..4749151e 100644 --- a/paas/docs/IntegrationControllerApi.md +++ b/paas/docs/IntegrationControllerApi.md @@ -6,6 +6,7 @@ Integration assignIntegrationToEdge(@Nonnull String edgeId, @Nonnull String integrationId) // Assign integration to edge (assignIntegrationToEdge) void checkIntegrationConnection(@Nonnull Integration integration) // Check integration connectivity (checkIntegrationConnection) void deleteIntegration(@Nonnull String integrationId) // Delete integration (deleteIntegration) +byte[] exportIntegrationPackage(@Nonnull String integrationId) // Export integration as IoT Hub package String findAllRelatedEdgesMissingAttributes(@Nonnull String integrationId) // Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) String findEdgeMissingAttributes(@Nonnull String edgeId, @Nonnull List integrationIds) // Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) PageDataIntegrationInfo getEdgeIntegrationInfos(@Nonnull String edgeId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Edge Integrations (getEdgeIntegrationInfos) @@ -94,6 +95,30 @@ Deletes the integration and all the relations (from and to the integration). Ref null (empty response body) +## exportIntegrationPackage + +``` +byte[] exportIntegrationPackage(@Nonnull String integrationId) +``` + +**GET** `/api/integration/{integrationId}/export-package` + +Export integration as IoT Hub package + +Returns a ZIP containing integration.json, uplink.json, optional downlink.json, and form.json. Sensitive fields are tokenized via @TemplateField annotations on the integration's runtime POJO. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integrationId** | **String** | | | + +### Return type + +**byte[]** + + ## findAllRelatedEdgesMissingAttributes ``` diff --git a/paas/docs/Job.md b/paas/docs/Job.md index ded6e7c2..555541fc 100644 --- a/paas/docs/Job.md +++ b/paas/docs/Job.md @@ -10,6 +10,7 @@ | **id** | **JobId** | | [optional] | | **createdTime** | **Long** | Entity creation timestamp in milliseconds since Unix epoch | [optional] [readonly] | | **tenantId** | **TenantId** | | | +| **customerId** | **CustomerId** | | [optional] | | **type** | **JobType** | | | | **key** | **String** | | | | **entityId** | **EntityId** | | | @@ -17,6 +18,7 @@ | **status** | **JobStatus** | | | | **_configuration** | **JobConfiguration** | | | | **result** | **JobResult** | | | +| **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/JobControllerApi.md b/paas/docs/JobControllerApi.md index efeedf20..ec8134e1 100644 --- a/paas/docs/JobControllerApi.md +++ b/paas/docs/JobControllerApi.md @@ -6,7 +6,7 @@ void cancelJob(@Nonnull UUID id) // Cancel job (cancelJob) void deleteJob(@Nonnull UUID id) // deleteJob Job getJobById(@Nonnull UUID id) // Get job by id (getJobById) -PageDataJob getJobs(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime) // Get jobs (getJobs) +PageDataJob getJobs(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean includeCustomers) // Get jobs (getJobs) void reprocessJob(@Nonnull UUID id) // Reprocess job (reprocessJob) ``` @@ -21,7 +21,7 @@ void cancelJob(@Nonnull UUID id) Cancel job (cancelJob) -Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING. For a running job, all the tasks not yet processed will be discarded. See the example of a cancelled job result in getJobById method description. Available for users with 'TENANT_ADMIN' authority. +Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING. For a running job, all the tasks not yet processed will be discarded. See the example of a cancelled job result in getJobById method description. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. ### Parameters @@ -67,7 +67,7 @@ Job getJobById(@Nonnull UUID id) Get job by id (getJobById) -Fetches job info by id. Example of a RUNNING CF_REPROCESSING job response: ```json { \"id\": { \"entityType\": \"JOB\", \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\" }, \"createdTime\": 1747053196590, \"tenantId\": { \"entityType\": \"TENANT\", \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\" }, \"type\": \"CF_REPROCESSING\", \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\", \"entityId\": { \"entityType\": \"DEVICE_PROFILE\", \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\" }, \"status\": \"RUNNING\", \"configuration\": { \"type\": \"CF_REPROCESSING\", \"calculatedFieldId\": { \"entityType\": \"CALCULATED_FIELD\", \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\" }, \"startTs\": 1747051995760, \"endTs\": 1747052895760, \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\", \"toReprocess\": null }, \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 1, \"failedCount\": 0, \"discardedCount\": 0, \"totalCount\": 2, \"results\": [], \"generalError\": null, \"startTs\": 1747323069445, \"finishTs\": 1747323070585, \"cancellationTs\": 0 } } ``` Example of a CF_REPROCESSING job with failures: ```json { ..., \"status\": \"FAILED\", ..., \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 0, \"failedCount\": 2, \"discardedCount\": 0, \"totalCount\": 2, \"results\": [ { \"jobType\": \"CF_REPROCESSING\", \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\", \"success\": false, \"discarded\": false, \"failure\": { \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\", \"entityInfo\": { \"id\": { \"entityType\": \"DEVICE\", \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\" }, \"name\": \"Test device 1\" } } }, { \"jobType\": \"CF_REPROCESSING\", \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\", \"success\": false, \"discarded\": false, \"failure\": { \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\", \"entityInfo\": { \"id\": { \"entityType\": \"DEVICE\", \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\" }, \"name\": \"Test device 2\" } } } ], \"generalError\": null, \"startTs\": 1747323069445, \"finishTs\": 1747323070585, \"cancellationTs\": 0 } } ``` Example of a FAILED job result with general error: ```json { ..., \"status\": \"FAILED\", ..., \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 1, \"failedCount\": 0, \"discardedCount\": 0, \"totalCount\": null, \"results\": [], \"generalError\": \"Timeout to find devices by profile\", \"cancellationTs\": 0 } } ``` Example of a CANCELLED job result: ```json { ..., \"status\": \"CANCELLED\", ..., \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 15, \"failedCount\": 0, \"discardedCount\": 85, \"totalCount\": 100, \"results\": [], \"generalError\": null, \"cancellationTs\": 1747065908414 } } ``` Available for users with 'TENANT_ADMIN' authority. +Fetches job info by id. Example of a RUNNING CF_REPROCESSING job response: ```json { \"id\": { \"entityType\": \"JOB\", \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\" }, \"createdTime\": 1747053196590, \"tenantId\": { \"entityType\": \"TENANT\", \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\" }, \"type\": \"CF_REPROCESSING\", \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\", \"entityId\": { \"entityType\": \"DEVICE_PROFILE\", \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\" }, \"status\": \"RUNNING\", \"configuration\": { \"type\": \"CF_REPROCESSING\", \"calculatedFieldId\": { \"entityType\": \"CALCULATED_FIELD\", \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\" }, \"startTs\": 1747051995760, \"endTs\": 1747052895760, \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\", \"toReprocess\": null }, \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 1, \"failedCount\": 0, \"discardedCount\": 0, \"totalCount\": 2, \"results\": [], \"generalError\": null, \"startTs\": 1747323069445, \"finishTs\": 1747323070585, \"cancellationTs\": 0 } } ``` Example of a CF_REPROCESSING job with failures: ```json { ..., \"status\": \"FAILED\", ..., \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 0, \"failedCount\": 2, \"discardedCount\": 0, \"totalCount\": 2, \"results\": [ { \"jobType\": \"CF_REPROCESSING\", \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\", \"success\": false, \"discarded\": false, \"failure\": { \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\", \"entityInfo\": { \"id\": { \"entityType\": \"DEVICE\", \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\" }, \"name\": \"Test device 1\" } } }, { \"jobType\": \"CF_REPROCESSING\", \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\", \"success\": false, \"discarded\": false, \"failure\": { \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\", \"entityInfo\": { \"id\": { \"entityType\": \"DEVICE\", \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\" }, \"name\": \"Test device 2\" } } } ], \"generalError\": null, \"startTs\": 1747323069445, \"finishTs\": 1747323070585, \"cancellationTs\": 0 } } ``` Example of a FAILED job result with general error: ```json { ..., \"status\": \"FAILED\", ..., \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 1, \"failedCount\": 0, \"discardedCount\": 0, \"totalCount\": null, \"results\": [], \"generalError\": \"Timeout to find devices by profile\", \"cancellationTs\": 0 } } ``` Example of a CANCELLED job result: ```json { ..., \"status\": \"CANCELLED\", ..., \"result\": { \"jobType\": \"CF_REPROCESSING\", \"successfulCount\": 15, \"failedCount\": 0, \"discardedCount\": 85, \"totalCount\": 100, \"results\": [], \"generalError\": null, \"cancellationTs\": 1747065908414 } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. ### Parameters @@ -84,14 +84,14 @@ Fetches job info by id. Example of a RUNNING CF_REPROCESSING job response: ```j ## getJobs ``` -PageDataJob getJobs(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime) +PageDataJob getJobs(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean includeCustomers) ``` **GET** `/api/jobs` Get jobs (getJobs) -Returns the page of jobs. You can specify parameters to filter the 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 the page of jobs. You can specify parameters to filter the 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. ### Parameters @@ -108,6 +108,7 @@ Returns the page of jobs. You can specify parameters to filter the results. The | **entities** | **List** | Comma-separated list of entity ids. If empty - jobs for all entities are included. | [optional] | | **startTime** | **Long** | To only include jobs created after this timestamp. | [optional] | | **endTime** | **Long** | To only include jobs created before this timestamp. | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | ### Return type @@ -124,7 +125,7 @@ void reprocessJob(@Nonnull UUID id) Reprocess job (reprocessJob) -Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one. Available for users with 'TENANT_ADMIN' authority. +Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. ### Parameters diff --git a/paas/docs/LoginWhiteLabelingParams.md b/paas/docs/LoginWhiteLabelingParams.md index edc0f0b6..ff312bc0 100644 --- a/paas/docs/LoginWhiteLabelingParams.md +++ b/paas/docs/LoginWhiteLabelingParams.md @@ -11,6 +11,7 @@ A JSON value representing the login white labeling configuration |------------ | ------------- | ------------- | -------------| | **logoImageUrl** | **String** | Logo image URL | [optional] | | **logoImageHeight** | **Integer** | The height of a logo container. Logo image will be automatically scaled. | [optional] | +| **collapsedLogoImageUrl** | **String** | Logo shown when side menu is collapsed | [optional] | | **appTitle** | **String** | White-labeled name of the platform | [optional] | | **favicon** | **Favicon** | JSON object that contains website icon url and type | [optional] | | **paletteSettings** | **PaletteSettings** | Complex JSON that describes structure of the Angular Material Palette. See [theming](https://material.angular.io/guide/theming) for more details | [optional] | diff --git a/paas/docs/PageDataAlarmData.md b/paas/docs/PageDataAlarmData.md index 5371f6a3..5bbafea1 100644 --- a/paas/docs/PageDataAlarmData.md +++ b/paas/docs/PageDataAlarmData.md @@ -24,7 +24,7 @@ | id | AlarmId | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | createdTime | Long | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | tenantId | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | type | String | representing type of the Alarm | | | originator | EntityId | JSON object with alarm originator id | | | severity | AlarmSeverity | Alarm severity | | diff --git a/paas/docs/PageDataAlarmInfo.md b/paas/docs/PageDataAlarmInfo.md index d6eb56c6..518c3abb 100644 --- a/paas/docs/PageDataAlarmInfo.md +++ b/paas/docs/PageDataAlarmInfo.md @@ -24,7 +24,7 @@ | id | AlarmId | JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm. | [optional] | | createdTime | Long | Timestamp of the alarm creation, in milliseconds | [optional] [readonly] | | tenantId | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. | [optional] [readonly] | | type | String | representing type of the Alarm | | | originator | EntityId | JSON object with alarm originator id | | | severity | AlarmSeverity | Alarm severity | | diff --git a/paas/docs/PageDataAsset.md b/paas/docs/PageDataAsset.md index 7fa7860f..46659df2 100644 --- a/paas/docs/PageDataAsset.md +++ b/paas/docs/PageDataAsset.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the asset. May include: 'description' (string). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | name | String | Unique Asset Name in scope of Tenant | | | type | String | Asset type | [optional] | | label | String | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataAssetInfo.md b/paas/docs/PageDataAssetInfo.md index 873e4df8..0e29e9d7 100644 --- a/paas/docs/PageDataAssetInfo.md +++ b/paas/docs/PageDataAssetInfo.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the asset creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the asset. May include: 'description' (string). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. | [optional] | | name | String | Unique Asset Name in scope of Tenant | | | type | String | Asset type | [optional] | | label | String | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataDashboardInfo.md b/paas/docs/PageDataDashboardInfo.md index bb404a6d..99ac291f 100644 --- a/paas/docs/PageDataDashboardInfo.md +++ b/paas/docs/PageDataDashboardInfo.md @@ -32,7 +32,7 @@ | assignedCustomers | Set | List of assigned customers with their info. | [optional] | | mobileHide | Boolean | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | | mobileOrder | Integer | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | -| _configuration | com.fasterxml.jackson.databind.JsonNode | | [optional] | +| _configuration | com.fasterxml.jackson.databind.JsonNode | JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. | [optional] | | resources | List | | [optional] | | version | Long | | [optional] | | groups | List | Groups | [optional] | diff --git a/paas/docs/PageDataDevice.md b/paas/docs/PageDataDevice.md index 425fa267..b7ba3b8f 100644 --- a/paas/docs/PageDataDevice.md +++ b/paas/docs/PageDataDevice.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | name | String | Unique Device Name in scope of Tenant | [optional] | | type | String | Device Profile Name | [optional] | | label | String | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataDeviceInfo.md b/paas/docs/PageDataDeviceInfo.md index be305311..7eb225cd 100644 --- a/paas/docs/PageDataDeviceInfo.md +++ b/paas/docs/PageDataDeviceInfo.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | name | String | Unique Device Name in scope of Tenant | [optional] | | type | String | Device Profile Name | [optional] | | label | String | Label that may be used in widgets | [optional] | diff --git a/paas/docs/PageDataEdge.md b/paas/docs/PageDataEdge.md index 0cfd338c..e03d0631 100644 --- a/paas/docs/PageDataEdge.md +++ b/paas/docs/PageDataEdge.md @@ -24,8 +24,8 @@ | id | EdgeId | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | createdTime | Long | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| tenantId | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| tenantId | TenantId | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. | [optional] | | rootRuleChainId | RuleChainId | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | name | String | Unique Edge Name in scope of Tenant | | | type | String | Edge type | | diff --git a/paas/docs/PageDataEdgeInfo.md b/paas/docs/PageDataEdgeInfo.md index 1508a502..eac6917e 100644 --- a/paas/docs/PageDataEdgeInfo.md +++ b/paas/docs/PageDataEdgeInfo.md @@ -24,8 +24,8 @@ | id | EdgeId | JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge. | [optional] | | createdTime | Long | Timestamp of the edge creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the edge. May include: 'description' (string). | [optional] | -| tenantId | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. | [optional] [readonly] | +| tenantId | TenantId | JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. | [optional] | | rootRuleChainId | RuleChainId | JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id. | [optional] [readonly] | | name | String | Unique Edge Name in scope of Tenant | | | type | String | Edge type | | diff --git a/paas/docs/PageDataEntityGroupInfo.md b/paas/docs/PageDataEntityGroupInfo.md index a31dab0f..a6a58396 100644 --- a/paas/docs/PageDataEntityGroupInfo.md +++ b/paas/docs/PageDataEntityGroupInfo.md @@ -25,11 +25,11 @@ | createdTime | Long | Timestamp of the entity group creation, in milliseconds | [optional] [readonly] | | type | TypeEnum | | | | name | String | Name of the entity group | | -| ownerId | EntityId | JSON object with the owner of the group - Tenant or Customer Id. | [optional] | +| ownerId | EntityId | JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). | [optional] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | _configuration | com.fasterxml.jackson.databind.JsonNode | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | version | Long | | [optional] | -| ownerIds | Set | | [optional] | +| ownerIds | Set | List of the entity group owners. | | | edgeGroupAll | Boolean | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | groupAll | Boolean | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | tenantId | TenantId | | [optional] | diff --git a/paas/docs/PageDataEntityView.md b/paas/docs/PageDataEntityView.md index 6656544a..d4755cf5 100644 --- a/paas/docs/PageDataEntityView.md +++ b/paas/docs/PageDataEntityView.md @@ -26,7 +26,7 @@ | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | entityId | EntityId | JSON object with the referenced Entity Id (Device or Asset). | | | tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | name | String | Entity View name | | | type | String | Device Profile Name | | | keys | TelemetryEntityView | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/PageDataEntityViewInfo.md b/paas/docs/PageDataEntityViewInfo.md index 2e442a22..0f24d800 100644 --- a/paas/docs/PageDataEntityViewInfo.md +++ b/paas/docs/PageDataEntityViewInfo.md @@ -26,7 +26,7 @@ | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the entity view. May include: 'description' (string). | [optional] | | entityId | EntityId | JSON object with the referenced Entity Id (Device or Asset). | | | tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. | [optional] | | name | String | Entity View name | | | type | String | Device Profile Name | | | keys | TelemetryEntityView | Set of telemetry and attribute keys to expose via Entity View. | [optional] | diff --git a/paas/docs/PageDataJob.md b/paas/docs/PageDataJob.md index b56449d6..1004a548 100644 --- a/paas/docs/PageDataJob.md +++ b/paas/docs/PageDataJob.md @@ -24,6 +24,7 @@ | id | JobId | | [optional] | | createdTime | Long | Entity creation timestamp in milliseconds since Unix epoch | [optional] [readonly] | | tenantId | TenantId | | | +| customerId | CustomerId | | [optional] | | type | JobType | | | | key | String | | | | entityId | EntityId | | | @@ -31,6 +32,7 @@ | status | JobStatus | | | | _configuration | JobConfiguration | | | | result | JobResult | | | +| ownerId | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | #### JobType (enum) `CF_REPROCESSING` | `REPORT` | `DUMMY` diff --git a/paas/docs/PageDataReportTemplateInfo.md b/paas/docs/PageDataReportTemplateInfo.md index d6233136..311695d9 100644 --- a/paas/docs/PageDataReportTemplateInfo.md +++ b/paas/docs/PageDataReportTemplateInfo.md @@ -24,7 +24,7 @@ | id | ReportTemplateId | JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template | [optional] | | createdTime | Long | Timestamp of the report template creation, in milliseconds | [optional] [readonly] | | tenantId | TenantId | JSON object with Tenant Id. Tenant Id of the report template can't be changed. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | name | String | Report name | | | format | TbReportFormat | Report format | | | type | ReportTemplateType | Report template type | | diff --git a/paas/docs/PageDataRole.md b/paas/docs/PageDataRole.md index bd096c42..02a9788c 100644 --- a/paas/docs/PageDataRole.md +++ b/paas/docs/PageDataRole.md @@ -25,11 +25,11 @@ | createdTime | Long | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the role. May include: 'description' (string). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | name | String | Role Name | | | type | RoleType | Type of the role: generic or group | | -| permissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of permissions. Structure is specific for role type | | -| excludedPermissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] | +| permissions | com.fasterxml.jackson.databind.JsonNode | Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping `Resource` enum names to arrays of `Operation` enum names allowed on that resource. The wildcard entry `{\"ALL\":[\"ALL\"]}` grants every operation on every resource. * GROUP — JSON array of `Operation` enum names that apply to the entity group this role is bound to via `GroupPermission.entityGroupId`. Only operations with `allowedForGroupRole=true` may appear (see `Operation` enum). The wildcard entry `[\"ALL\"]` grants every supported operation on the bound entity group. | | +| excludedPermissions | com.fasterxml.jackson.databind.JsonNode | Operations to subtract from those granted by `permissions`. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant of `permissions`: a JSON object mapping `Resource` enum names to non-empty arrays of `Operation` enum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g. `permissions={\"ALL\":[\"ALL\"]}` combined with `excludedPermissions={\"DEVICE\":[\"DELETE\"]}` grants everything except deleting devices). May be null or an empty object when no exclusions apply. | [optional] | | version | Long | | [optional] | | ownerId | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/PageDataScheduledReportInfo.md b/paas/docs/PageDataScheduledReportInfo.md index 25f6a608..e9aa462f 100644 --- a/paas/docs/PageDataScheduledReportInfo.md +++ b/paas/docs/PageDataScheduledReportInfo.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the scheduler event | [optional] | | tenantId | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | originatorId | EntityId | JSON object with Originator Id | [optional] [readonly] | | name | String | scheduler event name | [optional] | | type | String | scheduler event type | [optional] | diff --git a/paas/docs/PageDataSchedulerEventInfo.md b/paas/docs/PageDataSchedulerEventInfo.md index 77e3d880..19adf79a 100644 --- a/paas/docs/PageDataSchedulerEventInfo.md +++ b/paas/docs/PageDataSchedulerEventInfo.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the scheduler event | [optional] | | tenantId | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | originatorId | EntityId | JSON object with Originator Id | [optional] [readonly] | | name | String | scheduler event name | [optional] | | type | String | scheduler event type | [optional] | diff --git a/paas/docs/PageDataSchedulerEventWithCustomerInfo.md b/paas/docs/PageDataSchedulerEventWithCustomerInfo.md index fdbc1dec..f770c854 100644 --- a/paas/docs/PageDataSchedulerEventWithCustomerInfo.md +++ b/paas/docs/PageDataSchedulerEventWithCustomerInfo.md @@ -25,7 +25,7 @@ | createdTime | Long | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the scheduler event | [optional] | | tenantId | TenantId | JSON object with Tenant Id | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | originatorId | EntityId | JSON object with Originator Id | [optional] [readonly] | | name | String | scheduler event name | [optional] | | type | String | scheduler event type | [optional] | diff --git a/paas/docs/PdfReportTemplateConfig.md b/paas/docs/PdfReportTemplateConfig.md index 9fdb7be8..1feebb53 100644 --- a/paas/docs/PdfReportTemplateConfig.md +++ b/paas/docs/PdfReportTemplateConfig.md @@ -770,8 +770,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -953,6 +953,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportBarChartWithLabelsSettings.md b/paas/docs/ReportBarChartWithLabelsSettings.md index f0006a3d..2b004a9d 100644 --- a/paas/docs/ReportBarChartWithLabelsSettings.md +++ b/paas/docs/ReportBarChartWithLabelsSettings.md @@ -121,8 +121,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -208,6 +208,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportComponent.md b/paas/docs/ReportComponent.md index 321caaf8..6c944ba9 100644 --- a/paas/docs/ReportComponent.md +++ b/paas/docs/ReportComponent.md @@ -489,8 +489,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -629,6 +629,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportControllerApi.md b/paas/docs/ReportControllerApi.md index 67ec429b..14c75ad7 100644 --- a/paas/docs/ReportControllerApi.md +++ b/paas/docs/ReportControllerApi.md @@ -9,7 +9,7 @@ File downloadReport(@Nonnull UUID reportId) // downloadReport Report getReportById(@Nonnull String reportId) // Get Report (getReportById) PageDataReportInfo getReportInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable UUID reportTemplateId, @Nullable UUID userId, @Nullable Boolean includeCustomers, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // getReportInfos List getReportInfosByIds(@Nonnull List strReportIds) // getReportInfosByIds -PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // getReports +PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Boolean includeCustomers) // getReports Job requestReport(@Nonnull ReportRequest reportRequest) // requestReport File testReportAndDownload(@Nonnull ReportRequest reportRequest) // Download test report (testReportAndDownload) ``` @@ -93,7 +93,7 @@ Report getReportById(@Nonnull String reportId) Get Report (getReportById) -Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). +Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). ### Parameters @@ -126,7 +126,7 @@ getReportInfos | **page** | **Integer** | Sequence number of page starting from 0 | | | **reportTemplateId** | **UUID** | Report template id | [optional] | | **userId** | **UUID** | The user used for report generation. | [optional] | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | Case-insensitive 'substring' filter based on report's name or customer title | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] | @@ -161,7 +161,7 @@ getReportInfosByIds ## getReports ``` -PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) +PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Boolean includeCustomers) ``` **GET** `/api/v2/reports` @@ -178,6 +178,7 @@ getReports | **textSearch** | **String** | Case-insensitive 'substring' filter based on report's name or customer title | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | ### Return type @@ -216,7 +217,7 @@ File testReportAndDownload(@Nonnull ReportRequest reportRequest) Download test report (testReportAndDownload) -Generate and download test report. Available for users with 'TENANT_ADMIN' authority. +Generate and download test report. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. ### Parameters diff --git a/paas/docs/ReportRangeChartSettings.md b/paas/docs/ReportRangeChartSettings.md index a1f7c1c6..e6841cea 100644 --- a/paas/docs/ReportRangeChartSettings.md +++ b/paas/docs/ReportRangeChartSettings.md @@ -118,8 +118,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -225,6 +225,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportRequest.md b/paas/docs/ReportRequest.md index 9205cd5c..028aa90d 100644 --- a/paas/docs/ReportRequest.md +++ b/paas/docs/ReportRequest.md @@ -782,8 +782,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -965,6 +965,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportTemplate.md b/paas/docs/ReportTemplate.md index 02b5ea47..58249167 100644 --- a/paas/docs/ReportTemplate.md +++ b/paas/docs/ReportTemplate.md @@ -12,7 +12,7 @@ A JSON value representing the Report Template. | **id** | **ReportTemplateId** | JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template | [optional] | | **createdTime** | **Long** | Timestamp of the report template creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the report template can't be changed. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **name** | **String** | Report name | | | **format** | **TbReportFormat** | Report format | | | **type** | **ReportTemplateType** | Report template type | | @@ -791,8 +791,8 @@ A JSON value representing the Report Template. | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -974,6 +974,17 @@ A JSON value representing the Report Template. #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportTemplateConfig.md b/paas/docs/ReportTemplateConfig.md index affa425c..c7a53680 100644 --- a/paas/docs/ReportTemplateConfig.md +++ b/paas/docs/ReportTemplateConfig.md @@ -773,8 +773,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -956,6 +956,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/ReportTemplateControllerApi.md b/paas/docs/ReportTemplateControllerApi.md index 321073a9..e318d060 100644 --- a/paas/docs/ReportTemplateControllerApi.md +++ b/paas/docs/ReportTemplateControllerApi.md @@ -46,7 +46,7 @@ PageDataReportTemplateInfo getAllReportTemplateInfos(@Nonnull Integer pageSize, Get All Report Templates for current user (getAllReportTemplateInfos) -Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). +Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). ### Parameters @@ -57,7 +57,7 @@ Returns a page of report template info objects owned by the tenant or the custom | **page** | **Integer** | Sequence number of page starting from 0 | | | **typeList** | **List** | A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value. | [optional] [enum: REPORT, SUB_REPORT] | | **formatList** | **List** | A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value. | [optional] [enum: PDF, CSV] | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the report template name or customer title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name, ownerName] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -125,7 +125,7 @@ List getReportTemplatesByIds(@Nonnull List reportTem Get report templates by Report Template Ids (getReportTemplatesByIds) -Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). +Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). ### Parameters @@ -149,7 +149,7 @@ ReportTemplate saveReportTemplate(@Nonnull ReportTemplate reportTemplate) Save Report Template (saveReportTemplate) -Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). +Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). ### Parameters diff --git a/paas/docs/ReportTemplateInfo.md b/paas/docs/ReportTemplateInfo.md index 0e05b6bd..25265974 100644 --- a/paas/docs/ReportTemplateInfo.md +++ b/paas/docs/ReportTemplateInfo.md @@ -10,7 +10,7 @@ | **id** | **ReportTemplateId** | JSON object with the report template Id. Specify this field to update the report. Referencing non-existing report template Id will cause error. Omit this field to create new report template | [optional] | | **createdTime** | **Long** | Timestamp of the report template creation, in milliseconds | [optional] [readonly] | | **tenantId** | **TenantId** | JSON object with Tenant Id. Tenant Id of the report template can't be changed. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **name** | **String** | Report name | | | **format** | **TbReportFormat** | Report format | | | **type** | **ReportTemplateType** | Report template type | | diff --git a/paas/docs/ReportTimeSeriesChartSettings.md b/paas/docs/ReportTimeSeriesChartSettings.md index ab53e6aa..8ccb546a 100644 --- a/paas/docs/ReportTimeSeriesChartSettings.md +++ b/paas/docs/ReportTimeSeriesChartSettings.md @@ -109,8 +109,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -189,6 +189,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/Role.md b/paas/docs/Role.md index 10e8c7cf..78faaf48 100644 --- a/paas/docs/Role.md +++ b/paas/docs/Role.md @@ -13,11 +13,11 @@ A JSON value representing the role. | **createdTime** | **Long** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the role. May include: 'description' (string). | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **name** | **String** | Role Name | | | **type** | **RoleType** | Type of the role: generic or group | | -| **permissions** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with the set of permissions. Structure is specific for role type | | -| **excludedPermissions** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] | +| **permissions** | **com.fasterxml.jackson.databind.JsonNode** | Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping `Resource` enum names to arrays of `Operation` enum names allowed on that resource. The wildcard entry `{\"ALL\":[\"ALL\"]}` grants every operation on every resource. * GROUP — JSON array of `Operation` enum names that apply to the entity group this role is bound to via `GroupPermission.entityGroupId`. Only operations with `allowedForGroupRole=true` may appear (see `Operation` enum). The wildcard entry `[\"ALL\"]` grants every supported operation on the bound entity group. | | +| **excludedPermissions** | **com.fasterxml.jackson.databind.JsonNode** | Operations to subtract from those granted by `permissions`. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant of `permissions`: a JSON object mapping `Resource` enum names to non-empty arrays of `Operation` enum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g. `permissions={\"ALL\":[\"ALL\"]}` combined with `excludedPermissions={\"DEVICE\":[\"DELETE\"]}` grants everything except deleting devices). May be null or an empty object when no exclusions apply. | [optional] | | **version** | **Long** | | [optional] | | **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/SaveDeviceWithCredentialsRequest.md b/paas/docs/SaveDeviceWithCredentialsRequest.md index 35729bc4..fa5d6ab5 100644 --- a/paas/docs/SaveDeviceWithCredentialsRequest.md +++ b/paas/docs/SaveDeviceWithCredentialsRequest.md @@ -25,7 +25,7 @@ The JSON object with device and credentials. See method description above for ex | createdTime | Long | Timestamp of the device creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the device. May include: 'gateway' (boolean, whether the device is a gateway), 'description' (string), 'lastConnectedGateway' (string, UUID of the last gateway that connected this device). | [optional] | | tenantId | TenantId | JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. | [optional] [readonly] | -| customerId | CustomerId | JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. | [optional] [readonly] | +| customerId | CustomerId | JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. | [optional] | | name | String | Unique Device Name in scope of Tenant | [optional] | | type | String | Device Profile Name | [optional] | | label | String | Label that may be used in widgets | [optional] | diff --git a/paas/docs/ScheduledReportInfo.md b/paas/docs/ScheduledReportInfo.md index ae48c0c7..9ac27526 100644 --- a/paas/docs/ScheduledReportInfo.md +++ b/paas/docs/ScheduledReportInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | diff --git a/paas/docs/SchedulerEvent.md b/paas/docs/SchedulerEvent.md index 782d5dc4..0f59d605 100644 --- a/paas/docs/SchedulerEvent.md +++ b/paas/docs/SchedulerEvent.md @@ -13,7 +13,7 @@ A JSON value representing the Scheduler Event. | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | diff --git a/paas/docs/SchedulerEventControllerApi.md b/paas/docs/SchedulerEventControllerApi.md index d4b9bd7f..4ef4599e 100644 --- a/paas/docs/SchedulerEventControllerApi.md +++ b/paas/docs/SchedulerEventControllerApi.md @@ -181,7 +181,7 @@ PageDataScheduledReportInfo getScheduledReportEvents(@Nonnull String pageSize, @ Get Scheduled Report Events (getScheduledReportEvents) - Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). ### Parameters @@ -192,7 +192,7 @@ Get Scheduled Report Events (getScheduledReportEvents) | **page** | **String** | Sequence number of page starting from 0 | | | **reportTemplateId** | **UUID** | Report template id | [optional] | | **userId** | **UUID** | The user used for report generation. | [optional] | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the scheduler event name or customer title. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/paas/docs/SchedulerEventInfo.md b/paas/docs/SchedulerEventInfo.md index 27537612..ad00bb9e 100644 --- a/paas/docs/SchedulerEventInfo.md +++ b/paas/docs/SchedulerEventInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | diff --git a/paas/docs/SchedulerEventWithCustomerInfo.md b/paas/docs/SchedulerEventWithCustomerInfo.md index e3d14ee8..624269a2 100644 --- a/paas/docs/SchedulerEventWithCustomerInfo.md +++ b/paas/docs/SchedulerEventWithCustomerInfo.md @@ -11,7 +11,7 @@ | **createdTime** | **Long** | Timestamp of the scheduler event creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the scheduler event | [optional] | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] [readonly] | -| **customerId** | **CustomerId** | JSON object with Customer Id | [optional] [readonly] | +| **customerId** | **CustomerId** | JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. | [optional] | | **originatorId** | **EntityId** | JSON object with Originator Id | [optional] [readonly] | | **name** | **String** | scheduler event name | [optional] | | **type** | **String** | scheduler event type | [optional] | diff --git a/paas/docs/SimpleValueSourceConfig.md b/paas/docs/SimpleValueSourceConfig.md new file mode 100644 index 00000000..dcdfa458 --- /dev/null +++ b/paas/docs/SimpleValueSourceConfig.md @@ -0,0 +1,33 @@ + +# SimpleValueSourceConfig + +`org.thingsboard.client.model.SimpleValueSourceConfig` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **type** | **ValueSourceType** | | [optional] | +| **value** | **Double** | | [optional] | +| **latestKeyType** | **String** | | [optional] | +| **latestKey** | **String** | | [optional] | +| **entityKeyType** | **String** | | [optional] | +| **entityAlias** | **String** | | [optional] | +| **entityKey** | **String** | | [optional] | + + + +## Referenced Types + +#### ValueSourceType (enum) +`CONSTANT` | `LATEST_KEY` | `ENTITY` + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` +- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` +- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions + diff --git a/paas/docs/SolutionControllerApi.md b/paas/docs/SolutionControllerApi.md deleted file mode 100644 index 82a0f054..00000000 --- a/paas/docs/SolutionControllerApi.md +++ /dev/null @@ -1,125 +0,0 @@ -# SolutionControllerApi - -`ThingsboardClient` methods: - -``` -TenantSolutionTemplateDetails getSolutionTemplateDetails(@Nonnull String solutionTemplateId) // Get Solution template details (getSolutionTemplateDetails) -List getSolutionTemplateInfos() // Get Solution templates (getSolutionTemplateInfos) -TenantSolutionTemplateInstructions getSolutionTemplateInstructions(@Nonnull String solutionTemplateId) // Get Solution Template Instructions (getSolutionTemplateInstructions) -SolutionInstallResponse installSolutionTemplate(@Nonnull String solutionTemplateId) // Install Solution Template (installSolutionTemplate) -void uninstallSolutionTemplate(@Nonnull String solutionTemplateId) // Uninstall Solution Template (uninstallSolutionTemplate) -``` - - -## getSolutionTemplateDetails - -``` -TenantSolutionTemplateDetails getSolutionTemplateDetails(@Nonnull String solutionTemplateId) -``` - -**GET** `/api/solutions/templates/details/{solutionTemplateId}` - -Get Solution template details (getSolutionTemplateDetails) - -Get a solution template details based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **solutionTemplateId** | **String** | A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | - -### Return type - -**TenantSolutionTemplateDetails** - - -## getSolutionTemplateInfos - -``` -List getSolutionTemplateInfos() -``` - -**GET** `/api/solutions/templates/infos` - -Get Solution templates (getSolutionTemplateInfos) - -Get a list of solution template descriptors Security check is performed to verify that the user has 'READ' permission for the entity (entities). - -### Return type - -**List** - - -## getSolutionTemplateInstructions - -``` -TenantSolutionTemplateInstructions getSolutionTemplateInstructions(@Nonnull String solutionTemplateId) -``` - -**GET** `/api/solutions/templates/instructions/{solutionTemplateId}` - -Get Solution Template Instructions (getSolutionTemplateInstructions) - -Get a solution template instructions based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **solutionTemplateId** | **String** | A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | - -### Return type - -**TenantSolutionTemplateInstructions** - - -## installSolutionTemplate - -``` -SolutionInstallResponse installSolutionTemplate(@Nonnull String solutionTemplateId) -``` - -**POST** `/api/solutions/templates/{solutionTemplateId}/install` - -Install Solution Template (installSolutionTemplate) - -Install solution template based on the provided id Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **solutionTemplateId** | **String** | A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | - -### Return type - -**SolutionInstallResponse** - - -## uninstallSolutionTemplate - -``` -void uninstallSolutionTemplate(@Nonnull String solutionTemplateId) -``` - -**DELETE** `/api/solutions/templates/{solutionTemplateId}/delete` - -Uninstall Solution Template (uninstallSolutionTemplate) - -Uninstall solution template based on the provided id Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **solutionTemplateId** | **String** | A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | - -### Return type - -null (empty response body) - diff --git a/paas/docs/SolutionData.md b/paas/docs/SolutionData.md index 221517f7..554a5c7e 100644 --- a/paas/docs/SolutionData.md +++ b/paas/docs/SolutionData.md @@ -55,9 +55,10 @@ Portable solution package containing exported entities grouped by type. Represen #### EntityGroupExportData *(extends EntityExportData, entityType=`ENTITY_GROUP`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| permissions | List | | [optional] | -| groupOtaPackages | List | | [optional] | -| groupEntities | Boolean | | [optional] | +| permissions | List | Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group. | [optional] | +| groupOtaPackages | List | OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group. | [optional] | +| groupEntities | Boolean | Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default). | [optional] | +| memberIds | List | External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched. | [optional] | #### EntityViewExportData *(extends EntityExportData, entityType=`ENTITY_VIEW`)* *See EntityExportData for properties.* @@ -94,10 +95,13 @@ Portable solution package containing exported entities grouped by type. Represen #### TbResourceExportData *(extends EntityExportData, entityType=`TB_RESOURCE`)* *See EntityExportData for properties.* +#### UserExportData *(extends EntityExportData, entityType=`USER`)* +*See EntityExportData for properties.* + #### WidgetsBundleExportData *(extends EntityExportData, entityType=`WIDGETS_BUNDLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| widgets | List | | [optional] | +| widgets | List | List of widgets in the bundle | [optional] | | fqns | List | | [optional] | #### WidgetTypeExportData *(extends EntityExportData, entityType=`WIDGET_TYPE`)* diff --git a/paas/docs/SolutionExportImportControllerApi.md b/paas/docs/SolutionExportImportControllerApi.md index dd304f2b..dcf4a969 100644 --- a/paas/docs/SolutionExportImportControllerApi.md +++ b/paas/docs/SolutionExportImportControllerApi.md @@ -19,14 +19,14 @@ SolutionExportResponse exportSolution(@Nonnull SolutionExportRequest solutionExp Export Solution (exportSolution) -Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. +Exports a set of entities as a portable solution package. The request specifies entities to include via 'internalIds' (server-internal UUIDs) and/or 'externalIds' (looked up by the entity's stored externalId within the current tenant); at least one of the two collections must be non-empty, and entities reached via both sides are deduplicated. Optional export settings control inclusion of relations, attributes, and credentials. All resolved entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **solutionExportRequest** | **SolutionExportRequest** | Export request with entity IDs and optional settings. | | +| **solutionExportRequest** | **SolutionExportRequest** | Export request with internal and/or external entity IDs and optional settings. | | ### Return type @@ -67,7 +67,7 @@ SolutionValidationResult validateSolution(@Nonnull SolutionData solutionData) Validate Solution (validateSolution) -Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. +Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. ### Parameters diff --git a/paas/docs/SolutionExportRequest.md b/paas/docs/SolutionExportRequest.md index e2507dd2..ee491d35 100644 --- a/paas/docs/SolutionExportRequest.md +++ b/paas/docs/SolutionExportRequest.md @@ -9,7 +9,8 @@ Solution export request specifying which entities to include and export settings | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **entityIds** | **Set\** | | [optional] | +| **internalIds** | **Set\** | Set of internal entity IDs to export. The 'id' of each EntityId is the server-internal UUID. All listed entities must belong to the current tenant. Optional, but at least one of 'internalIds' or 'externalIds' must be non-empty. | [optional] | +| **externalIds** | **Set\** | Set of external entity IDs to export. The 'id' of each EntityId is the external UUID (as stored in the 'externalId' field on the entity in the current tenant). The server looks up each entity by 'externalId' and 'entityType' within the current tenant. Optional, but at least one of 'internalIds' or 'externalIds' must be non-empty. | [optional] | | **settings** | **EntityExportSettings** | Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data. | [optional] | @@ -27,6 +28,7 @@ Solution export request specifying which entities to include and export settings | exportCalculatedFields | Boolean | | [optional] | | exportPermissions | Boolean | | [optional] | | exportGroupEntities | Boolean | | [optional] | +| embedGroupMembers | Boolean | | [optional] | #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) diff --git a/paas/docs/SolutionExportResponse.md b/paas/docs/SolutionExportResponse.md index 48cd6206..ac63432f 100644 --- a/paas/docs/SolutionExportResponse.md +++ b/paas/docs/SolutionExportResponse.md @@ -61,9 +61,10 @@ Solution export response containing the exported solution data and any dependenc #### EntityGroupExportData *(extends EntityExportData, entityType=`ENTITY_GROUP`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| permissions | List | | [optional] | -| groupOtaPackages | List | | [optional] | -| groupEntities | Boolean | | [optional] | +| permissions | List | Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group. | [optional] | +| groupOtaPackages | List | OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group. | [optional] | +| groupEntities | Boolean | Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default). | [optional] | +| memberIds | List | External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched. | [optional] | #### EntityViewExportData *(extends EntityExportData, entityType=`ENTITY_VIEW`)* *See EntityExportData for properties.* @@ -100,10 +101,13 @@ Solution export response containing the exported solution data and any dependenc #### TbResourceExportData *(extends EntityExportData, entityType=`TB_RESOURCE`)* *See EntityExportData for properties.* +#### UserExportData *(extends EntityExportData, entityType=`USER`)* +*See EntityExportData for properties.* + #### WidgetsBundleExportData *(extends EntityExportData, entityType=`WIDGETS_BUNDLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| widgets | List | | [optional] | +| widgets | List | List of widgets in the bundle | [optional] | | fqns | List | | [optional] | #### WidgetTypeExportData *(extends EntityExportData, entityType=`WIDGET_TYPE`)* diff --git a/paas/docs/SolutionImportResult.md b/paas/docs/SolutionImportResult.md index 941ea6b1..9ee734ed 100644 --- a/paas/docs/SolutionImportResult.md +++ b/paas/docs/SolutionImportResult.md @@ -10,7 +10,7 @@ Result of a solution import operation. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **success** | **Boolean** | 'true' if all entities were imported successfully. | [optional] | -| **created** | **Map\** | Number of newly created entities per entity type. Entity types with zero created entities are omitted. | [optional] | +| **created** | **Map\** | Number of newly created entities per entity type. Entity types with zero created entities are omitted. Entity groups are reported under the ENTITY_GROUP key regardless of their inner type (e.g. a user group and a device group both contribute to ENTITY_GROUP). | [optional] | | **idMapping** | **Map\** | Mapping from external entity IDs (as they appear in the solution file) to the internal entity IDs assigned during import. | [optional] | diff --git a/paas/docs/SolutionInstallResponse.md b/paas/docs/SolutionInstallResponse.md deleted file mode 100644 index ec6cadbf..00000000 --- a/paas/docs/SolutionInstallResponse.md +++ /dev/null @@ -1,34 +0,0 @@ - -# SolutionInstallResponse - -`org.thingsboard.client.model.SolutionInstallResponse` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **dashboardGroupId** | **EntityGroupId** | Id of the group that contains main dashboard of the solution | [optional] | -| **dashboardId** | **DashboardId** | Id of the main dashboard of the solution | [optional] | -| **publicId** | **CustomerId** | Id of the public customer if solution has public entities | [optional] | -| **mainDashboardPublic** | **Boolean** | Is the main dashboard public | [optional] | -| **details** | **String** | Markdown with solution usage instructions | [optional] | -| **success** | **Boolean** | Indicates that template was installed successfully | [optional] | - - - -## Referenced Types - -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/paas/docs/SolutionTemplateLevel.md b/paas/docs/SolutionTemplateLevel.md deleted file mode 100644 index 5a6b9818..00000000 --- a/paas/docs/SolutionTemplateLevel.md +++ /dev/null @@ -1,25 +0,0 @@ - -# SolutionTemplateLevel - -`org.thingsboard.client.model.SolutionTemplateLevel` - -## Enum Values - - -* `MAKER` (value: `"MAKER"`) - -* `PROTOTYPE` (value: `"PROTOTYPE"`) - -* `STARTUP` (value: `"STARTUP"`) - - - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/paas/docs/SubscriptionExceptionErrorCode.md b/paas/docs/SubscriptionExceptionErrorCode.md index 86fbbfca..b2cfdf2d 100644 --- a/paas/docs/SubscriptionExceptionErrorCode.md +++ b/paas/docs/SubscriptionExceptionErrorCode.md @@ -20,8 +20,6 @@ Subscription error code * `NUMBER_6` (value: `new BigDecimal("6")`) -* `NUMBER_7` (value: `new BigDecimal("7")`) - --- diff --git a/paas/docs/TbChatRequest.md b/paas/docs/TbChatRequest.md index 6389386e..ba812366 100644 --- a/paas/docs/TbChatRequest.md +++ b/paas/docs/TbChatRequest.md @@ -18,7 +18,7 @@ #### TbUserMessage | Name | Type | Description | Notes | |------|------|-------------|-------| -| contents | List | | | +| contents | List | A list of content parts that make up the complete user prompt | | #### AiModelConfig | Name | Type | Description | Notes | diff --git a/paas/docs/TbUserMessage.md b/paas/docs/TbUserMessage.md index 6349a182..b2ce1ca0 100644 --- a/paas/docs/TbUserMessage.md +++ b/paas/docs/TbUserMessage.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **contents** | **List\** | | | +| **contents** | **List\** | A list of content parts that make up the complete user prompt | | diff --git a/paas/docs/TenantSolutionTemplateDetails.md b/paas/docs/TenantSolutionTemplateDetails.md deleted file mode 100644 index ac3006a7..00000000 --- a/paas/docs/TenantSolutionTemplateDetails.md +++ /dev/null @@ -1,36 +0,0 @@ - -# TenantSolutionTemplateDetails - -`org.thingsboard.client.model.TenantSolutionTemplateDetails` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **id** | **String** | ID of the solution template | [optional] | -| **title** | **String** | Template Title | [optional] | -| **level** | **SolutionTemplateLevel** | Level of the subscription that is required to unlock the template | [optional] | -| **installTimeoutMs** | **Long** | Timeout for the installation UI to wait while template is installing | [optional] | -| **tenantTelemetryKeys** | **List\** | What keys to delete during template uninstall | [optional] | -| **tenantAttributeKeys** | **List\** | What attributes to delete during template uninstall | [optional] | -| **imageUrls** | **List\** | | [optional] | -| **highlights** | **String** | | [optional] | -| **description** | **String** | | [optional] | -| **installed** | **Boolean** | | [optional] | - - - -## Referenced Types - -#### SolutionTemplateLevel (enum) -`MAKER` | `PROTOTYPE` | `STARTUP` - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/paas/docs/TenantSolutionTemplateInfo.md b/paas/docs/TenantSolutionTemplateInfo.md deleted file mode 100644 index 00db301f..00000000 --- a/paas/docs/TenantSolutionTemplateInfo.md +++ /dev/null @@ -1,37 +0,0 @@ - -# TenantSolutionTemplateInfo - -`org.thingsboard.client.model.TenantSolutionTemplateInfo` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **id** | **String** | ID of the solution template | [optional] | -| **title** | **String** | Template Title | [optional] | -| **level** | **SolutionTemplateLevel** | Level of the subscription that is required to unlock the template | [optional] | -| **installTimeoutMs** | **Long** | Timeout for the installation UI to wait while template is installing | [optional] | -| **tenantTelemetryKeys** | **List\** | What keys to delete during template uninstall | [optional] | -| **tenantAttributeKeys** | **List\** | What attributes to delete during template uninstall | [optional] | -| **previewImageUrl** | **String** | URL of the preview image | [optional] | -| **videoPreviewImageUrl** | **String** | Video preview image URL | [optional] | -| **previewMp4Url** | **String** | Video MP4 URL | [optional] | -| **previewWebmUrl** | **String** | Video WEBM URL | [optional] | -| **installed** | **Boolean** | Indicates that template is already installed for the current tenant | [optional] | - - - -## Referenced Types - -#### SolutionTemplateLevel (enum) -`MAKER` | `PROTOTYPE` | `STARTUP` - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/paas/docs/TenantSolutionTemplateInstructions.md b/paas/docs/TenantSolutionTemplateInstructions.md deleted file mode 100644 index d178378d..00000000 --- a/paas/docs/TenantSolutionTemplateInstructions.md +++ /dev/null @@ -1,33 +0,0 @@ - -# TenantSolutionTemplateInstructions - -`org.thingsboard.client.model.TenantSolutionTemplateInstructions` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **dashboardGroupId** | **EntityGroupId** | Id of the group that contains main dashboard of the solution | [optional] | -| **dashboardId** | **DashboardId** | Id of the main dashboard of the solution | [optional] | -| **publicId** | **CustomerId** | Id of the public customer if solution has public entities | [optional] | -| **mainDashboardPublic** | **Boolean** | Is the main dashboard public | [optional] | -| **details** | **String** | Markdown with solution usage instructions | [optional] | - - - -## Referenced Types - -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — e.g., `getId()`, `getName()` -- **Setter pattern:** `set(value)` — e.g., `setId(value)`, `setName(value)` -- **Null fields:** Getters return `null` for unset optional fields; they do not throw exceptions - diff --git a/paas/docs/ThingsboardCredentialsExpiredResponse.md b/paas/docs/ThingsboardCredentialsExpiredResponse.md index 591fbf8c..5f0b5443 100644 --- a/paas/docs/ThingsboardCredentialsExpiredResponse.md +++ b/paas/docs/ThingsboardCredentialsExpiredResponse.md @@ -27,7 +27,7 @@ `NUMBER_1` | `NUMBER_2` | `NUMBER_3` | `NUMBER_4` | `NUMBER_5` | `NUMBER_6` | `NUMBER_7` | `NUMBER_8` | `NUMBER_9` | `NUMBER_10` | … (13 values total) #### SubscriptionExceptionErrorCode (enum) -`NUMBER_1` | `NUMBER_2` | `NUMBER_3` | `NUMBER_4` | `NUMBER_5` | `NUMBER_6` | `NUMBER_7` +`NUMBER_1` | `NUMBER_2` | `NUMBER_3` | `NUMBER_4` | `NUMBER_5` | `NUMBER_6` --- diff --git a/paas/docs/ThingsboardErrorResponse.md b/paas/docs/ThingsboardErrorResponse.md index c02088e3..96a90fa7 100644 --- a/paas/docs/ThingsboardErrorResponse.md +++ b/paas/docs/ThingsboardErrorResponse.md @@ -26,7 +26,7 @@ `NUMBER_1` | `NUMBER_2` | `NUMBER_3` | `NUMBER_4` | `NUMBER_5` | `NUMBER_6` | `NUMBER_7` | `NUMBER_8` | `NUMBER_9` | `NUMBER_10` | … (13 values total) #### SubscriptionExceptionErrorCode (enum) -`NUMBER_1` | `NUMBER_2` | `NUMBER_3` | `NUMBER_4` | `NUMBER_5` | `NUMBER_6` | `NUMBER_7` +`NUMBER_1` | `NUMBER_2` | `NUMBER_3` | `NUMBER_4` | `NUMBER_5` | `NUMBER_6` --- diff --git a/paas/docs/TimeSeriesChartYAxisSettings.md b/paas/docs/TimeSeriesChartYAxisSettings.md index c48e5b47..7170b4c2 100644 --- a/paas/docs/TimeSeriesChartYAxisSettings.md +++ b/paas/docs/TimeSeriesChartYAxisSettings.md @@ -27,8 +27,8 @@ | **decimals** | **Integer** | | [optional] | | **interval** | **Double** | | [optional] | | **splitNumber** | **Integer** | | [optional] | -| **min** | **Double** | | [optional] | -| **max** | **Double** | | [optional] | +| **min** | **SimpleValueSourceConfig** | | [optional] | +| **max** | **SimpleValueSourceConfig** | | [optional] | @@ -45,12 +45,26 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### FontWeight (enum) `NORMAL` | `BOLD` | `_500` #### FontStyle (enum) `NORMAL` | `ITALIC` +#### ValueSourceType (enum) +`CONSTANT` | `LATEST_KEY` | `ENTITY` + --- ### Conventions diff --git a/paas/docs/TimeseriesChartComponent.md b/paas/docs/TimeseriesChartComponent.md index 085b3643..2c68b8df 100644 --- a/paas/docs/TimeseriesChartComponent.md +++ b/paas/docs/TimeseriesChartComponent.md @@ -216,8 +216,8 @@ | decimals | Integer | | [optional] | | interval | Double | | [optional] | | splitNumber | Integer | | [optional] | -| min | Double | | [optional] | -| max | Double | | [optional] | +| min | SimpleValueSourceConfig | | [optional] | +| max | SimpleValueSourceConfig | | [optional] | #### TimeSeriesChartXAxisSettings | Name | Type | Description | Notes | @@ -347,6 +347,17 @@ #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` +#### SimpleValueSourceConfig +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ValueSourceType | | [optional] | +| value | Double | | [optional] | +| latestKeyType | String | | [optional] | +| latestKey | String | | [optional] | +| entityKeyType | String | | [optional] | +| entityAlias | String | | [optional] | +| entityKey | String | | [optional] | + #### TimeSeriesChartNoAggregationBarWidthStrategy (enum) `GROUP` | `SEPARATE` diff --git a/paas/docs/UserControllerApi.md b/paas/docs/UserControllerApi.md index 1d5d208f..f48d3787 100644 --- a/paas/docs/UserControllerApi.md +++ b/paas/docs/UserControllerApi.md @@ -234,7 +234,7 @@ Returns a page of user info objects owned by the tenant or the customer of a cur |------------- | ------------- | ------------- | -------------| | **pageSize** | **Integer** | Maximum amount of entities in a one page | | | **page** | **Integer** | Sequence number of page starting from 0 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the user email. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, firstName, lastName, email] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | @@ -264,7 +264,7 @@ Returns a page of user info objects owned by the specified customer. You can spe | **customerId** | **String** | A string value representing the customer 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 | | -| **includeCustomers** | **Boolean** | Include customer or sub-customer entities | [optional] | +| **includeCustomers** | **Boolean** | Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. | [optional] | | **textSearch** | **String** | The case insensitive 'substring' filter based on the user email. | [optional] | | **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, firstName, lastName, email] | | **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | diff --git a/paas/docs/UserExportData.md b/paas/docs/UserExportData.md new file mode 100644 index 00000000..788a8ae3 --- /dev/null +++ b/paas/docs/UserExportData.md @@ -0,0 +1,539 @@ + +# UserExportData + +`org.thingsboard.client.model.UserExportData` + +**Extends:** **EntityExportData** + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### EntityExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| 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] | +| entityType | EntityType | | | + +#### ExportableEntity +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| createdTime | Long | | [optional] | +| id | EntityId | | [optional] | +| name | String | | [optional] | +| tenantId | TenantId | | [optional] | + +#### EntityRelation +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| from | EntityId | JSON object with [from] Entity Id. | | +| to | EntityId | JSON object with [to] Entity Id. | | +| type | String | String value of relation type. | | +| typeGroup | RelationTypeGroup | Represents the type group of the relation. | | +| version | Long | | [optional] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the relation. | [optional] | + +#### AttributeExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| lastUpdateTs | Long | | [optional] | +| booleanValue | Boolean | | [optional] | +| strValue | String | | [optional] | +| longValue | Long | | [optional] | +| doubleValue | Double | | [optional] | +| jsonValue | String | | [optional] | + +#### CalculatedField +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | CalculatedFieldId | JSON object with the Calculated Field Id. Referencing non-existing Calculated Field Id will cause error. | [optional] | +| createdTime | Long | Timestamp of the calculated field creation, in milliseconds | [optional] [readonly] | +| tenantId | TenantId | | [optional] | +| entityId | EntityId | | [optional] | +| type | CalculatedFieldType | | [optional] | +| name | String | User defined name of the calculated field. | [optional] | +| debugSettings | DebugSettings | Debug settings object. | [optional] | +| configurationVersion | Integer | Version of calculated field configuration. | [optional] | +| _configuration | CalculatedFieldConfiguration | | | +| version | Long | | [optional] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the calculated field | [optional] | +| debugMode | Boolean | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +#### RelationTypeGroup (enum) +`COMMON` | `DASHBOARD` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` + +#### CalculatedFieldType (enum) +`SIMPLE` | `SCRIPT` | `GEOFENCING` | `ALARM` | `PROPAGATION` | `RELATED_ENTITIES_AGGREGATION` | `ENTITY_AGGREGATION` + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failuresEnabled | Boolean | Debug failures. | [optional] | +| allEnabled | Boolean | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| allEnabledUntil | Long | Timestamp of the end time for the processing debug events. | [optional] | + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | +| output | Output | | [optional] | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| clearRule | AlarmRule | | [optional] | +| createRules | Map | | | +| propagate | Boolean | | [optional] | +| propagateRelationTypes | List | | [optional] | +| propagateToOwner | Boolean | | [optional] | +| propagateToOwnerHierarchy | Boolean | | [optional] | +| propagateToTenant | Boolean | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| interval | AggInterval | | | +| metrics | Map | | | +| produceIntermediateResult | Boolean | | [optional] | +| watermark | Watermark | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entityCoordinates | EntityCoordinates | | | +| scheduledUpdateEnabled | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | +| zoneGroups | Map | | | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| applyExpressionToResolvedArguments | Boolean | | [optional] | +| arguments | Map | | | +| expression | String | | [optional] | +| relation | RelationPathLevel | | | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| deduplicationIntervalInSec | Long | | [optional] | +| metrics | Map | | | +| relation | RelationPathLevel | | | +| scheduledUpdateEnabled | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | +| useLatestTs | Boolean | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| useLatestTs | Boolean | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| decimalsByDefault | Integer | | [optional] | +| name | String | | [optional] | +| scope | AttributeScope | | [optional] | +| strategy | Object | | [optional] | +| type | String | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| refEntityKey | ReferencedEntityKey | | [optional] | +| defaultValue | String | | [optional] | +| limit | Integer | | [optional] | +| timeWindow | Long | | [optional] | + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitudeKeyName | String | | | +| longitudeKeyName | String | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeterKeyName | String | | | +| reportStrategy | GeofencingReportStrategy | | | +| createRelationsWithMatchedZones | Boolean | | [optional] | +| relationType | String | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### AlarmRule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| condition | AlarmCondition | | | +| alarmDetails | String | | [optional] | +| dashboardId | DashboardId | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relationType | String | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | String | | [optional] | +| input | AggInput | | [optional] | +| defaultValue | Double | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | +| durationSec | Long | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | Long | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | Long | | [optional] | +| saveTimeSeries | Boolean | | [optional] | +| saveLatest | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| sendAttributesUpdatedNotification | Boolean | | [optional] | +| updateAttributesOnlyOnValueChange | Boolean | | [optional] | +| saveAttribute | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AlarmCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | +| type | String | | | + +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | String | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List | | | +| operation | AlarmRuleComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | String | | | + +#### AlarmConditionValueAlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | AlarmSchedule | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* + +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | String | | [optional] | +| items | List | | [optional] | + +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | String | | [optional] | +| daysOfWeek | Set | | [optional] | +| startsOn | Long | | [optional] | +| endsOn | Long | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Long | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Integer | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | String | | | +| valueType | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List | | | + +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List | | [optional] | + +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | +| ignoreCase | Boolean | | [optional] | + +#### CustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| enabled | Boolean | | [optional] | +| dayOfWeek | Integer | | [optional] | +| startsOn | Long | | [optional] | +| endsOn | Long | | [optional] | + +#### AlarmRuleStringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | String | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmRuleNumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Double | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmRuleBooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Boolean | | [optional] | +| dynamicValueArgument | String | | [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/paas/docs/WhiteLabelingParams.md b/paas/docs/WhiteLabelingParams.md index 67a046d0..96bd2438 100644 --- a/paas/docs/WhiteLabelingParams.md +++ b/paas/docs/WhiteLabelingParams.md @@ -11,6 +11,7 @@ A JSON value representing the white labeling configuration |------------ | ------------- | ------------- | -------------| | **logoImageUrl** | **String** | Logo image URL | [optional] | | **logoImageHeight** | **Integer** | The height of a logo container. Logo image will be automatically scaled. | [optional] | +| **collapsedLogoImageUrl** | **String** | Logo shown when side menu is collapsed | [optional] | | **appTitle** | **String** | White-labeled name of the platform | [optional] | | **favicon** | **Favicon** | JSON object that contains website icon url and type | [optional] | | **paletteSettings** | **PaletteSettings** | Complex JSON that describes structure of the Angular Material Palette. See [theming](https://material.angular.io/guide/theming) for more details | [optional] | diff --git a/paas/docs/WidgetsBundleExportData.md b/paas/docs/WidgetsBundleExportData.md index 029b6f84..6b6316ad 100644 --- a/paas/docs/WidgetsBundleExportData.md +++ b/paas/docs/WidgetsBundleExportData.md @@ -9,7 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **widgets** | **List\** | | [optional] | +| **widgets** | **List\** | List of widgets in the bundle | [optional] | | **fqns** | **List\** | | [optional] | diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index c19900c6..a008732d 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -12,11 +12,11 @@ "name": "Apache License Version 2.0", "url": "https://github.com/thingsboard/thingsboard/blob/master/LICENSE" }, - "version": "4.4.0PAAS" + "version": "4.3.1.4.0PAAS" }, "servers": [ { - "url": "http://localhost:8080", + "url": "http://localhost:35943", "description": "Generated server url" } ], @@ -29,6 +29,10 @@ "name": "ai-chat-controller", "description": "Ai Chat Controller" }, + { + "name": "ai-device-dashboard-controller", + "description": "Ai Device Dashboard Controller" + }, { "name": "ai-model-controller", "description": "Ai Model Controller" @@ -297,10 +301,6 @@ "name": "sign-up-controller", "description": "Sign Up Controller" }, - { - "name": "solution-controller", - "description": "Solution Controller" - }, { "name": "solution-export-import-controller", "description": "Solution Export Import Controller" @@ -4844,13 +4844,21 @@ "schema": { "type": "string" } + }, + { + "name": "Accept-Language", + "in": "header", + "required": false, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JsonNode" } } }, @@ -5160,80 +5168,49 @@ ] } }, - "/api/ai/model": { - "get": { + "/api/ai/devices/{deviceId}/dashboard": { + "post": { "tags": [ - "ai-model-controller" + "ai-device-dashboard-controller" ], - "summary": "Get AI models (getAiModels)", - "description": "Returns a page of AI models. You can specify parameters to filter the 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": "getAiModels", + "summary": "generateDashboard", + "operationId": "generateDashboard", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "deviceId", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "format": "uuid" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "X-Authorization", + "in": "header", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the AI model name, provider and model ID.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "provider", - "modelId" - ] - } - }, - { - "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": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAiModel" + "$ref": "#/components/schemas/JsonNode" } } } @@ -5249,7 +5226,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -5367,31 +5344,82 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/ai/model": { + "get": { "tags": [ "ai-model-controller" ], - "summary": "Create or update AI model (saveAiModel)", - "description": "Creates or updates an AI model record.\n\n• **Create:** Omit the `id` to create a new record. The platform assigns a UUID to the new record and returns it in the `id` field of the response.\n\n• **Update:** Include an existing `id` to modify that record. If no matching record exists, the API responds with **404 Not Found**.\n\nTenant ID for the AI model will be taken from the authenticated user making the request, regardless of any value provided in the request body.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveAiModel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiModel" - } + "summary": "Get AI models (getAiModels)", + "description": "Returns a page of AI models. You can specify parameters to filter the 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": "getAiModels", + "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": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the AI model name, provider and model ID.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "provider", + "modelId" + ] + } + }, + { + "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/AiModel" + "$ref": "#/components/schemas/PageDataAiModel" } } } @@ -5407,7 +5435,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -5525,21 +5553,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ai/model/chat": { + }, "post": { "tags": [ "ai-model-controller" ], - "summary": "Send request to AI chat model (sendChatRequest)", - "description": "Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model and returns either the generated answer or an error envelope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "sendChatRequest", + "summary": "Create or update AI model (saveAiModel)", + "description": "Creates or updates an AI model record.\n\n• **Create:** Omit the `id` to create a new record. The platform assigns a UUID to the new record and returns it in the `id` field of the response.\n\n• **Update:** Include an existing `id` to modify that record. If no matching record exists, the API responds with **404 Not Found**.\n\nTenant ID for the AI model will be taken from the authenticated user making the request, regardless of any value provided in the request body.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAiModel", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbChatRequest" + "$ref": "#/components/schemas/AiModel" } } }, @@ -5551,7 +5577,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbChatResponse" + "$ref": "#/components/schemas/AiModel" } } } @@ -5687,34 +5713,31 @@ ] } }, - "/api/ai/model/{modelUuid}": { - "get": { + "/api/ai/model/chat": { + "post": { "tags": [ "ai-model-controller" ], - "summary": "Get AI model by ID (getAiModelById)", - "description": "Fetches an AI model record by its `id`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAiModelById", - "parameters": [ - { - "name": "modelUuid", - "in": "path", - "description": "ID of the AI model record", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "de7900d4-30e2-11f0-9cd2-0242ac120002" - } - ], + "summary": "Send request to AI chat model (sendChatRequest)", + "description": "Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model and returns either the generated answer or an error envelope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "sendChatRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbChatRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AiModel" + "$ref": "#/components/schemas/TbChatResponse" } } } @@ -5730,7 +5753,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -5848,14 +5871,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ai/model/{modelUuid}": { + "get": { "tags": [ "ai-model-controller" ], - "summary": "Delete AI model by ID (deleteAiModelById)", - "description": "Deletes the AI model record by its `id`. If a record with the specified `id` exists, the record is deleted and the endpoint returns `true`. If no such record exists, the endpoint returns `false`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteAiModelById", + "summary": "Get AI model by ID (getAiModelById)", + "description": "Fetches an AI model record by its `id`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAiModelById", "parameters": [ { "name": "modelUuid", @@ -5875,7 +5900,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/AiModel" } } } @@ -6009,22 +6034,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ai/solution/infos": { - "get": { + }, + "delete": { "tags": [ - "ai-solution-controller" + "ai-model-controller" + ], + "summary": "Delete AI model by ID (deleteAiModelById)", + "description": "Deletes the AI model record by its `id`. If a record with the specified `id` exists, the record is deleted and the endpoint returns `true`. If no such record exists, the endpoint returns `false`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAiModelById", + "parameters": [ + { + "name": "modelUuid", + "in": "path", + "description": "ID of the AI model record", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "example": "de7900d4-30e2-11f0-9cd2-0242ac120002" + } ], - "summary": "getSolutions", - "operationId": "getSolutions", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "boolean" } } } @@ -6160,13 +6197,13 @@ ] } }, - "/api/ai/solution/start": { - "post": { + "/api/ai/solution/infos": { + "get": { "tags": [ "ai-solution-controller" ], - "summary": "startNew", - "operationId": "startNew", + "summary": "getSolutions", + "operationId": "getSolutions", "responses": { "200": { "description": "OK", @@ -6189,7 +6226,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6309,24 +6346,13 @@ ] } }, - "/api/ai/solution/{solutionId}": { - "get": { + "/api/ai/solution/start": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "getSolution", - "operationId": "getSolution", - "parameters": [ - { - "name": "solutionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "summary": "startNew", + "operationId": "startNew", "responses": { "200": { "description": "OK", @@ -6349,158 +6375,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { - "tags": [ - "ai-solution-controller" - ], - "summary": "deleteSolution", - "operationId": "deleteSolution", - "parameters": [ - { - "name": "solutionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6620,13 +6495,13 @@ ] } }, - "/api/ai/solution/{solutionId}/create": { - "post": { + "/api/ai/solution/{solutionId}": { + "get": { "tags": [ "ai-solution-controller" ], - "summary": "createSolution", - "operationId": "createSolution", + "summary": "getSolution", + "operationId": "getSolution", "parameters": [ { "name": "solutionId", @@ -6660,7 +6535,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6778,15 +6653,13 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ai/solution/{solutionId}/install": { - "post": { + }, + "delete": { "tags": [ "ai-solution-controller" ], - "summary": "installSolution", - "operationId": "installSolution", + "summary": "deleteSolution", + "operationId": "deleteSolution", "parameters": [ { "name": "solutionId", @@ -6796,26 +6669,11 @@ "type": "string", "format": "uuid" } - }, - { - "name": "X-Authorization", - "in": "header", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -6828,7 +6686,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6948,13 +6806,13 @@ ] } }, - "/api/ai/solution/{solutionId}/uninstall": { - "delete": { + "/api/ai/solution/{solutionId}/create": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "uninstallSolution", - "operationId": "uninstallSolution", + "summary": "createSolution", + "operationId": "createSolution", "parameters": [ { "name": "solutionId", @@ -6964,14 +6822,6 @@ "type": "string", "format": "uuid" } - }, - { - "name": "X-Authorization", - "in": "header", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -6996,7 +6846,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7116,13 +6966,13 @@ ] } }, - "/api/ai/solution/{solutionId}/{dataKey}": { - "put": { + "/api/ai/solution/{solutionId}/install": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "updateData", - "operationId": "updateData", + "summary": "installSolution", + "operationId": "installSolution", "parameters": [ { "name": "solutionId", @@ -7134,24 +6984,14 @@ } }, { - "name": "dataKey", - "in": "path", + "name": "X-Authorization", + "in": "header", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -7174,7 +7014,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7294,13 +7134,13 @@ ] } }, - "/api/ai/solution/{solutionId}/{step}/chat": { - "post": { + "/api/ai/solution/{solutionId}/uninstall": { + "delete": { "tags": [ "ai-solution-controller" ], - "summary": "chat", - "operationId": "chat", + "summary": "uninstallSolution", + "operationId": "uninstallSolution", "parameters": [ { "name": "solutionId", @@ -7312,24 +7152,14 @@ } }, { - "name": "step", - "in": "path", + "name": "X-Authorization", + "in": "header", "required": true, "schema": { - "$ref": "#/components/schemas/SolutionStep" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -7352,7 +7182,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7472,13 +7302,13 @@ ] } }, - "/api/ai/solution/{solutionId}/{step}/clear": { - "delete": { + "/api/ai/solution/{solutionId}/{dataKey}": { + "put": { "tags": [ "ai-solution-controller" ], - "summary": "clearStep", - "operationId": "clearStep", + "summary": "updateData", + "operationId": "updateData", "parameters": [ { "name": "solutionId", @@ -7490,156 +7320,14 @@ } }, { - "name": "step", + "name": "dataKey", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/SolutionStep" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + "type": "string" } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/ai/tools/resolve-approval": { - "post": { - "tags": [ - "ai-tool-controller" ], - "summary": "resolveToolApproval", - "operationId": "resolveToolApproval", "requestBody": { "content": { "application/json": { @@ -7672,7 +7360,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7792,78 +7480,49 @@ ] } }, - "/api/alarm/{alarmId}/comment": { - "get": { + "/api/ai/solution/{solutionId}/{step}/chat": { + "post": { "tags": [ - "alarm-comment-controller" + "ai-solution-controller" ], - "summary": "Get Alarm comments (getAlarmComments)", - "description": "Returns a page of alarm comments for specified alarm. You can specify parameters to filter the 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": "getAlarmComments", + "summary": "chat", + "operationId": "chat", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm 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": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "id" - ] + "format": "uuid" } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "step", + "in": "path", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/SolutionStep" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmCommentInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -7879,7 +7538,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7997,46 +7656,37 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/ai/solution/{solutionId}/{step}/clear": { + "delete": { "tags": [ - "alarm-comment-controller" + "ai-solution-controller" ], - "summary": "Create or update Alarm Comment ", - "description": "Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. \n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. \n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveAlarmComment", + "summary": "clearStep", + "operationId": "clearStep", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "name": "step", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SolutionStep" } } ], - "requestBody": { - "description": "A JSON value representing the comment.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmComment" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmComment" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -8049,7 +7699,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -8169,37 +7819,33 @@ ] } }, - "/api/alarm/{alarmId}/comment/{commentId}": { - "delete": { + "/api/ai/tools/resolve-approval": { + "post": { "tags": [ - "alarm-comment-controller" + "ai-tool-controller" ], - "summary": "Delete Alarm comment (deleteAlarmComment)", - "description": "Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteAlarmComment", - "parameters": [ - { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "resolveToolApproval", + "operationId": "resolveToolApproval", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, - { - "name": "commentId", - "in": "path", - "description": "A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -8212,7 +7858,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -8332,32 +7978,78 @@ ] } }, - "/api/alarm": { - "post": { + "/api/alarm/{alarmId}/comment": { + "get": { "tags": [ - "alarm-controller" + "alarm-comment-controller" ], - "summary": "Create or Update Alarm (saveAlarm)", - "description": "Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. \n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveAlarm", - "requestBody": { - "description": "A JSON value representing the alarm.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Alarm" - } + "summary": "Get Alarm comments (getAlarmComments)", + "description": "Returns a page of alarm comments for specified alarm. You can specify parameters to filter the 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": "getAlarmComments", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "id" + ] + } + }, + { + "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/Alarm" + "$ref": "#/components/schemas/PageDataAlarmCommentInfo" } } } @@ -8373,7 +8065,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -8491,83 +8183,43 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/highestSeverity/{entityType}/{entityId}": { - "get": { + }, + "post": { "tags": [ - "alarm-controller" + "alarm-comment-controller" ], - "summary": "Get Highest Alarm Severity (getHighestAlarmSeverity)", - "description": "Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getHighestAlarmSeverity", + "summary": "Create or update Alarm Comment ", + "description": "Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. \n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. \n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveAlarmComment", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "alarmId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "searchStatus", - "in": "query", - "description": "A string value representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] - } - }, - { - "name": "status", - "in": "query", - "description": "A string value representing one of the AlarmStatus enumeration value", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ACTIVE_UNACK", - "ACTIVE_ACK", - "CLEARED_UNACK", - "CLEARED_ACK" - ] - } - }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } } ], + "requestBody": { + "description": "A JSON value representing the comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmComment" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmSeverity" + "$ref": "#/components/schemas/AlarmComment" } } } @@ -8583,7 +8235,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -8703,14 +8355,14 @@ ] } }, - "/api/alarm/info/{alarmId}": { - "get": { + "/api/alarm/{alarmId}/comment/{commentId}": { + "delete": { "tags": [ - "alarm-controller" + "alarm-comment-controller" ], - "summary": "Get Alarm Info (getAlarmInfoById)", - "description": "Fetch the Alarm Info object based on the provided Alarm Id. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmInfoById", + "summary": "Delete Alarm comment (deleteAlarmComment)", + "description": "Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteAlarmComment", "parameters": [ { "name": "alarmId", @@ -8720,18 +8372,20 @@ "schema": { "type": "string" } + }, + { + "name": "commentId", + "in": "path", + "description": "A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -8864,65 +8518,32 @@ ] } }, - "/api/alarm/types": { - "get": { + "/api/alarm": { + "post": { "tags": [ "alarm-controller" ], - "summary": "Get Alarm Types (getAlarmTypes)", - "description": "Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request.", - "operationId": "getAlarmTypes", - "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 of next alarm fields: type, severity or status", - "required": false, - "schema": { - "type": "string" + "summary": "Create or Update Alarm (saveAlarm)", + "description": "Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. \n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. \n\nThe alarm originator is an immutable routing key: when updating an existing alarm, the 'originator' in the request body must match the stored alarm's originator. A request that references an existing alarm id but carries a different originator is treated as a lookup miss and causes a 'Not Found' error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveAlarm", + "requestBody": { + "description": "A JSON value representing the alarm.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntitySubtype" + "$ref": "#/components/schemas/Alarm" } } } @@ -8938,7 +8559,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -9058,23 +8679,72 @@ ] } }, - "/api/alarm/{alarmId}": { + "/api/alarm/highestSeverity/{entityType}/{entityId}": { "get": { "tags": [ "alarm-controller" ], - "summary": "Get Alarm (getAlarmById)", - "description": "Fetch the Alarm object based on the provided Alarm Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmById", + "summary": "Get Highest Alarm Severity (getHighestAlarmSeverity)", + "description": "Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getHighestAlarmSeverity", "parameters": [ { - "name": "alarmId", + "name": "entityType", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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": "searchStatus", + "in": "query", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ] + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -9083,7 +8753,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/AlarmSeverity" } } } @@ -9217,14 +8887,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/alarm/info/{alarmId}": { + "get": { "tags": [ "alarm-controller" ], - "summary": "Delete Alarm (deleteAlarm)", - "description": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteAlarm", + "summary": "Get Alarm Info (getAlarmInfoById)", + "description": "Fetch the Alarm Info object based on the provided Alarm Id. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmInfoById", "parameters": [ { "name": "alarmId", @@ -9242,7 +8914,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/AlarmInfo" } } } @@ -9378,23 +9050,56 @@ ] } }, - "/api/alarm/{alarmId}/ack": { - "post": { + "/api/alarm/types": { + "get": { "tags": [ "alarm-controller" ], - "summary": "Acknowledge Alarm (ackAlarm)", - "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "ackAlarm", + "summary": "Get Alarm Types (getAlarmTypes)", + "description": "Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request.", + "operationId": "getAlarmTypes", "parameters": [ { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -9403,7 +9108,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmInfo" + "$ref": "#/components/schemas/PageDataEntitySubtype" } } } @@ -9419,7 +9124,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -9539,14 +9244,14 @@ ] } }, - "/api/alarm/{alarmId}/assign": { - "delete": { + "/api/alarm/{alarmId}": { + "get": { "tags": [ "alarm-controller" ], - "summary": "Unassign Alarm (unassignAlarm)", - "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "unassignAlarm", + "summary": "Get Alarm (getAlarmById)", + "description": "Fetch the Alarm object based on the provided Alarm Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmById", "parameters": [ { "name": "alarmId", @@ -9698,16 +9403,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/{alarmId}/assign/{assigneeId}": { - "post": { + }, + "delete": { "tags": [ "alarm-controller" ], - "summary": "Assign/Reassign Alarm (assignAlarm)", - "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "assignAlarm", + "summary": "Delete Alarm (deleteAlarm)", + "description": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteAlarm", "parameters": [ { "name": "alarmId", @@ -9717,15 +9420,6 @@ "schema": { "type": "string" } - }, - { - "name": "assigneeId", - "in": "path", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -9734,7 +9428,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "type": "boolean" } } } @@ -9750,7 +9444,499 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/alarm/{alarmId}/ack": { + "post": { + "tags": [ + "alarm-controller" + ], + "summary": "Acknowledge Alarm (ackAlarm)", + "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "ackAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/alarm/{alarmId}/assign": { + "delete": { + "tags": [ + "alarm-controller" + ], + "summary": "Unassign Alarm (unassignAlarm)", + "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "unassignAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/alarm/{alarmId}/assign/{assigneeId}": { + "post": { + "tags": [ + "alarm-controller" + ], + "summary": "Assign/Reassign Alarm (assignAlarm)", + "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "assignAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "assigneeId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -14566,7 +14752,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -15131,7 +15317,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -33048,7 +33234,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -33589,7 +33775,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -35085,7 +35271,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -36764,7 +36950,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -39737,7 +39923,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -41745,7 +41931,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -47211,7 +47397,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -49639,7 +49825,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -56506,13 +56692,13 @@ "entity-group-controller" ], "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "description": "Share the entity group with the specified user group using the specified role. Unlike the 'shareEntityGroup' API method, this method is designed for sharing 'down' the owner hierarchy and does not require 'WRITE' permission for the shared entity group or the target user group. In particular, it allows the current user to re-share an entity group that was shared with them by the parent owner: for example, a customer user may re-share a tenant-owned dashboard group with a user group of their sub-customer.\n\nThe following security checks are performed:\n\n* the target user group must belong to the current user's owner or to one of its sub-customers;\n* the current user must have the 'SHARE_GROUP' operation granted for the shared entity group: either as a generic permission for the corresponding entity group resource (applies only if the shared entity group belongs to the current user's owner hierarchy), or as a group permission created when the entity group was shared with the current user's user group using a group role that includes the 'SHARE_GROUP' operation;\n* the specified role must be a group role that is readable by the current user, so it must belong to the current user's owner or to one of its sub-customers;\n* the operations of the specified role must be a subset of the operations the current user was granted for the shared entity group (always passes if the current user was granted the 'ALL' operation).\n\nIf the specified role also includes the 'SHARE_GROUP' operation, the members of the target user group will be able to re-share the entity group further down their own owner hierarchy in the same way.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "shareEntityGroupToChildOwnerUserGroup", "parameters": [ { "name": "entityGroupId", "in": "path", - "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "ID of the entity group to share", "required": true, "schema": { "type": "string" @@ -56521,7 +56707,7 @@ { "name": "userGroupId", "in": "path", - "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "ID of the user group to share the entity group with. The user group must belong to the current user's owner or to one of its sub-customers", "required": true, "schema": { "type": "string" @@ -56530,7 +56716,7 @@ { "name": "roleId", "in": "path", - "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "ID of the group role that defines the set of operations to grant to the target user group", "required": true, "schema": { "type": "string" @@ -64506,7 +64692,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -66014,7 +66200,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -67854,35 +68040,195 @@ ] } }, - "/api/entityGroup/{entityGroupId}/groupPermissions": { - "get": { + "/api/entityGroup/{entityGroupId}/groupPermissions": { + "get": { + "tags": [ + "group-permission-controller" + ], + "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", + "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupPermissions", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/groupPermission": { + "post": { "tags": [ "group-permission-controller" ], - "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", - "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupPermissions", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Group Permission (saveGroupPermission)", + "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveGroupPermission", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupPermission" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } + "$ref": "#/components/schemas/GroupPermission" } } } @@ -67898,7 +68244,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -68018,31 +68364,41 @@ ] } }, - "/api/groupPermission": { - "post": { + "/api/groupPermission/info/{groupPermissionId}": { + "get": { "tags": [ "group-permission-controller" ], - "summary": "Create Or Update Group Permission (saveGroupPermission)", - "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveGroupPermission", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupPermission" - } + "summary": "Get Group Permission Info (getGroupPermissionInfoById)", + "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionInfoById", + "parameters": [ + { + "name": "groupPermissionId", + "in": "path", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "isUserGroup", + "in": "query", + "description": "Load additional information about User('true') or Entity Group('false).", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermission" + "$ref": "#/components/schemas/GroupPermissionInfo" } } } @@ -68058,7 +68414,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -68178,14 +68534,14 @@ ] } }, - "/api/groupPermission/info/{groupPermissionId}": { + "/api/groupPermission/{groupPermissionId}": { "get": { "tags": [ "group-permission-controller" ], - "summary": "Get Group Permission Info (getGroupPermissionInfoById)", - "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getGroupPermissionInfoById", + "summary": "Get Group Permission (getGroupPermissionById)", + "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionById", "parameters": [ { "name": "groupPermissionId", @@ -68195,15 +68551,6 @@ "schema": { "type": "string" } - }, - { - "name": "isUserGroup", - "in": "query", - "description": "Load additional information about User('true') or Entity Group('false).", - "required": true, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -68212,7 +68559,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupPermissionInfo" + "$ref": "#/components/schemas/GroupPermission" } } } @@ -68346,16 +68693,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/groupPermission/{groupPermissionId}": { - "get": { + }, + "delete": { "tags": [ "group-permission-controller" ], - "summary": "Get Group Permission (getGroupPermissionById)", - "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getGroupPermissionById", + "summary": "Delete group permission (deleteGroupPermission)", + "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteGroupPermission", "parameters": [ { "name": "groupPermissionId", @@ -68369,14 +68714,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GroupPermission" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -68507,28 +68845,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/userGroup/groupPermissions/info": { + "post": { "tags": [ "group-permission-controller" ], - "summary": "Delete group permission (deleteGroupPermission)", - "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteGroupPermission", - "parameters": [ - { - "name": "groupPermissionId", - "in": "path", - "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", + "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "loadUserGroupPermissionInfos", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "JSON array of group permission objects", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -68541,7 +68894,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -68661,28 +69014,25 @@ ] } }, - "/api/userGroup/groupPermissions/info": { - "post": { + "/api/userGroup/{userGroupId}/groupPermissions": { + "get": { "tags": [ "group-permission-controller" ], - "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", - "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "loadUserGroupPermissionInfos", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "JSON array of group permission objects", - "items": { - "$ref": "#/components/schemas/GroupPermission" - } - } + "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", + "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserGroupPermissions", + "parameters": [ + { + "name": "userGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", @@ -68708,7 +69058,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -68828,35 +69178,44 @@ ] } }, - "/api/userGroup/{userGroupId}/groupPermissions": { - "get": { + "/api/image": { + "post": { "tags": [ - "group-permission-controller" + "image-controller" ], - "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", - "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\nThere are two types of group permissions depending on the Role type: \n\n * **Generic permission** — uses a GENERIC role. The 'entityGroupId' field must be null (or omitted). Grants the role's operations to all entities within the owner's scope (all tenant entities for tenant admins, only customer-owned entities for customer users).\n * **Group permission** — uses a GROUP role. The 'entityGroupId' field must reference a valid entity group. Grants the role's operations only to entities in the specified group.\n\nAssigning a GENERIC role with a non-null 'entityGroupId' will cause an error. The 'entityGroupType' field is auto-populated from the referenced entity group and should not be set manually. Duplicate permissions (same userGroupId + roleId + entityGroupId combination) are rejected.\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserGroupPermissions", - "parameters": [ - { - "name": "userGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "uploadImage", + "operationId": "uploadImage", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "title": { + "type": "string" + }, + "imageSubType": { + "type": "string" + } + }, + "required": [ + "file" + ] + } } } - ], + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupPermissionInfo" - } + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -68872,7 +69231,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -68992,36 +69351,22 @@ ] } }, - "/api/image": { - "post": { + "/api/image/import": { + "put": { "tags": [ "image-controller" ], - "summary": "uploadImage", - "operationId": "uploadImage", + "summary": "importImage", + "operationId": "importImage", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "title": { - "type": "string" - }, - "imageSubType": { - "type": "string" - } - }, - "required": [ - "file" - ] + "$ref": "#/components/schemas/ResourceExportData" } } - } + }, + "required": true }, "responses": { "200": { @@ -69045,7 +69390,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -69165,30 +69510,101 @@ ] } }, - "/api/image/import": { - "put": { + "/api/images": { + "get": { "tags": [ "image-controller" ], - "summary": "importImage", - "operationId": "importImage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceExportData" - } + "summary": "getImages", + "operationId": "getImages", + "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": "imageSubType", + "in": "query", + "description": "A string value representing resource sub-type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "IMAGE", + "SCADA_SYMBOL" + ] + } + }, + { + "name": "includeSystemImages", + "in": "query", + "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "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/TbResourceInfo" + "$ref": "#/components/schemas/PageDataTbResourceInfo" } } } @@ -69324,91 +69740,36 @@ ] } }, - "/api/images": { + "/api/images/public/{publicResourceKey}": { "get": { "tags": [ "image-controller" ], - "summary": "getImages", - "operationId": "getImages", + "summary": "downloadPublicImage", + "operationId": "downloadPublicImage", "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": "publicResourceKey", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "imageSubType", - "in": "query", - "description": "A string value representing resource sub-type.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "IMAGE", - "SCADA_SYMBOL" - ] - } - }, - { - "name": "includeSystemImages", - "in": "query", - "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the resource title.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", + "name": "If-None-Match", + "in": "header", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "resourceType", - "tenantId" - ] + "type": "string" } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "name": "Accept-Encoding", + "in": "header", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -69416,9 +69777,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "$ref": "#/components/schemas/PageDataTbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -69554,17 +69916,31 @@ ] } }, - "/api/images/public/{publicResourceKey}": { + "/api/images/{type}/{key}": { "get": { "tags": [ "image-controller" ], - "summary": "downloadPublicImage", - "operationId": "downloadPublicImage", + "summary": "downloadImage", + "operationId": "downloadImage", "parameters": [ { - "name": "publicResourceKey", + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "type": "string", + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", "required": true, "schema": { "type": "string" @@ -69728,15 +70104,13 @@ "ApiKeyForm": [] } ] - } - }, - "/api/images/{type}/{key}": { - "get": { + }, + "put": { "tags": [ "image-controller" ], - "summary": "downloadImage", - "operationId": "downloadImage", + "summary": "updateImage", + "operationId": "updateImage", "parameters": [ { "name": "type", @@ -69759,32 +70133,33 @@ "schema": { "type": "string" } - }, - { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + }, "responses": { "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -69919,12 +70294,12 @@ } ] }, - "put": { + "delete": { "tags": [ "image-controller" ], - "summary": "updateImage", - "operationId": "updateImage", + "summary": "deleteImage", + "operationId": "deleteImage", "parameters": [ { "name": "type", @@ -69947,33 +70322,23 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] - } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "$ref": "#/components/schemas/TbImageDeleteResult" } } } @@ -70107,13 +70472,15 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/images/{type}/{key}/export": { + "get": { "tags": [ "image-controller" ], - "summary": "deleteImage", - "operationId": "deleteImage", + "summary": "exportImage", + "operationId": "exportImage", "parameters": [ { "name": "type", @@ -70136,14 +70503,6 @@ "schema": { "type": "string" } - }, - { - "name": "force", - "in": "query", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -70152,7 +70511,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbImageDeleteResult" + "$ref": "#/components/schemas/ResourceExportData" } } } @@ -70288,13 +70647,13 @@ ] } }, - "/api/images/{type}/{key}/export": { + "/api/images/{type}/{key}/info": { "get": { "tags": [ "image-controller" ], - "summary": "exportImage", - "operationId": "exportImage", + "summary": "getImageInfo", + "operationId": "getImageInfo", "parameters": [ { "name": "type", @@ -70325,7 +70684,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResourceExportData" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -70459,15 +70818,13 @@ "ApiKeyForm": [] } ] - } - }, - "/api/images/{type}/{key}/info": { - "get": { + }, + "put": { "tags": [ "image-controller" ], - "summary": "getImageInfo", - "operationId": "getImageInfo", + "summary": "updateImageInfo", + "operationId": "updateImageInfo", "parameters": [ { "name": "type", @@ -70492,6 +70849,16 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -70632,13 +70999,15 @@ "ApiKeyForm": [] } ] - }, - "put": { + } + }, + "/api/images/{type}/{key}/preview": { + "get": { "tags": [ "image-controller" ], - "summary": "updateImageInfo", - "operationId": "updateImageInfo", + "summary": "downloadImagePreview", + "operationId": "downloadImagePreview", "parameters": [ { "name": "type", @@ -70661,25 +71030,32 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbResourceInfo" - } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "image/png": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -70815,13 +71191,13 @@ ] } }, - "/api/images/{type}/{key}/preview": { - "get": { + "/api/images/{type}/{key}/public/{isPublic}": { + "put": { "tags": [ "image-controller" ], - "summary": "downloadImagePreview", - "operationId": "downloadImagePreview", + "summary": "updateImagePublicStatus", + "operationId": "updateImagePublicStatus", "parameters": [ { "name": "type", @@ -70846,19 +71222,11 @@ } }, { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, + "name": "isPublic", + "in": "path", + "required": true, "schema": { - "type": "string" + "type": "boolean" } } ], @@ -70866,10 +71234,9 @@ "200": { "description": "OK", "content": { - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/TbResourceInfo" } } } @@ -71005,13 +71372,13 @@ ] } }, - "/api/images/{type}/{key}/public/{isPublic}": { - "put": { + "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { + "get": { "tags": [ "image-controller" ], - "summary": "updateImagePublicStatus", - "operationId": "updateImagePublicStatus", + "summary": "downloadLoginFavicon", + "operationId": "downloadLoginFavicon", "parameters": [ { "name": "type", @@ -71036,11 +71403,19 @@ } }, { - "name": "isPublic", - "in": "path", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" } } ], @@ -71048,9 +71423,10 @@ "200": { "description": "OK", "content": { - "application/json": { + "image/*": { "schema": { - "$ref": "#/components/schemas/TbResourceInfo" + "type": "string", + "format": "binary" } } } @@ -71175,24 +71551,16 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { + "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { "get": { "tags": [ "image-controller" ], - "summary": "downloadLoginFavicon", - "operationId": "downloadLoginFavicon", + "summary": "downloadLoginLogo", + "operationId": "downloadLoginLogo", "parameters": [ { "name": "type", @@ -71368,50 +71736,34 @@ } } }, - "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { + "/api/edge/integration/{edgeId}/missingAttributes": { "get": { "tags": [ - "image-controller" + "integration-controller" ], - "summary": "downloadLoginLogo", - "operationId": "downloadLoginLogo", + "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", + "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findEdgeMissingAttributes", "parameters": [ { - "name": "type", - "in": "path", - "description": "Type of the image: tenant or system", - "required": true, - "schema": { - "type": "string", - "enum": [ - "tenant", - "system" - ] - } - }, - { - "name": "key", + "name": "edgeId", "in": "path", - "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "If-None-Match", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, + "name": "integrationIds", + "in": "query", + "description": "A list of assigned integration ids, separated by comma ','", + "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -71419,10 +71771,9 @@ "200": { "description": "OK", "content": { - "image/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } @@ -71547,38 +71898,34 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/edge/integration/{edgeId}/missingAttributes": { + "/api/edge/integration/{integrationId}/allMissingAttributes": { "get": { "tags": [ "integration-controller" ], - "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", - "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findEdgeMissingAttributes", + "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", + "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findAllRelatedEdgesMissingAttributes", "parameters": [ { - "name": "edgeId", + "name": "integrationId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "integrationIds", - "in": "query", - "description": "A list of assigned integration ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } } ], "responses": { @@ -71723,19 +72070,26 @@ ] } }, - "/api/edge/integration/{integrationId}/allMissingAttributes": { - "get": { + "/api/edge/{edgeId}/integration/{integrationId}": { + "post": { "tags": [ "integration-controller" ], - "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", - "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findAllRelatedEdgesMissingAttributes", + "summary": "Assign integration to edge (assignIntegrationToEdge)", + "description": "Creates assignment of an existing integration edge template 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 integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignIntegrationToEdge", "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "integrationId", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -71748,7 +72102,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Integration" } } } @@ -71764,7 +72118,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -71882,16 +72236,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edge/{edgeId}/integration/{integrationId}": { - "post": { + }, + "delete": { "tags": [ "integration-controller" ], - "summary": "Assign integration to edge (assignIntegrationToEdge)", - "description": "Creates assignment of an existing integration edge template 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 integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignIntegrationToEdge", + "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", + "description": "Clears assignment of the integration 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 integration (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 integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignIntegrationFromEdge", "parameters": [ { "name": "edgeId", @@ -71932,7 +72284,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -72050,30 +72402,87 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/integrationInfos": { + "get": { "tags": [ "integration-controller" ], - "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", - "description": "Clears assignment of the integration 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 integration (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 integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignIntegrationFromEdge", + "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the 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": "getEdgeIntegrationInfos", "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": "integrationId", - "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 'startsWith' filter based on the integration 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", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -72082,7 +72491,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/PageDataIntegrationInfo" } } } @@ -72218,14 +72627,14 @@ ] } }, - "/api/edge/{edgeId}/integrationInfos": { + "/api/edge/{edgeId}/integrations": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", + "summary": "Get Edge Integrations (getEdgeIntegrations)", "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the 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": "getEdgeIntegrationInfos", + "operationId": "getEdgeIntegrations", "parameters": [ { "name": "edgeId", @@ -72305,7 +72714,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegrationInfo" + "$ref": "#/components/schemas/PageDataIntegration" } } } @@ -72441,94 +72850,31 @@ ] } }, - "/api/edge/{edgeId}/integrations": { - "get": { + "/api/integration": { + "post": { "tags": [ "integration-controller" ], - "summary": "Get Edge Integrations (getEdgeIntegrations)", - "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the 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": "getEdgeIntegrations", - "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": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the integration 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", - "debugMode", - "allowCreateDevicesOrAssets", - "enabled", - "remote", - "routingKey", - "secret" - ] + "summary": "Create Or Update Integration (saveIntegration)", + "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveIntegration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegration" + "$ref": "#/components/schemas/Integration" } } } @@ -72544,7 +72890,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -72664,14 +73010,14 @@ ] } }, - "/api/integration": { + "/api/integration/check": { "post": { "tags": [ "integration-controller" ], - "summary": "Create Or Update Integration (saveIntegration)", - "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveIntegration", + "summary": "Check integration connectivity (checkIntegrationConnection)", + "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", + "operationId": "checkIntegrationConnection", "requestBody": { "content": { "application/json": { @@ -72684,14 +73030,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -72824,27 +73163,35 @@ ] } }, - "/api/integration/check": { - "post": { + "/api/integration/routingKey/{routingKey}": { + "get": { "tags": [ "integration-controller" ], - "summary": "Check integration connectivity (checkIntegrationConnection)", - "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", - "operationId": "checkIntegrationConnection", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } + "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", + "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationByRoutingKey", + "parameters": [ + { + "name": "routingKey", + "in": "path", + "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } }, "400": { "description": "Bad Request", @@ -72857,7 +73204,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -72977,19 +73324,19 @@ ] } }, - "/api/integration/routingKey/{routingKey}": { + "/api/integration/{integrationId}": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", - "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationByRoutingKey", + "summary": "Get Integration (getIntegrationById)", + "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationById", "parameters": [ { - "name": "routingKey", + "name": "integrationId", "in": "path", - "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -73136,16 +73483,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/integration/{integrationId}": { - "get": { + }, + "delete": { "tags": [ "integration-controller" ], - "summary": "Get Integration (getIntegrationById)", - "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationById", + "summary": "Delete integration (deleteIntegration)", + "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteIntegration", "parameters": [ { "name": "integrationId", @@ -73159,14 +73504,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -73297,19 +73635,20 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/integration/{integrationId}/export-package": { + "get": { "tags": [ "integration-controller" ], - "summary": "Delete integration (deleteIntegration)", - "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteIntegration", + "summary": "Export integration as IoT Hub package", + "description": "Returns a ZIP containing integration.json, uplink.json, optional downlink.json, and form.json. Sensitive fields are tokenized via @TemplateField annotations on the integration's runtime POJO.", + "operationId": "exportIntegrationPackage", "parameters": [ { "name": "integrationId", "in": "path", - "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -73318,7 +73657,15 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "byte" + } + } + } }, "400": { "description": "Bad Request", @@ -74225,7 +74572,7 @@ "job-controller" ], "summary": "Get job by id (getJobById)", - "description": "Fetches job info by id.\n\nExample of a RUNNING CF_REPROCESSING job response:\n```json\n{\n \"id\": {\n \"entityType\": \"JOB\",\n \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\"\n },\n \"createdTime\": 1747053196590,\n \"tenantId\": {\n \"entityType\": \"TENANT\",\n \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\"\n },\n \"type\": \"CF_REPROCESSING\",\n \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\",\n \"entityId\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"status\": \"RUNNING\",\n \"configuration\": {\n \"type\": \"CF_REPROCESSING\",\n \"calculatedFieldId\": {\n \"entityType\": \"CALCULATED_FIELD\",\n \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\"\n },\n \"startTs\": 1747051995760,\n \"endTs\": 1747052895760,\n \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"toReprocess\": null\n },\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CF_REPROCESSING job with failures:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 0,\n \"failedCount\": 2,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 1\"\n }\n }\n },\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 2\"\n }\n }\n }\n ],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a FAILED job result with general error:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": null,\n \"results\": [],\n \"generalError\": \"Timeout to find devices by profile\",\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CANCELLED job result:\n```json\n{\n ...,\n \"status\": \"CANCELLED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 15,\n \"failedCount\": 0,\n \"discardedCount\": 85,\n \"totalCount\": 100,\n \"results\": [],\n \"generalError\": null,\n \"cancellationTs\": 1747065908414\n }\n}\n\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Fetches job info by id.\n\nExample of a RUNNING CF_REPROCESSING job response:\n```json\n{\n \"id\": {\n \"entityType\": \"JOB\",\n \"id\": \"475e94e0-2f2d-11f0-8240-91e99922a704\"\n },\n \"createdTime\": 1747053196590,\n \"tenantId\": {\n \"entityType\": \"TENANT\",\n \"id\": \"46859a00-2f2d-11f0-8240-91e99922a704\"\n },\n \"type\": \"CF_REPROCESSING\",\n \"key\": \"474e4130-2f2d-11f0-8240-91e99922a704\",\n \"entityId\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"status\": \"RUNNING\",\n \"configuration\": {\n \"type\": \"CF_REPROCESSING\",\n \"calculatedFieldId\": {\n \"entityType\": \"CALCULATED_FIELD\",\n \"id\": \"474e4130-2f2d-11f0-8240-91e99922a704\"\n },\n \"startTs\": 1747051995760,\n \"endTs\": 1747052895760,\n \"tasksKey\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"toReprocess\": null\n },\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CF_REPROCESSING job with failures:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 0,\n \"failedCount\": 2,\n \"discardedCount\": 0,\n \"totalCount\": 2,\n \"results\": [\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9fd41f20-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 1\"\n }\n }\n },\n {\n \"jobType\": \"CF_REPROCESSING\",\n \"key\": \"c3cdbd42-799e-4d3a-9aad-9310f767aa36\",\n \"success\": false,\n \"discarded\": false,\n \"failure\": {\n \"error\": \"Failed to fetch temperature: Failed to fetch timeseries data\",\n \"entityInfo\": {\n \"id\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"9ffc4090-31a1-11f0-933e-27998d6db02e\"\n },\n \"name\": \"Test device 2\"\n }\n }\n }\n ],\n \"generalError\": null,\n \"startTs\": 1747323069445,\n \"finishTs\": 1747323070585,\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a FAILED job result with general error:\n```json\n{\n ...,\n \"status\": \"FAILED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 1,\n \"failedCount\": 0,\n \"discardedCount\": 0,\n \"totalCount\": null,\n \"results\": [],\n \"generalError\": \"Timeout to find devices by profile\",\n \"cancellationTs\": 0\n }\n}\n\n```\n\nExample of a CANCELLED job result:\n```json\n{\n ...,\n \"status\": \"CANCELLED\",\n ...,\n \"result\": {\n \"jobType\": \"CF_REPROCESSING\",\n \"successfulCount\": 15,\n \"failedCount\": 0,\n \"discardedCount\": 85,\n \"totalCount\": 100,\n \"results\": [],\n \"generalError\": null,\n \"cancellationTs\": 1747065908414\n }\n}\n\n```\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "getJobById", "parameters": [ { @@ -74537,7 +74884,7 @@ "job-controller" ], "summary": "Cancel job (cancelJob)", - "description": "Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING.\n\nFor a running job, all the tasks not yet processed will be discarded.\n\nSee the example of a cancelled job result in getJobById method description.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Cancels the job. The status of the job must be QUEUED, PENDING or RUNNING.\n\nFor a running job, all the tasks not yet processed will be discarded.\n\nSee the example of a cancelled job result in getJobById method description.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "cancelJob", "parameters": [ { @@ -74691,7 +75038,7 @@ "job-controller" ], "summary": "Reprocess job (reprocessJob)", - "description": "Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "reprocessJob", "parameters": [ { @@ -74845,7 +75192,7 @@ "job-controller" ], "summary": "Get jobs (getJobs)", - "description": "Returns the page of jobs.\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 'TENANT_ADMIN' authority.", + "description": "Returns the page of jobs.\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 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "getJobs", "parameters": [ { @@ -74950,6 +75297,15 @@ "type": "integer", "format": "int64" } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -90003,7 +90359,7 @@ "report-controller" ], "summary": "Download test report (testReportAndDownload)", - "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", "operationId": "testReportAndDownload", "requestBody": { "content": { @@ -90164,7 +90520,7 @@ "report-controller" ], "summary": "Get Report (getReportById)", - "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", "operationId": "getReportById", "parameters": [ { @@ -90829,7 +91185,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -91079,6 +91435,15 @@ "schema": { "type": "string" } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -91229,7 +91594,7 @@ "report-template-controller" ], "summary": "Save Report Template (saveReportTemplate)", - "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", "operationId": "saveReportTemplate", "requestBody": { "content": { @@ -91863,7 +92228,7 @@ "report-template-controller" ], "summary": "Get All Report Templates for current user (getAllReportTemplateInfos)", - "description": "Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "description": "Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", "operationId": "getAllReportTemplateInfos", "parameters": [ { @@ -91901,7 +92266,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -92112,7 +92477,7 @@ "report-template-controller" ], "summary": "Get report templates by Report Template Ids (getReportTemplatesByIds)", - "description": "Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "description": "Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", "operationId": "getReportTemplatesByIds", "parameters": [ { @@ -93879,503 +94244,19 @@ ] } }, - "/api/rpc/persistent/{rpcId}": { - "get": { - "tags": [ - "rpc-v-2-controller" - ], - "summary": "Get persistent RPC request", - "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpc", - "parameters": [ - { - "name": "rpcId", - "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Rpc" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { - "tags": [ - "rpc-v-2-controller" - ], - "summary": "Delete persistent RPC", - "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRpc", - "parameters": [ - { - "name": "rpcId", - "in": "path", - "description": "A string value representing the rpc 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": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/rpc/twoway/{deviceId}": { - "post": { - "tags": [ - "rpc-v-2-controller" - ], - "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": "handleTwoWayDeviceRPCRequestV2", - "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" - } - } - ], - "requestBody": { - "description": "A JSON object representing the RPC request.", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Invalid structure of the request.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "413": { - "description": "Request payload is too large", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "504": { - "description": "Timeout to process the RPC call. Most likely, device is offline.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { - "post": { + "/api/rpc/persistent/{rpcId}": { + "get": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Assign rule chain to edge (assignRuleChainToEdge)", - "description": "Creates assignment of an existing rule chain 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 rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. \n\nOnly rule chain with type 'EDGE' can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "assignRuleChainToEdge", + "summary": "Get persistent RPC request", + "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpc", "parameters": [ { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ruleChainId", + "name": "rpcId", "in": "path", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -94388,7 +94269,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/Rpc" } } } @@ -94404,7 +94285,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -94525,23 +94406,16 @@ }, "delete": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Unassign rule chain from edge (unassignRuleChainFromEdge)", - "description": "Clears assignment of the rule chain 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 rule chain (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 rule chain locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unassignRuleChainFromEdge", + "summary": "Delete persistent RPC", + "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRpc", "parameters": [ { - "name": "edgeId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ruleChainId", + "name": "rpcId", "in": "path", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -94550,14 +94424,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChain" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -94690,136 +94557,83 @@ ] } }, - "/api/edge/{edgeId}/ruleChains": { - "get": { + "/api/rpc/twoway/{deviceId}": { + "post": { "tags": [ - "rule-chain-controller" + "rpc-v-2-controller" ], - "summary": "Get Edge Rule Chains (getEdgeRuleChains)", - "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the 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": "getEdgeRuleChains", + "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": "handleTwoWayDeviceRPCRequestV2", "parameters": [ { - "name": "edgeId", + "name": "deviceId", "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", + "description": "A string value representing the device 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 rule chain 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", - "root" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], + "requestBody": { + "description": "A JSON object representing the RPC request.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" } } } }, "401": { - "description": "Unauthorized", + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -94907,24 +94721,32 @@ ] } }, - "/api/ruleChain": { + "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Create Or Update Rule Chain (saveRuleChain)", - "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChain" - } + "summary": "Assign rule chain to edge (assignRuleChainToEdge)", + "description": "Creates assignment of an existing rule chain 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 rule chain (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once rule chain will be delivered to edge service, it's going to start processing messages locally. \n\nOnly rule chain with type 'EDGE' can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignRuleChainToEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "ruleChainId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -95065,26 +94887,39 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/autoAssignToEdgeRuleChains": { - "get": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains)", - "description": "Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAutoAssignToEdgeRuleChains", + "summary": "Unassign rule chain from edge (unassignRuleChainFromEdge)", + "description": "Clears assignment of the rule chain 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 rule chain (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 rule chain locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignRuleChainFromEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleChainId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "$ref": "#/components/schemas/RuleChain" } } } @@ -95220,31 +95055,88 @@ ] } }, - "/api/ruleChain/device/default": { - "post": { + "/api/edge/{edgeId}/ruleChains": { + "get": { "tags": [ "rule-chain-controller" ], - "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": "setDeviceDefaultRuleChain", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" - } + "summary": "Get Edge Rule Chains (getEdgeRuleChains)", + "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the 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": "getEdgeRuleChains", + "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": "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 rule chain 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", + "root" + ] + } + }, + { + "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/RuleChain" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -95260,7 +95152,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95380,31 +95272,19 @@ ] } }, - "/api/ruleChain/metadata": { + "/api/ruleChain": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Update Rule Chain Metadata", - "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChainMetaData", - "parameters": [ - { - "name": "updateRelated", - "in": "query", - "description": "Update related rule nodes.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - } - ], + "summary": "Create Or Update Rule Chain (saveRuleChain)", + "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChain", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/RuleChain" } } }, @@ -95416,7 +95296,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/RuleChain" } } } @@ -95552,21 +95432,24 @@ ] } }, - "/api/ruleChain/tbelEnabled": { + "/api/ruleChain/autoAssignToEdgeRuleChains": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Is TBEL script executor enabled", - "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "isTbelEnabled", + "summary": "Get Auto Assign To Edge Rule Chains (getAutoAssignToEdgeRuleChains)", + "description": "Returns a list of Rule Chains that will be assigned to a newly created edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAutoAssignToEdgeRuleChains", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } } } } @@ -95702,197 +95585,24 @@ ] } }, - "/api/ruleChain/testScript": { + "/api/ruleChain/device/default": { "post": { "tags": [ "rule-chain-controller" ], - "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": "testRuleChainScript", - "parameters": [ - { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, - "schema": { - "$ref": "#/components/schemas/ScriptLanguage" - } - } - ], + "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": "setDeviceDefaultRuleChain", "requestBody": { - "description": "Test JS request. See API call description above.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" } } }, "required": true }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/ruleChain/{ruleChainId}": { - "get": { - "tags": [ - "rule-chain-controller" - ], - "summary": "Get Rule Chain (getRuleChainById)", - "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainById", - "parameters": [ - { - "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": { "200": { "description": "OK", @@ -95915,7 +95625,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96033,186 +95743,45 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain/metadata": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Delete rule chain (deleteRuleChain)", - "description": "Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRuleChain", + "summary": "Update Rule Chain Metadata", + "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChainMetaData", "parameters": [ { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "updateRelated", + "in": "query", + "description": "Update related rule nodes.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } } ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" } } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } + "required": true }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { - "post": { - "tags": [ - "rule-chain-controller" - ], - "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", - "description": "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setAutoAssignToEdgeRuleChain", - "parameters": [ - { - "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": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -96346,32 +95915,23 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain/tbelEnabled": { + "get": { "tags": [ "rule-chain-controller" ], - "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", - "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "unsetAutoAssignToEdgeRuleChain", - "parameters": [ - { - "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" - } - } - ], + "summary": "Is TBEL script executor enabled", + "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "isTbelEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "boolean" } } } @@ -96507,32 +96067,43 @@ ] } }, - "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { + "/api/ruleChain/testScript": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", - "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeTemplateRootRuleChain", + "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": "testRuleChainScript", "parameters": [ { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "scriptLang", + "in": "query", + "description": "Script language: JS or TBEL", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/ScriptLanguage" } } ], + "requestBody": { + "description": "Test JS request. See API call description above.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/JsonNode" } } } @@ -96668,14 +96239,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/metadata": { + "/api/ruleChain/{ruleChainId}": { "get": { "tags": [ "rule-chain-controller" ], "summary": "Get Rule Chain (getRuleChainById)", - "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainMetaData", + "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainById", "parameters": [ { "name": "ruleChainId", @@ -96693,7 +96264,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/RuleChain" } } } @@ -96827,16 +96398,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}/output/labels": { - "get": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chain output labels (getRuleChainOutputLabels)", - "description": "Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainOutputLabels", + "summary": "Delete rule chain (deleteRuleChain)", + "description": "Deletes the rule chain. Referencing non-existing rule chain Id will cause an error. Referencing rule chain that is used in the device profiles will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRuleChain", "parameters": [ { "name": "ruleChainId", @@ -96850,18 +96419,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -96994,14 +96552,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels/usage": { - "get": { + "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get output labels usage (getRuleChainOutputLabelsUsage)", - "description": "Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getRuleChainOutputLabelsUsage", + "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", + "description": "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. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setAutoAssignToEdgeRuleChain", "parameters": [ { "name": "ruleChainId", @@ -97019,10 +96577,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" - } + "$ref": "#/components/schemas/RuleChain" } } } @@ -97038,7 +96593,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97156,16 +96711,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}/root": { - "post": { + }, + "delete": { "tags": [ "rule-chain-controller" ], - "summary": "Set Root Rule Chain (setRootRuleChain)", - "description": "Makes the rule chain to be root rule chain. Updates previous root rule chain as well. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setRootRuleChain", + "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", + "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unsetAutoAssignToEdgeRuleChain", "parameters": [ { "name": "ruleChainId", @@ -97199,7 +96752,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97319,82 +96872,183 @@ ] } }, - "/api/ruleChains": { - "get": { + "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains (getRuleChains)", - "description": "Returns a page of Rule Chains owned by tenant. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the 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": "getRuleChains", + "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", + "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeTemplateRootRuleChain", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } } }, - { - "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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "type", - "in": "query", - "description": "Rule chain type (CORE or EDGE)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the rule chain name.", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "root" - ] + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/metadata": { + "get": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainMetaData", + "parameters": [ + { + "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", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -97404,7 +97058,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -97540,23 +97194,22 @@ ] } }, - "/api/ruleChains/export": { + "/api/ruleChain/{ruleChainId}/output/labels": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Export Rule Chains", - "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "exportRuleChains", + "summary": "Get Rule Chain output labels (getRuleChainOutputLabels)", + "description": "Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainOutputLabels", "parameters": [ { - "name": "limit", - "in": "query", - "description": "A limit of rule chains to export.", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } } ], @@ -97566,7 +97219,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true } } } @@ -97702,36 +97359,25 @@ ] } }, - "/api/ruleChains/import": { - "post": { + "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "get": { "tags": [ "rule-chain-controller" ], - "summary": "Import Rule Chains", - "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "importRuleChains", + "summary": "Get output labels usage (getRuleChainOutputLabelsUsage)", + "description": "Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainOutputLabelsUsage", "parameters": [ { - "name": "overwrite", - "in": "query", - "description": "Enables overwrite for existing rule chains with the same name.", - "required": false, + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChainData" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -97740,7 +97386,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/RuleChainImportResult" + "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" } } } @@ -97757,7 +97403,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97877,25 +97523,22 @@ ] } }, - "/api/ruleChains/list": { - "get": { + "/api/ruleChain/{ruleChainId}/root": { + "post": { "tags": [ "rule-chain-controller" ], - "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", - "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRuleChainsByIds", + "summary": "Set Root Rule Chain (setRootRuleChain)", + "description": "Makes the rule chain to be root rule chain. Updates previous root rule chain as well. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setRootRuleChain", "parameters": [ { - "name": "ruleChainIds", - "in": "query", - "description": "A list of rule chain ids, separated by comma ','", + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -97905,10 +97548,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "$ref": "#/components/schemas/RuleChain" } } } @@ -97924,7 +97564,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98044,23 +97684,83 @@ ] } }, - "/api/ruleNode/{ruleNodeId}/debugIn": { + "/api/ruleChains": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Get latest input message (getLatestRuleNodeDebugInput)", - "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLatestRuleNodeDebugInput", + "summary": "Get Rule Chains (getRuleChains)", + "description": "Returns a page of Rule Chains owned by tenant. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the 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": "getRuleChains", "parameters": [ { - "name": "ruleNodeId", - "in": "path", - "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Rule chain type (CORE or EDGE)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the rule chain 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", + "root" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -98069,7 +97769,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -98205,32 +97905,33 @@ ] } }, - "/api/rule-engine/": { - "post": { + "/api/ruleChains/export": { + "get": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "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": "handleRuleEngineRequestForUser", - "requestBody": { - "description": "A JSON object representing the message.", - "content": { - "text/plain": { - "schema": { - "type": "string" - } + "summary": "Export Rule Chains", + "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "exportRuleChains", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit of rule chains to export.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChainData" } } } @@ -98246,7 +97947,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98366,40 +98067,31 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}": { + "/api/ruleChains/import": { "post": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "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": "handleRuleEngineRequestForEntity", + "summary": "Import Rule Chains", + "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "importRuleChains", "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, + "name": "overwrite", + "in": "query", + "description": "Enables overwrite for existing rule chains with the same name.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], "requestBody": { - "description": "A JSON object representing the message.", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChainData" } } }, @@ -98411,7 +98103,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainImportResult" + } } } } @@ -98547,71 +98242,38 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { - "post": { + "/api/ruleChains/list": { + "get": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "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": "handleRuleEngineRequestForEntityWithQueueAndTimeout", + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", + "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRuleChainsByIds", "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": "queueName", - "in": "path", - "description": "Queue name to process the request in the rule engine", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", + "name": "ruleChainIds", + "in": "query", + "description": "A list of rule chain ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "description": "A JSON object representing the message.", - "content": { - "text/plain": { - "schema": { + "type": "array", + "items": { "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } } } } @@ -98627,7 +98289,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98747,62 +98409,32 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{timeout}": { - "post": { + "/api/ruleNode/{ruleNodeId}/debugIn": { + "get": { "tags": [ - "rule-engine-controller" + "rule-chain-controller" ], - "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": "handleRuleEngineRequestForEntityWithTimeout", + "summary": "Get latest input message (getLatestRuleNodeDebugInput)", + "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestRuleNodeDebugInput", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "ruleNodeId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], - "requestBody": { - "description": "A JSON object representing the message.", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JsonNode" } } } @@ -98818,7 +98450,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98938,35 +98570,32 @@ ] } }, - "/api/edge/{edgeId}/allSchedulerEvents": { - "get": { + "/api/rule-engine/": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Get All Edge Scheduler Events (getAllEdgeSchedulerEvents)", - "description": "Fetch the list of Scheduler Event Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeSchedulerEvents", - "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": "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": "handleRuleEngineRequestForUser", + "requestBody": { + "description": "A JSON object representing the message.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "type": "string" } } } @@ -98982,7 +98611,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -99102,41 +98731,52 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { + "/api/rule-engine/{entityType}/{entityId}": { "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", - "description": "Creates assignment of an existing scheduler event 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 scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignSchedulerEventToEdge", + "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": "handleRuleEngineRequestForEntity", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "schedulerEventId", + "name": "entityId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "A JSON object representing the message.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "type": "string" } } } @@ -99270,41 +98910,73 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Unassign scheduler event from edge (unassignSchedulerEventFromEdge)", - "description": "Clears assignment of the scheduler event to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignSchedulerEventFromEdge", + "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": "handleRuleEngineRequestForEntityWithQueueAndTimeout", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "schedulerEventId", + "name": "entityId", "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "queueName", + "in": "path", + "description": "Queue name to process the request in the rule engine", "required": true, "schema": { "type": "string" } + }, + { + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } } ], + "requestBody": { + "description": "A JSON object representing the message.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "type": "string" } } } @@ -99320,7 +98992,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -99440,83 +99112,62 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvents": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-controller" ], - "summary": "Get Edge Scheduler Events (getEdgeSchedulerEvents)", - "description": "Returns a page of Scheduler Events Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeSchedulerEvents", + "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": "handleRuleEngineRequestForEntityWithTimeout", "parameters": [ { - "name": "edgeId", + "name": "entityType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the scheduler event 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, + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "integer", + "format": "int32" } } ], + "requestBody": { + "description": "A JSON object representing the message.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + "type": "string" } } } @@ -99532,7 +99183,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -99652,94 +99303,23 @@ ] } }, - "/api/scheduledReports": { + "/api/edge/{edgeId}/allSchedulerEvents": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduled Report Events (getScheduledReportEvents)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getScheduledReportEvents", + "summary": "Get All Edge Scheduler Events (getAllEdgeSchedulerEvents)", + "description": "Fetch the list of Scheduler Event Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeSchedulerEvents", "parameters": [ { - "name": "reportTemplateId", - "in": "query", - "description": "Report template id", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "userId", - "in": "query", - "description": "The user used for report generation.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -99748,7 +99328,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataScheduledReportInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -99884,31 +99467,41 @@ ] } }, - "/api/schedulerEvent": { + "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { "post": { "tags": [ "scheduler-event-controller" ], - "summary": "Save Scheduler Event (saveSchedulerEvent)", - "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveSchedulerEvent", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SchedulerEvent" - } + "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", + "description": "Creates assignment of an existing scheduler event 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 scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignSchedulerEventToEdge", + "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": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -100042,17 +99635,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvent/info/{schedulerEventId}": { - "get": { + }, + "delete": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Event With Customer Info (getSchedulerEventInfoById)", - "description": "Fetch the SchedulerEventWithCustomerInfo object based on the provided scheduler event Id. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventInfoById", + "summary": "Unassign scheduler event from edge (unassignSchedulerEventFromEdge)", + "description": "Clears assignment of the scheduler event to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignSchedulerEventFromEdge", "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": "schedulerEventId", "in": "path", @@ -100069,7 +99669,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -100205,23 +99805,74 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}": { + "/api/edge/{edgeId}/schedulerEvents": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Event (getSchedulerEventById)", - "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventById", + "summary": "Get Edge Scheduler Events (getEdgeSchedulerEvents)", + "description": "Returns a page of Scheduler Events Info objects based on the provided Edge entity. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeSchedulerEvents", "parameters": [ { - "name": "schedulerEventId", + "name": "edgeId", "in": "path", - "description": "A string value representing the scheduler 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": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -100230,7 +99881,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" } } } @@ -100364,28 +100015,108 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/scheduledReports": { + "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Delete Scheduler Event (deleteSchedulerEvent)", - "description": "Deletes the scheduler event. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteSchedulerEvent", + "summary": "Get Scheduled Report Events (getScheduledReportEvents)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getScheduledReportEvents", "parameters": [ { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "reportTemplateId", + "in": "query", + "description": "Report template id", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user used for report generation.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataScheduledReportInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -100518,34 +100249,24 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { - "put": { + "/api/schedulerEvent": { + "post": { "tags": [ "scheduler-event-controller" ], - "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", - "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "enableSchedulerEvent", - "parameters": [ - { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Save Scheduler Event (saveSchedulerEvent)", + "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveSchedulerEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } } }, - { - "name": "enabledValue", - "in": "path", - "description": "Enabled or disabled scheduler", - "required": true, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -100568,7 +100289,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -100688,79 +100409,183 @@ ] } }, - "/api/schedulerEvents": { + "/api/schedulerEvent/info/{schedulerEventId}": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get scheduler events (getSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\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\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEvents", + "summary": "Get Scheduler Event With Customer Info (getSchedulerEventInfoById)", + "description": "Fetch the SchedulerEventWithCustomerInfo object based on the provided scheduler event Id. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventInfoById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } + } } }, - { - "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", - "required": false, - "schema": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, - "schema": { - "type": "string" + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } + } + }, + "security": [ + { + "HttpLoginForm": [] }, { - "name": "edgeId", - "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "ApiKeyForm": [] + } + ] + } + }, + "/api/schedulerEvent/{schedulerEventId}": { + "get": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Get Scheduler Event (getSchedulerEventById)", + "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventById", + "parameters": [ + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -100770,7 +100595,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -100904,22 +100729,20 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvents/all": { - "get": { + }, + "delete": { "tags": [ "scheduler-event-controller" ], - "summary": "Get all scheduler events (getAllSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllSchedulerEvents", + "summary": "Delete Scheduler Event (deleteSchedulerEvent)", + "description": "Deletes the scheduler event. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteSchedulerEvent", "parameters": [ { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -100927,17 +100750,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -101070,25 +100883,31 @@ ] } }, - "/api/schedulerEvents/list": { - "get": { + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByIds", + "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", + "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "enableSchedulerEvent", "parameters": [ { - "name": "schedulerEventIds", - "in": "query", - "description": "A list of scheduler event ids, separated by comma ','", + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" } } ], @@ -101098,10 +100917,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -101237,62 +101053,80 @@ ] } }, - "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { + "/api/schedulerEvents": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get scheduler events (getSchedulerEventsByRange)", - "description": "Retrieves scheduler events filtering by event run time. Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\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\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventsByRange", + "summary": "Get scheduler events (getSchedulerEvents)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\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\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEvents", "parameters": [ { - "name": "startTime", - "in": "path", - "description": "Start time filter in milliseconds for scheduler event run time", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { "type": "integer", - "format": "int64" + "format": "int32" } }, { - "name": "endTime", - "in": "path", - "description": "End time filter in milliseconds for scheduler event run time", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { "type": "integer", - "format": "int64" + "format": "int32" } }, { - "name": "type", + "name": "textSearch", "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", "required": false, "schema": { "type": "string" } }, { - "name": "edgeId", + "name": "sortProperty", "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "textSearch", + "name": "sortOrder", "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string" } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "edgeId", + "in": "query", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } } ], "responses": { @@ -101301,10 +101135,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" } } } @@ -101440,19 +101271,20 @@ ] } }, - "/api/secret": { + "/api/schedulerEvents/all": { "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Get Secret info by name (getSecretInfoByName)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoByName", + "summary": "Get all scheduler events (getAllSchedulerEvents)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllSchedulerEvents", "parameters": [ { - "name": "name", + "name": "type", "in": "query", - "required": true, + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, "schema": { "type": "string" } @@ -101464,7 +101296,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -101598,174 +101433,30 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/schedulerEvents/list": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Save or Update Secret (saveSecret)", - "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", - "operationId": "saveSecret", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Secret" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SecretInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } + "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByIds", + "parameters": [ + { + "name": "schedulerEventIds", + "in": "query", + "description": "A list of scheduler event ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/secret/names": { - "get": { - "tags": [ - "secret-controller" ], - "summary": "Get Tenant Secret names (getSecretNames)", - "description": "Returns a page of secret names 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": "getSecretNames", "responses": { "200": { "description": "OK", @@ -101774,7 +101465,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -101911,23 +101602,62 @@ ] } }, - "/api/secret/{id}": { - "delete": { + "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Delete secret by ID (deleteSecret)", - "description": "Deletes the secret. Referencing non-existing Secret Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteSecret", + "summary": "Get scheduler events (getSchedulerEventsByRange)", + "description": "Retrieves scheduler events filtering by event run time. Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\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\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByRange", "parameters": [ { - "name": "id", + "name": "startTime", "in": "path", + "description": "Start time filter in milliseconds for scheduler event run time", "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "path", + "description": "End time filter in milliseconds for scheduler event run time", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "edgeId", + "in": "query", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { "type": "string", "format": "uuid" } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -101936,7 +101666,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbSecretDeleteResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -102072,36 +101805,24 @@ ] } }, - "/api/secret/{id}/description": { - "put": { + "/api/secret": { + "get": { "tags": [ "secret-controller" ], - "summary": "Update Secret Description", - "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretDescription", + "summary": "Get Secret info by name (getSecretInfoByName)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoByName", "parameters": [ { - "name": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", + "name": "name", + "in": "query", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the Secret" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -102242,27 +101963,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/secret/{id}/info": { - "get": { + }, + "post": { "tags": [ "secret-controller" ], - "summary": "Get Secret info by Id (getSecretInfoById)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoById", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Save or Update Secret (saveSecret)", + "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", + "operationId": "saveSecret", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Secret" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -102285,7 +102003,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -102405,44 +102123,24 @@ ] } }, - "/api/secret/{id}/value": { - "put": { + "/api/secret/names": { + "get": { "tags": [ "secret-controller" ], - "summary": "Update Secret value", - "description": "Updates the value of the existing Secret by secretId. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretValue", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New value for the Secret" - } - } - }, - "required": true - }, + "summary": "Get Tenant Secret names (getSecretNames)", + "description": "Returns a page of secret names 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": "getSecretNames", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "type": "array", + "items": { + "type": "string" + } } } } @@ -102578,67 +102276,22 @@ ] } }, - "/api/secrets": { - "get": { + "/api/secret/{id}": { + "delete": { "tags": [ "secret-controller" ], - "summary": "Get Tenant Secret infos (getSecretInfos)", - "description": "Returns a page of secret infos 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": "getSecretInfos", + "summary": "Delete secret by ID (deleteSecret)", + "description": "Deletes the secret. Referencing non-existing Secret Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteSecret", "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": "id", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the secret name and description.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", - "enum": [ - "name" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -102648,7 +102301,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSecretInfo" + "$ref": "#/components/schemas/TbSecretDeleteResult" } } } @@ -102784,39 +102437,43 @@ ] } }, - "/api/noauth/selfRegistration/privacyPolicy": { - "get": { + "/api/secret/{id}/description": { + "put": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Privacy Policy for Self Registration form (getPrivacyPolicy)", - "description": "Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. ", - "operationId": "getPrivacyPolicy", + "summary": "Update Secret Description", + "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", + "operationId": "updateSecretDescription", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", + "required": true, "schema": { - "$ref": "#/components/schemas/PlatformType" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New description for the Secret" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -102941,37 +102598,33 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "/api/secret/{id}/info": { "get": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", - "operationId": "getSignUpSelfRegistrationParams", + "summary": "Get Secret info by Id (getSecretInfoById)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoById", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platformType", - "in": "query", - "description": "Platform type", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "format": "uuid" } } ], @@ -102981,7 +102634,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -103106,42 +102759,55 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/termsOfUse": { - "get": { + "/api/secret/{id}/value": { + "put": { "tags": [ - "self-registration-controller" + "secret-controller" ], - "summary": "Get Terms of Use for Self Registration form (getTermsOfUse)", - "description": "Fetch the Terms of Use based on the domain name from the request. Available for non-authorized users. ", - "operationId": "getTermsOfUse", + "summary": "Update Secret value", + "description": "Updates the value of the existing Secret by secretId. Referencing a non-existing Secret Id will cause a 'Not Found' error.", + "operationId": "updateSecretValue", "parameters": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", + "required": true, "schema": { - "$ref": "#/components/schemas/PlatformType" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New value for the Secret" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -103266,24 +102932,88 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/selfRegistration/selfRegistrationParams": { + "/api/secrets": { "get": { "tags": [ - "self-registration-controller" + "secret-controller" + ], + "summary": "Get Tenant Secret infos (getSecretInfos)", + "description": "Returns a page of secret infos 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": "getSecretInfos", + "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 secret name and description.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Self Registration parameters (getSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getWebSelfRegistrationParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SelfRegistrationParams" + "$ref": "#/components/schemas/PageDataSecretInfo" } } } @@ -103417,31 +103147,41 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/noauth/selfRegistration/privacyPolicy": { + "get": { "tags": [ "self-registration-controller" ], - "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", - "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "saveWebSelfRegistrationParams", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" - } + "summary": "Get Privacy Policy for Self Registration form (getPrivacyPolicy)", + "description": "Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. ", + "operationId": "getPrivacyPolicy", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" + "type": "string" } } } @@ -103457,7 +103197,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103566,25 +103306,50 @@ } } } - }, - "security": [ + } + } + }, + "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "get": { + "tags": [ + "self-registration-controller" + ], + "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", + "operationId": "getSignUpSelfRegistrationParams", + "parameters": [ { - "HttpLoginForm": [] + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] + "name": "platformType", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } } - ] - }, - "delete": { - "tags": [ - "self-registration-controller" ], - "summary": "deleteWebSelfRegistrationParams", - "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + } + } + } }, "400": { "description": "Bad Request", @@ -103706,39 +103471,21 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/activateByEmailCode": { - "post": { + "/api/noauth/selfRegistration/termsOfUse": { + "get": { "tags": [ - "sign-up-controller" + "self-registration-controller" ], - "summary": "Activate and login using code from Email (activateUserByEmailCode)", - "description": "Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet.", - "operationId": "activateUserByEmailCode", + "summary": "Get Terms of Use for Self Registration form (getTermsOfUse)", + "description": "Fetch the Terms of Use based on the domain name from the request. Available for non-authorized users. ", + "operationId": "getTermsOfUse", "parameters": [ - { - "name": "emailCode", - "in": "query", - "description": "Activation token.", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pkgName", "in": "query", - "description": "Optional package name of the mobile application.", "required": false, "schema": { "type": "string" @@ -103747,14 +103494,9 @@ { "name": "platform", "in": "query", - "description": "Platform type", "required": false, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "$ref": "#/components/schemas/PlatformType" } } ], @@ -103764,7 +103506,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -103780,7 +103522,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103892,54 +103634,21 @@ } } }, - "/api/noauth/activateEmail": { + "/api/selfRegistration/selfRegistrationParams": { "get": { "tags": [ - "sign-up-controller" - ], - "summary": "Activate User using code from Email (activateEmail)", - "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", - "operationId": "activateEmail", - "parameters": [ - { - "name": "emailCode", - "in": "query", - "description": "Activation token.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } - } + "self-registration-controller" ], + "summary": "Get Self Registration parameters (getSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getWebSelfRegistrationParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SelfRegistrationParams" } } } @@ -104064,55 +103773,40 @@ } } } - } - } - }, - "/api/noauth/cloud/activateByEmailCode": { - "post": { - "tags": [ - "sign-up-controller" - ], - "summary": "activateCloudUserByEmailCode", - "operationId": "activateCloudUserByEmailCode", - "parameters": [ - { - "name": "emailCode", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, + }, + "security": [ { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } + "ApiKeyForm": [] } + ] + }, + "post": { + "tags": [ + "self-registration-controller" ], + "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", + "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveWebSelfRegistrationParams", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSelfRegistrationParams" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/WebSelfRegistrationParams" } } } @@ -104237,58 +103931,25 @@ } } } - } - } - }, - "/api/noauth/cloud/activateEmail": { - "get": { - "tags": [ - "sign-up-controller" - ], - "summary": "activateCloudEmail", - "operationId": "activateCloudEmail", - "parameters": [ - { - "name": "emailCode", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, + }, + "security": [ { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } + "ApiKeyForm": [] } + ] + }, + "delete": { + "tags": [ + "self-registration-controller" ], + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -104410,27 +104071,44 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/cloud/login": { - "get": { + "/api/noauth/activateByEmailCode": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Cloud mobile Login redirect (cloudMobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on cloud mobile app.", - "operationId": "cloudMobileLogin", + "summary": "Activate and login using code from Email (activateUserByEmailCode)", + "description": "Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet.", + "operationId": "activateUserByEmailCode", "parameters": [ { - "name": "pkgName", + "name": "emailCode", "in": "query", - "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "description": "Activation token.", "required": true, "schema": { "type": "string" } }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "platform", "in": "query", @@ -104451,7 +104129,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JwtPair" } } } @@ -104467,7 +104145,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104579,17 +104257,19 @@ } } }, - "/api/noauth/cloud/resendEmailActivation": { - "post": { + "/api/noauth/activateEmail": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "resendCloudEmailActivation", - "operationId": "resendCloudEmailActivation", + "summary": "Activate User using code from Email (activateEmail)", + "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", + "operationId": "activateEmail", "parameters": [ { - "name": "email", + "name": "emailCode", "in": "query", + "description": "Activation token.", "required": true, "schema": { "type": "string" @@ -104598,6 +104278,7 @@ { "name": "pkgName", "in": "query", + "description": "Optional package name of the mobile application.", "required": false, "schema": { "type": "string" @@ -104619,7 +104300,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -104632,7 +104320,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104744,29 +104432,36 @@ } } }, - "/api/noauth/login": { - "get": { + "/api/noauth/cloud/activateByEmailCode": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Mobile Login redirect (mobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", - "operationId": "mobileLogin", + "summary": "activateCloudUserByEmailCode", + "operationId": "activateCloudUserByEmailCode", "parameters": [ { - "name": "pkgName", + "name": "emailCode", "in": "query", - "description": "Mobile app package name. Used to identify the application and build the redirect link.", "required": true, "schema": { "type": "string" } }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "platform", "in": "query", "description": "Platform type", - "required": true, + "required": false, "schema": { "type": "string", "enum": [ @@ -104782,7 +104477,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JwtPair" } } } @@ -104798,7 +104493,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104910,24 +104605,21 @@ } } }, - "/api/noauth/resendEmailActivation": { - "post": { + "/api/noauth/cloud/activateEmail": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Resend Activation Email (resendEmailActivation)", - "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", - "operationId": "resendEmailActivation", + "summary": "activateCloudEmail", + "operationId": "activateCloudEmail", "parameters": [ { - "name": "email", + "name": "emailCode", "in": "query", - "description": "Email of the user.", "required": true, "schema": { "type": "string" - }, - "example": "john.doe@company.com" + } }, { "name": "pkgName", @@ -104954,7 +104646,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -104967,7 +104666,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105079,31 +104778,45 @@ } } }, - "/api/noauth/signup": { - "post": { + "/api/noauth/cloud/login": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "User Sign Up (signUp)", - "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", - "operationId": "signUp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignUpRequest" - } + "summary": "Cloud mobile Login redirect (cloudMobileLogin)", + "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on cloud mobile app.", + "operationId": "cloudMobileLogin", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpResult" + "type": "string" } } } @@ -105119,7 +104832,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105231,23 +104944,47 @@ } } }, - "/api/noauth/signup/recaptchaParams": { - "get": { + "/api/noauth/cloud/resendEmailActivation": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "getRecaptchaParams", - "operationId": "getRecaptchaParams", + "summary": "resendCloudEmailActivation", + "operationId": "resendCloudEmailActivation", + "parameters": [ + { + "name": "email", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CaptchaClientParams" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -105260,7 +104997,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105372,21 +105109,45 @@ } } }, - "/api/signup/acceptPrivacyPolicy": { - "post": { + "/api/noauth/login": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Accept privacy policy (acceptPrivacyPolicy)", - "description": "Accept privacy policy by the current user.", - "operationId": "acceptPrivacyPolicy", + "summary": "Mobile Login redirect (mobileLogin)", + "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", + "operationId": "mobileLogin", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -105402,7 +105163,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105511,34 +105272,54 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { + "/api/noauth/resendEmailActivation": { "post": { "tags": [ "sign-up-controller" ], - "summary": "acceptPrivacyPolicyAndTermsOfUse", - "operationId": "acceptPrivacyPolicyAndTermsOfUse", + "summary": "Resend Activation Email (resendEmailActivation)", + "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", + "operationId": "resendEmailActivation", + "parameters": [ + { + "name": "email", + "in": "query", + "description": "Email of the user.", + "required": true, + "schema": { + "type": "string" + }, + "example": "john.doe@company.com" + }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JwtPair" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -105660,32 +105441,34 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/acceptTermsOfUse": { + "/api/noauth/signup": { "post": { "tags": [ "sign-up-controller" ], - "summary": "Accept Terms of Use (acceptTermsOfUse)", - "description": "Accept Terms of Use by the current user.", - "operationId": "acceptTermsOfUse", + "summary": "User Sign Up (signUp)", + "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", + "operationId": "signUp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignUpRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/SignUpResult" } } } @@ -105810,31 +105593,23 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/displayWelcome": { + "/api/noauth/signup/recaptchaParams": { "get": { "tags": [ "sign-up-controller" ], - "summary": "isDisplayWelcome", - "operationId": "isDisplayWelcome", + "summary": "getRecaptchaParams", + "operationId": "getRecaptchaParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/CaptchaClientParams" } } } @@ -105959,174 +105734,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/notDisplayWelcome": { + "/api/signup/acceptPrivacyPolicy": { "post": { "tags": [ "sign-up-controller" ], - "summary": "setNotDisplayWelcome", - "operationId": "setNotDisplayWelcome", - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/signup/privacyPolicyAccepted": { - "get": { - "tags": [ - "sign-up-controller" - ], - "summary": "Check privacy policy (privacyPolicyAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "privacyPolicyAccepted", + "summary": "Accept privacy policy (acceptPrivacyPolicy)", + "description": "Accept privacy policy by the current user.", + "operationId": "acceptPrivacyPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/JwtPair" } } } @@ -106142,7 +105767,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -106262,25 +105887,23 @@ ] } }, - "/api/signup/tenantAccount": { + "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { "post": { "tags": [ "sign-up-controller" ], - "summary": "deleteTenantAccount", - "operationId": "deleteTenantAccount", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTenantRequest" - } - } - } - }, + "summary": "acceptPrivacyPolicyAndTermsOfUse", + "operationId": "acceptPrivacyPolicyAndTermsOfUse", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -106413,21 +106036,21 @@ ] } }, - "/api/signup/termsOfUseAccepted": { - "get": { + "/api/signup/acceptTermsOfUse": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Check Terms Of User (termsOfUseAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "termsOfUseAccepted", + "summary": "Accept Terms of Use (acceptTermsOfUse)", + "description": "Accept Terms of Use by the current user.", + "operationId": "acceptTermsOfUse", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/JwtPair" } } } @@ -106443,7 +106066,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -106563,32 +106186,20 @@ ] } }, - "/api/solutions/templates/details/{solutionTemplateId}": { + "/api/signup/displayWelcome": { "get": { "tags": [ - "solution-controller" - ], - "summary": "Get Solution template details (getSolutionTemplateDetails)", - "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateDetails", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "isDisplayWelcome", + "operationId": "isDisplayWelcome", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateDetails" + "type": "boolean" } } } @@ -106724,27 +106335,16 @@ ] } }, - "/api/solutions/templates/infos": { - "get": { + "/api/signup/notDisplayWelcome": { + "post": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Get Solution templates (getSolutionTemplateInfos)", - "description": "Get a list of solution template descriptors\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateInfos", + "summary": "setNotDisplayWelcome", + "operationId": "setNotDisplayWelcome", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantSolutionTemplateInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -106757,7 +106357,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -106877,32 +106477,21 @@ ] } }, - "/api/solutions/templates/instructions/{solutionTemplateId}": { + "/api/signup/privacyPolicyAccepted": { "get": { "tags": [ - "solution-controller" - ], - "summary": "Get Solution Template Instructions (getSolutionTemplateInstructions)", - "description": "Get a solution template instructions based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateInstructions", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "Check privacy policy (privacyPolicyAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "privacyPolicyAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + "type": "boolean" } } } @@ -107038,25 +106627,22 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/delete": { - "delete": { + "/api/signup/tenantAccount": { + "post": { "tags": [ - "solution-controller" + "sign-up-controller" ], - "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", - "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "uninstallSolutionTemplate", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "deleteTenantAccount", + "operationId": "deleteTenantAccount", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTenantRequest" + } } } - ], + }, "responses": { "200": { "description": "OK" @@ -107072,7 +106658,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -107192,32 +106778,21 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/install": { - "post": { + "/api/signup/termsOfUseAccepted": { + "get": { "tags": [ - "solution-controller" - ], - "summary": "Install Solution Template (installSolutionTemplate)", - "description": "Install solution template based on the provided id\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "installSolutionTemplate", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "sign-up-controller" ], + "summary": "Check Terms Of User (termsOfUseAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "termsOfUseAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SolutionInstallResponse" + "type": "boolean" } } } @@ -107233,7 +106808,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -107359,10 +106934,10 @@ "solution-export-import-controller" ], "summary": "Export Solution (exportSolution)", - "description": "Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", + "description": "Exports a set of entities as a portable solution package. The request specifies entities to include via 'internalIds' (server-internal UUIDs) and/or 'externalIds' (looked up by the entity's stored externalId within the current tenant); at least one of the two collections must be non-empty, and entities reached via both sides are deduplicated. Optional export settings control inclusion of relations, attributes, and credentials. All resolved entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", "operationId": "exportSolution", "requestBody": { - "description": "Export request with entity IDs and optional settings.", + "description": "Export request with internal and/or external entity IDs and optional settings.", "content": { "application/json": { "schema": { @@ -107681,7 +107256,7 @@ "solution-export-import-controller" ], "summary": "Validate Solution (validateSolution)", - "description": "Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission.", + "description": "Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", "operationId": "validateSolution", "requestBody": { "description": "Solution data to validate.", @@ -123155,7 +122730,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -127741,7 +127316,7 @@ { "name": "includeCustomers", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers.", "required": false, "schema": { "type": "boolean" @@ -134758,7 +134333,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", + "description": "JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", "readOnly": true }, "type": { @@ -135490,7 +135065,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", + "description": "JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", "readOnly": true }, "type": { @@ -135801,7 +135376,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", + "description": "JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected.", "readOnly": true }, "type": { @@ -137053,8 +136628,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset." }, "name": { "type": "string", @@ -137157,8 +136731,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset." }, "name": { "type": "string", @@ -137802,6 +137375,7 @@ }, "timeseries": { "type": "array", + "description": "List of unique time series key names available on the matched entities.", "items": { "type": "string", "example": "temperature", @@ -137811,6 +137385,7 @@ }, "attribute": { "type": "array", + "description": "List of unique attribute key names available on the matched entities.", "items": { "type": "string", "example": "serialNumber", @@ -137849,6 +137424,7 @@ }, "timeseries": { "type": "array", + "description": "List of unique time series keys available on the matched entities, sorted alphabetically.\nOmitted when timeseries keys were not requested.", "items": { "$ref": "#/components/schemas/KeyInfo" } @@ -140579,7 +140155,8 @@ "readOnly": true }, "configuration": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." }, "resources": { "type": "array", @@ -140787,7 +140364,8 @@ "readOnly": true }, "configuration": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." }, "resources": { "type": "array", @@ -141978,8 +141556,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device." }, "name": { "type": "string", @@ -142323,8 +141900,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device." }, "name": { "type": "string", @@ -143276,13 +142852,12 @@ }, "tenantId": { "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "description": "JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation.", "readOnly": true }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id." }, "rootRuleChainId": { "$ref": "#/components/schemas/RuleChainId", @@ -143638,13 +143213,12 @@ }, "tenantId": { "$ref": "#/components/schemas/TenantId", - "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "description": "JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation.", "readOnly": true }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id." }, "rootRuleChainId": { "$ref": "#/components/schemas/RuleChainId", @@ -144468,7 +144042,8 @@ "CONVERTER": "#/components/schemas/ConverterExportData", "INTEGRATION": "#/components/schemas/IntegrationExportData", "ROLE": "#/components/schemas/RoleExportData", - "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateExportData" + "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateExportData", + "USER": "#/components/schemas/UserExportData" } }, "example": { @@ -144555,6 +144130,9 @@ }, "exportGroupEntities": { "type": "boolean" + }, + "embedGroupMembers": { + "type": "boolean" } } }, @@ -144637,7 +144215,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with the owner of the group - Tenant or Customer Id." + "description": "JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users)." }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -144681,18 +144259,29 @@ "properties": { "permissions": { "type": "array", + "description": "Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group.", "items": { "$ref": "#/components/schemas/GroupPermission" } }, "groupOtaPackages": { "type": "array", + "description": "OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group.", "items": { "$ref": "#/components/schemas/DeviceGroupOtaPackage" } }, "groupEntities": { - "type": "boolean" + "type": "boolean", + "description": "Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default)." + }, + "memberIds": { + "type": "array", + "description": "External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched.", + "items": { + "type": "string", + "format": "uuid" + } } } }, @@ -144704,6 +144293,7 @@ "permissions": null, "groupOtaPackages": null, "groupEntities": null, + "memberIds": null, "entity": { "createdTime": null, "id": { @@ -144805,7 +144395,7 @@ }, "ownerId": { "$ref": "#/components/schemas/EntityId", - "description": "JSON object with the owner of the group - Tenant or Customer Id." + "description": "JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users)." }, "additionalInfo": { "$ref": "#/components/schemas/JsonNode", @@ -144825,6 +144415,7 @@ }, "ownerIds": { "type": "array", + "description": "List of the entity group owners.", "items": { "$ref": "#/components/schemas/EntityId" }, @@ -144846,6 +144437,7 @@ }, "required": [ "name", + "ownerIds", "type" ] }, @@ -145562,8 +145154,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View." }, "name": { "type": "string", @@ -145677,8 +145268,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", - "readOnly": true + "description": "JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View." }, "name": { "type": "string", @@ -147054,7 +146644,8 @@ "readOnly": true }, "configuration": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." }, "resources": { "type": "array", @@ -147675,6 +147266,9 @@ "tenantId": { "$ref": "#/components/schemas/TenantId" }, + "customerId": { + "$ref": "#/components/schemas/CustomerId" + }, "type": { "$ref": "#/components/schemas/JobType" }, @@ -147696,6 +147290,11 @@ }, "result": { "$ref": "#/components/schemas/JobResult" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -148446,6 +148045,11 @@ "format": "int32", "description": "The height of a logo container. Logo image will be automatically scaled." }, + "collapsedLogoImageUrl": { + "type": "string", + "description": "Logo shown when side menu is collapsed", + "example": "https://company.com/images/collapsed-logo.png" + }, "appTitle": { "type": "string", "description": "White-labeled name of the platform", @@ -155930,8 +155534,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "name": { "type": "string", @@ -156108,8 +155711,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "name": { "type": "string", @@ -156617,8 +156219,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id. ", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "name": { "type": "string", @@ -156632,11 +156233,26 @@ }, "permissions": { "$ref": "#/components/schemas/JsonNode", - "description": "JSON object with the set of permissions. Structure is specific for role type" + "description": "Set of permissions granted by this role. The JSON shape depends on the role 'type':\n\n* GENERIC — JSON object mapping `Resource` enum names to arrays of `Operation` enum names allowed on that resource. The wildcard entry `{\"ALL\":[\"ALL\"]}` grants every operation on every resource.\n\n* GROUP — JSON array of `Operation` enum names that apply to the entity group this role is bound to via `GroupPermission.entityGroupId`. Only operations with `allowedForGroupRole=true` may appear (see `Operation` enum). The wildcard entry `[\"ALL\"]` grants every supported operation on the bound entity group.", + "example": { + "DEVICE": [ + "READ", + "WRITE", + "READ_TELEMETRY" + ], + "DASHBOARD": [ + "READ" + ] + } }, "excludedPermissions": { "$ref": "#/components/schemas/JsonNode", - "description": "JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions" + "description": "Operations to subtract from those granted by `permissions`. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant of `permissions`: a JSON object mapping `Resource` enum names to non-empty arrays of `Operation` enum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g. `permissions={\"ALL\":[\"ALL\"]}` combined with `excludedPermissions={\"DEVICE\":[\"DELETE\"]}` grants everything except deleting devices). May be null or an empty object when no exclusions apply.", + "example": { + "DEVICE": [ + "DELETE" + ] + } }, "version": { "type": "integer", @@ -157572,8 +157188,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -157651,8 +157266,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -157796,8 +157410,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -157859,8 +157472,7 @@ }, "customerId": { "$ref": "#/components/schemas/CustomerId", - "description": "JSON object with Customer Id", - "readOnly": true + "description": "JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id." }, "originatorId": { "$ref": "#/components/schemas/EntityId", @@ -158515,6 +158127,33 @@ } } }, + "SimpleValueSourceConfig": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ValueSourceType" + }, + "value": { + "type": "number", + "format": "double" + }, + "latestKeyType": { + "type": "string" + }, + "latestKey": { + "type": "string" + }, + "entityKeyType": { + "type": "string" + }, + "entityAlias": { + "type": "string" + }, + "entityKey": { + "type": "string" + } + } + }, "SingleEntityFilter": { "allOf": [ { @@ -159109,8 +158748,17 @@ "type": "object", "description": "Solution export request specifying which entities to include and export settings.", "properties": { - "entityIds": { + "internalIds": { "type": "array", + "description": "Set of internal entity IDs to export. The 'id' of each EntityId is the server-internal UUID. All listed entities must belong to the current tenant. Optional, but at least one of 'internalIds' or 'externalIds' must be non-empty.", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "uniqueItems": true + }, + "externalIds": { + "type": "array", + "description": "Set of external entity IDs to export. The 'id' of each EntityId is the external UUID (as stored in the 'externalId' field on the entity in the current tenant). The server looks up each entity by 'externalId' and 'entityType' within the current tenant. Optional, but at least one of 'internalIds' or 'externalIds' must be non-empty.", "items": { "$ref": "#/components/schemas/EntityId" }, @@ -159157,11 +158805,12 @@ "type": "integer", "format": "int32" }, - "description": "Number of newly created entities per entity type. Entity types with zero created entities are omitted.", + "description": "Number of newly created entities per entity type. Entity types with zero created entities are omitted. Entity groups are reported under the ENTITY_GROUP key regardless of their inner type (e.g. a user group and a device group both contribute to ENTITY_GROUP).", "example": { "RULE_CHAIN": 2, "DEVICE_PROFILE": 1, - "DEVICE": 3 + "DEVICE": 3, + "ENTITY_GROUP": 1 } }, "idMapping": { @@ -159174,35 +158823,6 @@ } } }, - "SolutionInstallResponse": { - "type": "object", - "properties": { - "dashboardGroupId": { - "$ref": "#/components/schemas/EntityGroupId", - "description": "Id of the group that contains main dashboard of the solution" - }, - "dashboardId": { - "$ref": "#/components/schemas/DashboardId", - "description": "Id of the main dashboard of the solution" - }, - "publicId": { - "$ref": "#/components/schemas/CustomerId", - "description": "Id of the public customer if solution has public entities" - }, - "mainDashboardPublic": { - "type": "boolean", - "description": "Is the main dashboard public" - }, - "details": { - "type": "string", - "description": "Markdown with solution usage instructions" - }, - "success": { - "type": "boolean", - "description": "Indicates that template was installed successfully" - } - } - }, "SolutionStep": { "type": "string", "enum": [ @@ -159210,14 +158830,6 @@ "DASHBOARDS_CONFIGURATION" ] }, - "SolutionTemplateLevel": { - "type": "string", - "enum": [ - "MAKER", - "PROTOTYPE", - "STARTUP" - ] - }, "SolutionValidationResult": { "type": "object", "description": "Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data.", @@ -159760,8 +159372,7 @@ 3, 4, 5, - 6, - 7 + 6 ] }, "SubscriptionId": { @@ -160496,6 +160107,7 @@ "properties": { "contents": { "type": "array", + "description": "A list of content parts that make up the complete user prompt", "items": { "$ref": "#/components/schemas/TbContent" }, @@ -161220,144 +160832,6 @@ } } }, - "TenantSolutionTemplateDetails": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID of the solution template", - "example": "smart_office" - }, - "title": { - "type": "string", - "description": "Template Title", - "example": "Smart office" - }, - "level": { - "$ref": "#/components/schemas/SolutionTemplateLevel", - "description": "Level of the subscription that is required to unlock the template", - "example": "PROTOTYPE" - }, - "installTimeoutMs": { - "type": "integer", - "format": "int64", - "description": "Timeout for the installation UI to wait while template is installing" - }, - "tenantTelemetryKeys": { - "type": "array", - "description": "What keys to delete during template uninstall", - "items": { - "type": "string" - } - }, - "tenantAttributeKeys": { - "type": "array", - "description": "What attributes to delete during template uninstall", - "items": { - "type": "string" - } - }, - "imageUrls": { - "type": "array", - "items": { - "type": "string" - } - }, - "highlights": { - "type": "string" - }, - "description": { - "type": "string" - }, - "installed": { - "type": "boolean" - } - } - }, - "TenantSolutionTemplateInfo": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID of the solution template", - "example": "smart_office" - }, - "title": { - "type": "string", - "description": "Template Title", - "example": "Smart office" - }, - "level": { - "$ref": "#/components/schemas/SolutionTemplateLevel", - "description": "Level of the subscription that is required to unlock the template", - "example": "PROTOTYPE" - }, - "installTimeoutMs": { - "type": "integer", - "format": "int64", - "description": "Timeout for the installation UI to wait while template is installing" - }, - "tenantTelemetryKeys": { - "type": "array", - "description": "What keys to delete during template uninstall", - "items": { - "type": "string" - } - }, - "tenantAttributeKeys": { - "type": "array", - "description": "What attributes to delete during template uninstall", - "items": { - "type": "string" - } - }, - "previewImageUrl": { - "type": "string", - "description": "URL of the preview image" - }, - "videoPreviewImageUrl": { - "type": "string", - "description": "Video preview image URL" - }, - "previewMp4Url": { - "type": "string", - "description": "Video MP4 URL" - }, - "previewWebmUrl": { - "type": "string", - "description": "Video WEBM URL" - }, - "installed": { - "type": "boolean", - "description": "Indicates that template is already installed for the current tenant" - } - } - }, - "TenantSolutionTemplateInstructions": { - "type": "object", - "properties": { - "dashboardGroupId": { - "$ref": "#/components/schemas/EntityGroupId", - "description": "Id of the group that contains main dashboard of the solution" - }, - "dashboardId": { - "$ref": "#/components/schemas/DashboardId", - "description": "Id of the main dashboard of the solution" - }, - "publicId": { - "$ref": "#/components/schemas/CustomerId", - "description": "Id of the public customer if solution has public entities" - }, - "mainDashboardPublic": { - "type": "boolean", - "description": "Is the main dashboard public" - }, - "details": { - "type": "string", - "description": "Markdown with solution usage instructions" - } - } - }, "TestSmsRequest": { "type": "object", "description": "A JSON value representing the Test SMS request.", @@ -161903,12 +161377,10 @@ "format": "int32" }, "min": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/SimpleValueSourceConfig" }, "max": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/SimpleValueSourceConfig" } } }, @@ -163204,6 +162676,31 @@ } } }, + "UserExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportData" + } + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "USER" + } + }, "UserGroupListFilter": { "allOf": [ { @@ -164044,6 +163541,11 @@ "format": "int32", "description": "The height of a logo container. Logo image will be automatically scaled." }, + "collapsedLogoImageUrl": { + "type": "string", + "description": "Logo shown when side menu is collapsed", + "example": "https://company.com/images/collapsed-logo.png" + }, "appTitle": { "type": "string", "description": "White-labeled name of the platform", @@ -164435,6 +163937,7 @@ "properties": { "widgets": { "type": "array", + "description": "List of widgets in the bundle", "items": { "$ref": "#/components/schemas/JsonNode" } diff --git a/paas/src/main/java/org/thingsboard/client/ApiClient.java b/paas/src/main/java/org/thingsboard/client/ApiClient.java index 9eb6f0f7..667d5ca0 100644 --- a/paas/src/main/java/org/thingsboard/client/ApiClient.java +++ b/paas/src/main/java/org/thingsboard/client/ApiClient.java @@ -173,7 +173,7 @@ public static List parameterToPairs( public ApiClient() { this.builder = createDefaultHttpClientBuilder(); this.mapper = createDefaultObjectMapper(); - updateBaseUri("http://localhost:8080"); + updateBaseUri("http://localhost:35943"); interceptor = null; readTimeout = null; connectTimeout = null; @@ -191,7 +191,7 @@ public ApiClient() { public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri) { this.builder = builder; this.mapper = mapper; - updateBaseUri(baseUri != null ? baseUri : "http://localhost:8080"); + updateBaseUri(baseUri != null ? baseUri : "http://localhost:35943"); interceptor = null; readTimeout = null; connectTimeout = null; diff --git a/paas/src/main/java/org/thingsboard/client/Configuration.java b/paas/src/main/java/org/thingsboard/client/Configuration.java index 4641961a..c632f7e2 100644 --- a/paas/src/main/java/org/thingsboard/client/Configuration.java +++ b/paas/src/main/java/org/thingsboard/client/Configuration.java @@ -22,7 +22,7 @@ @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Configuration { - public static final String VERSION = "4.4.0PAAS"; + public static final String VERSION = "4.3.1.4.0PAAS"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index b02e5576..7806aa11 100644 --- a/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/paas/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -268,7 +268,6 @@ import org.thingsboard.client.model.SolutionExportRequest; import org.thingsboard.client.model.SolutionExportResponse; import org.thingsboard.client.model.SolutionImportResult; -import org.thingsboard.client.model.SolutionInstallResponse; import org.thingsboard.client.model.SolutionStep; import org.thingsboard.client.model.SolutionValidationResult; import org.thingsboard.client.model.SubscriptionDetails; @@ -284,9 +283,6 @@ import org.thingsboard.client.model.Tenant; import org.thingsboard.client.model.TenantInfo; import org.thingsboard.client.model.TenantProfile; -import org.thingsboard.client.model.TenantSolutionTemplateDetails; -import org.thingsboard.client.model.TenantSolutionTemplateInfo; -import org.thingsboard.client.model.TenantSolutionTemplateInstructions; import org.thingsboard.client.model.TestSmsRequest; import org.thingsboard.client.model.ThingsboardCredentialsExpiredResponse; import org.thingsboard.client.model.ThingsboardErrorResponse; @@ -2084,7 +2080,7 @@ private HttpRequest.Builder autoCommitSettingsExistsRequestBuilder(Map localVarResponse = exportIntegrationPackageWithHttpInfo(integrationId, null); + return localVarResponse.getData(); + } + + /** + * Export integration as IoT Hub package + * Returns a ZIP containing integration.json, uplink.json, optional downlink.json, and form.json. Sensitive fields are tokenized via @TemplateField annotations on the integration's runtime POJO. + * @param integrationId (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<byte[]> + * @throws ApiException if fails to make API call + */ + public ApiResponse exportIntegrationPackageWithHttpInfo(@Nonnull String integrationId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = exportIntegrationPackageRequestBuilder(integrationId, 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("exportIntegrationPackage", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + byte[] 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 exportIntegrationPackageRequestBuilder(@Nonnull String integrationId, Map headers) throws ApiException { + // verify the required parameter 'integrationId' is set + if (integrationId == null) { + throw new ApiException(400, "Missing the required parameter 'integrationId' when calling exportIntegrationPackage"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/integration/{integrationId}/export-package" + .replace("{integrationId}", ApiClient.urlEncode(integrationId.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; + } + /** * Export Rule Chains * Exports all tenant rule chains as one JSON. Available for users with 'TENANT_ADMIN' authority. @@ -11813,8 +11886,8 @@ private HttpRequest.Builder exportRuleChainsRequestBuilder(@Nonnull Integer limi /** * Export Solution (exportSolution) - * Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. - * @param solutionExportRequest Export request with entity IDs and optional settings. (required) + * Exports a set of entities as a portable solution package. The request specifies entities to include via 'internalIds' (server-internal UUIDs) and/or 'externalIds' (looked up by the entity's stored externalId within the current tenant); at least one of the two collections must be non-empty, and entities reached via both sides are deduplicated. Optional export settings control inclusion of relations, attributes, and credentials. All resolved entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + * @param solutionExportRequest Export request with internal and/or external entity IDs and optional settings. (required) * @return SolutionExportResponse * @throws ApiException if fails to make API call */ @@ -11825,8 +11898,8 @@ public SolutionExportResponse exportSolution(@Nonnull SolutionExportRequest solu /** * Export Solution (exportSolution) - * Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. - * @param solutionExportRequest Export request with entity IDs and optional settings. (required) + * Exports a set of entities as a portable solution package. The request specifies entities to include via 'internalIds' (server-internal UUIDs) and/or 'externalIds' (looked up by the entity's stored externalId within the current tenant); at least one of the two collections must be non-empty, and entities reached via both sides are deduplicated. Optional export settings control inclusion of relations, attributes, and credentials. All resolved entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + * @param solutionExportRequest Export request with internal and/or external entity IDs and optional settings. (required) * @param headers Optional headers to include in the request * @return ApiResponse<SolutionExportResponse> * @throws ApiException if fails to make API call @@ -13952,6 +14025,104 @@ private HttpRequest.Builder findUsersByQueryRequestBuilder(@Nonnull Integer page return localVarRequestBuilder; } + /** + * generateDashboard + * + * @param deviceId (required) + * @param xAuthorization (required) + * @param body (required) + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode generateDashboard(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nullable Object body) throws ApiException { + ApiResponse localVarResponse = generateDashboardWithHttpInfo(deviceId, xAuthorization, body, null); + return localVarResponse.getData(); + } + + /** + * generateDashboard + * + * @param deviceId (required) + * @param xAuthorization (required) + * @param body (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 generateDashboardWithHttpInfo(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = generateDashboardRequestBuilder(deviceId, xAuthorization, 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("generateDashboard", 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 generateDashboardRequestBuilder(@Nonnull UUID deviceId, @Nonnull String xAuthorization, @Nullable Object 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 generateDashboard"); + } + // verify the required parameter 'xAuthorization' is set + if (xAuthorization == null) { + throw new ApiException(400, "Missing the required parameter 'xAuthorization' when calling generateDashboard"); + } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling generateDashboard"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/ai/devices/{deviceId}/dashboard" + .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + if (xAuthorization != null) { + localVarRequestBuilder.header("X-Authorization", xAuthorization.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + // Add custom headers if provided + localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** * Generate 2FA account config (generateTwoFaAccountConfig) * Generate new 2FA account config template for specified provider type. For TOTP, this will return a corresponding account config template with a generated OTP auth URL (with new random secret key for each API call) that can be then converted to a QR code to scan with an authenticator app. Example: ``` { \"providerType\": \"TOTP\", \"useByDefault\": false, \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=PNJDNWJVAK4ZTUYT7RFGPQLXA7XGU7PX\" } ``` For EMAIL, the generated config will contain email from user's account: ``` { \"providerType\": \"EMAIL\", \"useByDefault\": false, \"email\": \"tenant@thingsboard.org\" } ``` For SMS 2FA this method will just return a config with empty/default values as there is nothing to generate/preset: ``` { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": null } ``` Will throw an error (Bad Request) if the provider is not configured for usage. Available for any authorized user. @@ -15920,7 +16091,7 @@ private HttpRequest.Builder getAllAlarmsV2RequestBuilder(@Nonnull Integer pageSi * Returns a page of asset info objects owned by the tenant or the customer of a current user. Asset Info is an extension of the default Asset object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param assetProfileId A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param textSearch The case insensitive 'substring' filter based on the asset name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -15938,7 +16109,7 @@ public PageDataAssetInfo getAllAssetInfos(@Nonnull Integer pageSize, @Nonnull In * Returns a page of asset info objects owned by the tenant or the customer of a current user. Asset Info is an extension of the default Asset object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param assetProfileId A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param textSearch The case insensitive 'substring' filter based on the asset name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -16038,7 +16209,7 @@ private HttpRequest.Builder getAllAssetInfosRequestBuilder(@Nonnull Integer page * Returns a page of customer info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the customer title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -16055,7 +16226,7 @@ public PageDataCustomerInfo getAllCustomerInfos(@Nonnull Integer pageSize, @Nonn * Returns a page of customer info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the customer title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -16262,7 +16433,7 @@ private HttpRequest.Builder getAllCustomerUsersRequestBuilder(@Nonnull Integer p * Returns a page of dashboard info objects owned by the tenant or the customer 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' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (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) @@ -16279,7 +16450,7 @@ public PageDataDashboardInfo getAllDashboards(@Nonnull Integer pageSize, @Nonnul * Returns a page of dashboard info objects owned by the tenant or the customer 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' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (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) @@ -16376,7 +16547,7 @@ private HttpRequest.Builder getAllDashboardsRequestBuilder(@Nonnull Integer page * Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param active A boolean value representing the device active flag. (optional) * @param textSearch The case insensitive 'substring' filter based on the device name. (optional) @@ -16395,7 +16566,7 @@ public PageDataDeviceInfo getAllDeviceInfos(@Nonnull Integer pageSize, @Nonnull * Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param active A boolean value representing the device active flag. (optional) * @param textSearch The case insensitive 'substring' filter based on the device name. (optional) @@ -16582,7 +16753,7 @@ private HttpRequest.Builder getAllEdgeEntityGroupsRequestBuilder(@Nonnull String * Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type A string value representing the edge type. For example, 'default' (optional) * @param textSearch The case insensitive 'substring' filter based on the edge name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -16600,7 +16771,7 @@ public PageDataEdgeInfo getAllEdgeInfos(@Nonnull Integer pageSize, @Nonnull Inte * Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type A string value representing the edge type. For example, 'default' (optional) * @param textSearch The case insensitive 'substring' filter based on the edge name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -16961,7 +17132,7 @@ private HttpRequest.Builder getAllEntityGroupsByTypeRequestBuilder(@Nonnull Stri * Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type ## 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\" } ``` (optional) * @param textSearch The case insensitive 'substring' filter based on the entity view name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -16979,7 +17150,7 @@ public PageDataEntityViewInfo getAllEntityViewInfos(@Nonnull Integer pageSize, @ * Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type ## 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\" } ``` (optional) * @param textSearch The case insensitive 'substring' filter based on the entity view name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -17076,12 +17247,12 @@ private HttpRequest.Builder getAllEntityViewInfosRequestBuilder(@Nonnull Integer /** * Get All Report Templates for current user (getAllReportTemplateInfos) - * Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param typeList A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value. (optional) * @param formatList A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value. (optional) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the report template name or customer title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -17095,12 +17266,12 @@ public PageDataReportTemplateInfo getAllReportTemplateInfos(@Nonnull Integer pag /** * Get All Report Templates for current user (getAllReportTemplateInfos) - * Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the 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. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Returns a page of report template info objects owned by the tenant or the customer of a current user. Report Templates allows you to create reports according to the report template configuration. Report service uses report template configuration to generate report. See the 'Model' tab of the Response Class for more details. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param typeList A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value. (optional) * @param formatList A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value. (optional) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the report template name or customer title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -17364,7 +17535,7 @@ private HttpRequest.Builder getAllSharedEntityGroupsRequestBuilder(@Nonnull Stri * Returns a page of user info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -17381,7 +17552,7 @@ public PageDataUserInfo getAllUserInfos(@Nonnull Integer pageSize, @Nonnull Inte * Returns a page of user info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -22682,7 +22853,7 @@ private HttpRequest.Builder getCustomTranslationRequestBuilder(@Nonnull String l * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param assetProfileId A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param textSearch The case insensitive 'substring' filter based on the asset name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -22701,7 +22872,7 @@ public PageDataAssetInfo getCustomerAssetInfos(@Nonnull String customerId, @Nonn * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param assetProfileId A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param textSearch The case insensitive 'substring' filter based on the asset name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -23005,7 +23176,7 @@ private HttpRequest.Builder getCustomerByIdRequestBuilder(@Nonnull String custom * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the customer title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -23023,7 +23194,7 @@ public PageDataCustomerInfo getCustomerCustomerInfos(@Nonnull String customerId, * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the customer title. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -23126,7 +23297,7 @@ private HttpRequest.Builder getCustomerCustomerInfosRequestBuilder(@Nonnull Stri * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (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) @@ -23144,7 +23315,7 @@ public PageDataDashboardInfo getCustomerDashboards(@Nonnull String customerId, @ * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (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) @@ -23247,7 +23418,7 @@ private HttpRequest.Builder getCustomerDashboardsRequestBuilder(@Nonnull String * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param active A boolean value representing the device active flag. (optional) * @param textSearch The case insensitive 'substring' filter based on the device name. (optional) @@ -23267,7 +23438,7 @@ public PageDataDeviceInfo getCustomerDeviceInfos(@Nonnull String customerId, @No * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param deviceProfileId A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) * @param active A boolean value representing the device active flag. (optional) * @param textSearch The case insensitive 'substring' filter based on the device name. (optional) @@ -23497,7 +23668,7 @@ private HttpRequest.Builder getCustomerDevicesRequestBuilder(@Nonnull String cus * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type A string value representing the edge type. For example, 'default' (optional) * @param textSearch The case insensitive 'substring' filter based on the edge name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -23516,7 +23687,7 @@ public PageDataEdgeInfo getCustomerEdgeInfos(@Nonnull String customerId, @Nonnul * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type A string value representing the edge type. For example, 'default' (optional) * @param textSearch The case insensitive 'substring' filter based on the edge name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -23743,7 +23914,7 @@ private HttpRequest.Builder getCustomerEdgesRequestBuilder(@Nonnull String custo * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type ## 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\" } ``` (optional) * @param textSearch The case insensitive 'substring' filter based on the entity view name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -23762,7 +23933,7 @@ public PageDataEntityViewInfo getCustomerEntityViewInfos(@Nonnull String custome * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param type ## 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\" } ``` (optional) * @param textSearch The case insensitive 'substring' filter based on the entity view name. (optional) * @param sortProperty Property of entity to sort by (optional) @@ -24213,7 +24384,7 @@ private HttpRequest.Builder getCustomerTitleByIdRequestBuilder(@Nonnull String c * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -24231,7 +24402,7 @@ public PageDataUserInfo getCustomerUserInfos(@Nonnull String customerId, @Nonnul * @param customerId A string value representing the customer 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 includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch The case insensitive 'substring' filter based on the user email. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -32742,7 +32913,7 @@ private HttpRequest.Builder getIntegrationsConvertersInfoRequestBuilder(Map types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime) throws ApiException { - ApiResponse localVarResponse = getJobsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, types, statuses, entities, startTime, endTime, null); + public PageDataJob getJobs(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean includeCustomers) throws ApiException { + ApiResponse localVarResponse = getJobsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, types, statuses, entities, startTime, endTime, includeCustomers, null); return localVarResponse.getData(); } /** * Get jobs (getJobs) - * Returns the page of jobs. You can specify parameters to filter the 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 the page of jobs. You can specify parameters to filter the 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 pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) * @param textSearch Case-insensitive 'substring' filter based on job's description (optional) @@ -32851,12 +33023,13 @@ public PageDataJob getJobs(@Nonnull Integer pageSize, @Nonnull Integer page, @Nu * @param entities Comma-separated list of entity ids. If empty - jobs for all entities are included. (optional) * @param startTime To only include jobs created after this timestamp. (optional) * @param endTime To only include jobs created before this timestamp. (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param headers Optional headers to include in the request * @return ApiResponse<PageDataJob> * @throws ApiException if fails to make API call */ - public ApiResponse getJobsWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getJobsRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, types, statuses, entities, startTime, endTime, headers); + public ApiResponse getJobsWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean includeCustomers, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getJobsRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, types, statuses, entities, startTime, endTime, includeCustomers, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -32890,7 +33063,7 @@ public ApiResponse getJobsWithHttpInfo(@Nonnull Integer pageSize, @ } } - private HttpRequest.Builder getJobsRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, Map headers) throws ApiException { + private HttpRequest.Builder getJobsRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable List types, @Nullable List statuses, @Nullable List entities, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean includeCustomers, 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 getJobs"); @@ -32924,6 +33097,8 @@ private HttpRequest.Builder getJobsRequestBuilder(@Nonnull Integer pageSize, @No localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); localVarQueryParameterBaseName = "endTime"; localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "includeCustomers"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeCustomers", includeCustomers)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); @@ -38420,7 +38595,7 @@ private HttpRequest.Builder getRelationRequestBuilder(@Nonnull String fromId, @N /** * Get Report (getReportById) - * Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param reportId A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @return Report * @throws ApiException if fails to make API call @@ -38432,7 +38607,7 @@ public Report getReportById(@Nonnull String reportId) throws ApiException { /** * Get Report (getReportById) - * Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param reportId A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param headers Optional headers to include in the request * @return ApiResponse<Report> @@ -38502,7 +38677,7 @@ private HttpRequest.Builder getReportByIdRequestBuilder(@Nonnull String reportId * @param page Sequence number of page starting from 0 (required) * @param reportTemplateId Report template id (optional) * @param userId The user used for report generation. (optional) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch Case-insensitive 'substring' filter based on report's name or customer title (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -38521,7 +38696,7 @@ public PageDataReportInfo getReportInfos(@Nonnull Integer pageSize, @Nonnull Int * @param page Sequence number of page starting from 0 (required) * @param reportTemplateId Report template id (optional) * @param userId The user used for report generation. (optional) - * @param includeCustomers Include customer or sub-customer entities (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param textSearch Case-insensitive 'substring' filter based on report's name or customer title (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) @@ -38863,7 +39038,7 @@ private HttpRequest.Builder getReportTemplateInfoByIdRequestBuilder(@Nonnull Str /** * Get report templates by Report Template Ids (getReportTemplatesByIds) - * Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param reportTemplateIds A list of report template ids, separated by comma ',' (required) * @return List<ReportTemplateInfo> * @throws ApiException if fails to make API call @@ -38875,7 +39050,7 @@ public List getReportTemplatesByIds(@Nonnull List re /** * Get report templates by Report Template Ids (getReportTemplatesByIds) - * Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). + * Returns a list of ReportTemplateInfo objects based on the provided ids. Filters the list based on the user permissions. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). * @param reportTemplateIds A list of report template ids, separated by comma ',' (required) * @param headers Optional headers to include in the request * @return ApiResponse<List<ReportTemplateInfo>> @@ -38959,11 +39134,12 @@ private HttpRequest.Builder getReportTemplatesByIdsRequestBuilder(@Nonnull List< * @param textSearch Case-insensitive 'substring' filter based on report's name or customer title (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @return PageDataReport * @throws ApiException if fails to make API call */ - public PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { - ApiResponse localVarResponse = getReportsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Boolean includeCustomers) throws ApiException { + ApiResponse localVarResponse = getReportsWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, includeCustomers, null); return localVarResponse.getData(); } @@ -38975,12 +39151,13 @@ public PageDataReport getReports(@Nonnull Integer pageSize, @Nonnull Integer pag * @param textSearch Case-insensitive 'substring' filter based on report's name or customer title (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param includeCustomers Include customer or sub-customer entities. For tenant administrator: when true, includes entities for all customers; when false (default), only own entities are returned. For customer user: when true, includes entities for all sub-customers. (optional) * @param headers Optional headers to include in the request * @return ApiResponse<PageDataReport> * @throws ApiException if fails to make API call */ - public ApiResponse getReportsWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getReportsRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse getReportsWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Boolean includeCustomers, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getReportsRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, includeCustomers, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -39014,7 +39191,7 @@ public ApiResponse getReportsWithHttpInfo(@Nonnull Integer pageS } } - private HttpRequest.Builder getReportsRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getReportsRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Boolean includeCustomers, 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 getReports"); @@ -39038,6 +39215,8 @@ private HttpRequest.Builder getReportsRequestBuilder(@Nonnull Integer pageSize, localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); localVarQueryParameterBaseName = "sortOrder"; localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + localVarQueryParameterBaseName = "includeCustomers"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeCustomers", includeCustomers)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); @@ -40363,12 +40542,12 @@ private HttpRequest.Builder getRuleChainsByIdsRequestBuilder(@Nonnull List localVarResponse = getSolutionTemplateDetailsWithHttpInfo(solutionTemplateId, null); - return localVarResponse.getData(); - } - - /** - * Get Solution template details (getSolutionTemplateDetails) - * Get a solution template details based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<TenantSolutionTemplateDetails> - * @throws ApiException if fails to make API call - */ - public ApiResponse getSolutionTemplateDetailsWithHttpInfo(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSolutionTemplateDetailsRequestBuilder(solutionTemplateId, 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("getSolutionTemplateDetails", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); - } - String responseBody = new String(localVarResponseBody.readAllBytes()); - TenantSolutionTemplateDetails 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 getSolutionTemplateDetailsRequestBuilder(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - // verify the required parameter 'solutionTemplateId' is set - if (solutionTemplateId == null) { - throw new ApiException(400, "Missing the required parameter 'solutionTemplateId' when calling getSolutionTemplateDetails"); - } - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/solutions/templates/details/{solutionTemplateId}" - .replace("{solutionTemplateId}", ApiClient.urlEncode(solutionTemplateId.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 Solution templates (getSolutionTemplateInfos) - * Get a list of solution template descriptors Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @return List<TenantSolutionTemplateInfo> - * @throws ApiException if fails to make API call - */ - public List getSolutionTemplateInfos() throws ApiException { - ApiResponse> localVarResponse = getSolutionTemplateInfosWithHttpInfo(null); - return localVarResponse.getData(); - } - - /** - * Get Solution templates (getSolutionTemplateInfos) - * Get a list of solution template descriptors Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param headers Optional headers to include in the request - * @return ApiResponse<List<TenantSolutionTemplateInfo>> - * @throws ApiException if fails to make API call - */ - public ApiResponse> getSolutionTemplateInfosWithHttpInfo(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSolutionTemplateInfosRequestBuilder(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("getSolutionTemplateInfos", 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 getSolutionTemplateInfosRequestBuilder(Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/solutions/templates/infos"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - - /** - * Get Solution Template Instructions (getSolutionTemplateInstructions) - * Get a solution template instructions based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @return TenantSolutionTemplateInstructions - * @throws ApiException if fails to make API call - */ - public TenantSolutionTemplateInstructions getSolutionTemplateInstructions(@Nonnull String solutionTemplateId) throws ApiException { - ApiResponse localVarResponse = getSolutionTemplateInstructionsWithHttpInfo(solutionTemplateId, null); - return localVarResponse.getData(); - } - - /** - * Get Solution Template Instructions (getSolutionTemplateInstructions) - * Get a solution template instructions based on the provided id Security check is performed to verify that the user has 'READ' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<TenantSolutionTemplateInstructions> - * @throws ApiException if fails to make API call - */ - public ApiResponse getSolutionTemplateInstructionsWithHttpInfo(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getSolutionTemplateInstructionsRequestBuilder(solutionTemplateId, 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("getSolutionTemplateInstructions", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); - } - String responseBody = new String(localVarResponseBody.readAllBytes()); - TenantSolutionTemplateInstructions 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 getSolutionTemplateInstructionsRequestBuilder(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - // verify the required parameter 'solutionTemplateId' is set - if (solutionTemplateId == null) { - throw new ApiException(400, "Missing the required parameter 'solutionTemplateId' when calling getSolutionTemplateInstructions"); - } - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/solutions/templates/instructions/{solutionTemplateId}" - .replace("{solutionTemplateId}", ApiClient.urlEncode(solutionTemplateId.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; - } - /** * getSolutions * @@ -51585,83 +51540,6 @@ private HttpRequest.Builder installSolutionRequestBuilder(@Nonnull UUID solution return localVarRequestBuilder; } - /** - * Install Solution Template (installSolutionTemplate) - * Install solution template based on the provided id Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @return SolutionInstallResponse - * @throws ApiException if fails to make API call - */ - public SolutionInstallResponse installSolutionTemplate(@Nonnull String solutionTemplateId) throws ApiException { - ApiResponse localVarResponse = installSolutionTemplateWithHttpInfo(solutionTemplateId, null); - return localVarResponse.getData(); - } - - /** - * Install Solution Template (installSolutionTemplate) - * Install solution template based on the provided id Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<SolutionInstallResponse> - * @throws ApiException if fails to make API call - */ - public ApiResponse installSolutionTemplateWithHttpInfo(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = installSolutionTemplateRequestBuilder(solutionTemplateId, 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("installSolutionTemplate", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); - } - String responseBody = new String(localVarResponseBody.readAllBytes()); - SolutionInstallResponse 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 installSolutionTemplateRequestBuilder(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - // verify the required parameter 'solutionTemplateId' is set - if (solutionTemplateId == null) { - throw new ApiException(400, "Missing the required parameter 'solutionTemplateId' when calling installSolutionTemplate"); - } - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/solutions/templates/{solutionTemplateId}/install" - .replace("{solutionTemplateId}", ApiClient.urlEncode(solutionTemplateId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - // Add custom headers if provided - localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers); - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** * Check Customer White Labeling Allowed * Check if the White Labeling is enabled for the customers of the current tenant Security check is performed to verify that the user has 'WRITE' permission for the white labeling resource. Available for users with 'TENANT_ADMIN' authority. @@ -55418,7 +55296,7 @@ private HttpRequest.Builder reprocessCalculatedFieldAndWaitRequestBuilder(@Nonnu /** * Reprocess job (reprocessJob) - * Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one. Available for users with 'TENANT_ADMIN' authority. + * Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param id (required) * @throws ApiException if fails to make API call */ @@ -55428,7 +55306,7 @@ public void reprocessJob(@Nonnull UUID id) throws ApiException { /** * Reprocess job (reprocessJob) - * Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one. Available for users with 'TENANT_ADMIN' authority. + * Reprocesses the job. Failures are located at job.result.results list. Platform iterates over this list and submits new tasks for them. Doesn't create new job entity but updates the existing one. Successfully reprocessed job will look the same as completed one. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param id (required) * @param headers Optional headers to include in the request * @return ApiResponse<Void> @@ -56249,7 +56127,7 @@ private HttpRequest.Builder saveAiModelRequestBuilder(@Nonnull AiModel aiModel, /** * Create or Update Alarm (saveAlarm) - * Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. The alarm originator is an immutable routing key: when updating an existing alarm, the 'originator' in the request body must match the stored alarm's originator. A request that references an existing alarm id but carries a different originator is treated as a lookup miss and causes a 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param alarm A JSON value representing the alarm. (required) * @return Alarm * @throws ApiException if fails to make API call @@ -56261,7 +56139,7 @@ public Alarm saveAlarm(@Nonnull Alarm alarm) throws ApiException { /** * Create or Update Alarm (saveAlarm) - * Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. The alarm originator is an immutable routing key: when updating an existing alarm, the 'originator' in the request body must match the stored alarm's originator. A request that references an existing alarm id but carries a different originator is treated as a lookup miss and causes a 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param alarm A JSON value representing the alarm. (required) * @param headers Optional headers to include in the request * @return ApiResponse<Alarm> @@ -60550,7 +60428,7 @@ private HttpRequest.Builder saveRelationRequestBuilder(@Nonnull EntityRelation e /** * Save Report Template (saveReportTemplate) - * Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param reportTemplate (required) * @return ReportTemplate * @throws ApiException if fails to make API call @@ -60562,7 +60440,7 @@ public ReportTemplate saveReportTemplate(@Nonnull ReportTemplate reportTemplate) /** * Save Report Template (saveReportTemplate) - * Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). + * Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param reportTemplate (required) * @param headers Optional headers to include in the request * @return ApiResponse<ReportTemplate> @@ -62576,11 +62454,12 @@ private HttpRequest.Builder sendBillingActivationEmailRequestBuilder(@Nullable O * @param chatId (required) * @param xAuthorization (required) * @param body (required) + * @param acceptLanguage (optional) * @return List<Object> * @throws ApiException if fails to make API call */ - public List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body) throws ApiException { - ApiResponse> localVarResponse = sendChatMessageWithHttpInfo(chatId, xAuthorization, body, null); + public List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nullable Object body, @Nullable String acceptLanguage) throws ApiException { + ApiResponse> localVarResponse = sendChatMessageWithHttpInfo(chatId, xAuthorization, body, acceptLanguage, null); return localVarResponse.getData(); } @@ -62590,12 +62469,13 @@ public List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAutho * @param chatId (required) * @param xAuthorization (required) * @param body (required) + * @param acceptLanguage (optional) * @param headers Optional headers to include in the request * @return ApiResponse<List<Object>> * @throws ApiException if fails to make API call */ - public ApiResponse> sendChatMessageWithHttpInfo(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = sendChatMessageRequestBuilder(chatId, xAuthorization, body, headers); + public ApiResponse> sendChatMessageWithHttpInfo(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nullable Object body, @Nullable String acceptLanguage, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = sendChatMessageRequestBuilder(chatId, xAuthorization, body, acceptLanguage, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -62629,7 +62509,7 @@ public ApiResponse> sendChatMessageWithHttpInfo(@Nonnull UUID chatI } } - private HttpRequest.Builder sendChatMessageRequestBuilder(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body, Map headers) throws ApiException { + private HttpRequest.Builder sendChatMessageRequestBuilder(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nullable Object body, @Nullable String acceptLanguage, Map headers) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException(400, "Missing the required parameter 'chatId' when calling sendChatMessage"); @@ -62649,9 +62529,17 @@ private HttpRequest.Builder sendChatMessageRequestBuilder(@Nonnull UUID chatId, if (xAuthorization != null) { localVarRequestBuilder.header("X-Authorization", xAuthorization.toString()); } - localVarRequestBuilder.header("Content-Type", "text/plain"); + if (acceptLanguage != null) { + localVarRequestBuilder.header("Accept-Language", acceptLanguage.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "text/event-stream, application/json"); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -64229,10 +64117,10 @@ private HttpRequest.Builder shareEntityGroupRequestBuilder(@Nonnull String entit /** * Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup) - * Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. - * @param entityGroupId A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param userGroupId A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param roleId A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Share the entity group with the specified user group using the specified role. Unlike the 'shareEntityGroup' API method, this method is designed for sharing 'down' the owner hierarchy and does not require 'WRITE' permission for the shared entity group or the target user group. In particular, it allows the current user to re-share an entity group that was shared with them by the parent owner: for example, a customer user may re-share a tenant-owned dashboard group with a user group of their sub-customer. The following security checks are performed: * the target user group must belong to the current user's owner or to one of its sub-customers; * the current user must have the 'SHARE_GROUP' operation granted for the shared entity group: either as a generic permission for the corresponding entity group resource (applies only if the shared entity group belongs to the current user's owner hierarchy), or as a group permission created when the entity group was shared with the current user's user group using a group role that includes the 'SHARE_GROUP' operation; * the specified role must be a group role that is readable by the current user, so it must belong to the current user's owner or to one of its sub-customers; * the operations of the specified role must be a subset of the operations the current user was granted for the shared entity group (always passes if the current user was granted the 'ALL' operation). If the specified role also includes the 'SHARE_GROUP' operation, the members of the target user group will be able to re-share the entity group further down their own owner hierarchy in the same way. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityGroupId ID of the entity group to share (required) + * @param userGroupId ID of the user group to share the entity group with. The user group must belong to the current user's owner or to one of its sub-customers (required) + * @param roleId ID of the group role that defines the set of operations to grant to the target user group (required) * @throws ApiException if fails to make API call */ public void shareEntityGroupToChildOwnerUserGroup(@Nonnull String entityGroupId, @Nonnull String userGroupId, @Nonnull String roleId) throws ApiException { @@ -64241,10 +64129,10 @@ public void shareEntityGroupToChildOwnerUserGroup(@Nonnull String entityGroupId, /** * Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup) - * Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. - * @param entityGroupId A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param userGroupId A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param roleId A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Share the entity group with the specified user group using the specified role. Unlike the 'shareEntityGroup' API method, this method is designed for sharing 'down' the owner hierarchy and does not require 'WRITE' permission for the shared entity group or the target user group. In particular, it allows the current user to re-share an entity group that was shared with them by the parent owner: for example, a customer user may re-share a tenant-owned dashboard group with a user group of their sub-customer. The following security checks are performed: * the target user group must belong to the current user's owner or to one of its sub-customers; * the current user must have the 'SHARE_GROUP' operation granted for the shared entity group: either as a generic permission for the corresponding entity group resource (applies only if the shared entity group belongs to the current user's owner hierarchy), or as a group permission created when the entity group was shared with the current user's user group using a group role that includes the 'SHARE_GROUP' operation; * the specified role must be a group role that is readable by the current user, so it must belong to the current user's owner or to one of its sub-customers; * the operations of the specified role must be a subset of the operations the current user was granted for the shared entity group (always passes if the current user was granted the 'ALL' operation). If the specified role also includes the 'SHARE_GROUP' operation, the members of the target user group will be able to re-share the entity group further down their own owner hierarchy in the same way. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. + * @param entityGroupId ID of the entity group to share (required) + * @param userGroupId ID of the user group to share the entity group with. The user group must belong to the current user's owner or to one of its sub-customers (required) + * @param roleId ID of the group role that defines the set of operations to grant to the target user group (required) * @param headers Optional headers to include in the request * @return ApiResponse<Void> * @throws ApiException if fails to make API call @@ -65456,7 +65344,7 @@ private HttpRequest.Builder testDownLinkConverterRequestBuilder(@Nullable Object /** * Download test report (testReportAndDownload) - * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. + * Generate and download test report. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param reportRequest (required) * @return File * @throws ApiException if fails to make API call @@ -65468,7 +65356,7 @@ public File testReportAndDownload(@Nonnull ReportRequest reportRequest) throws A /** * Download test report (testReportAndDownload) - * Generate and download test report. Available for users with 'TENANT_ADMIN' authority. + * Generate and download test report. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param reportRequest (required) * @param headers Optional headers to include in the request * @return ApiResponse<File> @@ -66307,79 +66195,6 @@ private HttpRequest.Builder uninstallSolutionRequestBuilder(@Nonnull UUID soluti return localVarRequestBuilder; } - /** - * Uninstall Solution Template (uninstallSolutionTemplate) - * Uninstall solution template based on the provided id Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @throws ApiException if fails to make API call - */ - public void uninstallSolutionTemplate(@Nonnull String solutionTemplateId) throws ApiException { - uninstallSolutionTemplateWithHttpInfo(solutionTemplateId, null); - } - - /** - * Uninstall Solution Template (uninstallSolutionTemplate) - * Uninstall solution template based on the provided id Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). - * @param solutionTemplateId A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param headers Optional headers to include in the request - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - */ - public ApiResponse uninstallSolutionTemplateWithHttpInfo(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = uninstallSolutionTemplateRequestBuilder(solutionTemplateId, 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("uninstallSolutionTemplate", 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 uninstallSolutionTemplateRequestBuilder(@Nonnull String solutionTemplateId, Map headers) throws ApiException { - // verify the required parameter 'solutionTemplateId' is set - if (solutionTemplateId == null) { - throw new ApiException(400, "Missing the required parameter 'solutionTemplateId' when calling uninstallSolutionTemplate"); - } - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/solutions/templates/{solutionTemplateId}/delete" - .replace("{solutionTemplateId}", ApiClient.urlEncode(solutionTemplateId.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; - } - /** * Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain) * Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. Available for users with 'TENANT_ADMIN' authority. @@ -68731,7 +68546,7 @@ private HttpRequest.Builder validateCalculatedFieldReprocessingRequestBuilder(@N /** * Validate Solution (validateSolution) - * Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + * Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. * @param solutionData Solution data to validate. (required) * @return SolutionValidationResult * @throws ApiException if fails to make API call @@ -68743,7 +68558,7 @@ public SolutionValidationResult validateSolution(@Nonnull SolutionData solutionD /** * Validate Solution (validateSolution) - * Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + * Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. * @param solutionData Solution data to validate. (required) * @param headers Optional headers to include in the request * @return ApiResponse<SolutionValidationResult> diff --git a/paas/src/main/java/org/thingsboard/client/model/Alarm.java b/paas/src/main/java/org/thingsboard/client/model/Alarm.java index a775110c..feed3c8c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Alarm.java +++ b/paas/src/main/java/org/thingsboard/client/model/Alarm.java @@ -237,7 +237,7 @@ public TenantId getTenantId() { /** - * JSON object with Customer Id + * JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. * @return customerId */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmData.java b/paas/src/main/java/org/thingsboard/client/model/AlarmData.java index 71152843..203f6b82 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmData.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmData.java @@ -271,7 +271,7 @@ public TenantId getTenantId() { /** - * JSON object with Customer Id + * JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. * @return customerId */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java b/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java index d99ba555..a94dc041 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/AlarmInfo.java @@ -258,7 +258,7 @@ public TenantId getTenantId() { /** - * JSON object with Customer Id + * JSON object with Customer Id. Derived from the originator entity owner and cannot be set independently; any value supplied in the request body must match the originator's customer or the request is rejected. * @return customerId */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/Asset.java b/paas/src/main/java/org/thingsboard/client/model/Asset.java index f2cdae44..7b19442d 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Asset.java +++ b/paas/src/main/java/org/thingsboard/client/model/Asset.java @@ -108,13 +108,11 @@ public Asset() { public Asset( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerId = ownerId; } @@ -194,8 +192,13 @@ public TenantId getTenantId() { + public Asset customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. + * JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. * @return customerId */ @Nullable @@ -206,6 +209,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public Asset name(@Nonnull String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java b/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java index 2c8c227f..b58482af 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/AssetInfo.java @@ -121,14 +121,12 @@ public AssetInfo() { public AssetInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerName = ownerName; this.ownerId = ownerId; } @@ -209,8 +207,13 @@ public TenantId getTenantId() { + public AssetInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id. + * JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Asset. * @return customerId */ @Nullable @@ -221,6 +224,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public AssetInfo name(@Nonnull String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeys.java b/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeys.java index caaa4068..329cfdbd 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeys.java +++ b/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeys.java @@ -109,7 +109,7 @@ public AvailableEntityKeys addTimeseriesItem(String timeseriesItem) { } /** - * Get timeseries + * List of unique time series key names available on the matched entities. * @return timeseries */ @Nonnull @@ -142,7 +142,7 @@ public AvailableEntityKeys addAttributeItem(String attributeItem) { } /** - * Get attribute + * List of unique attribute key names available on the matched entities. * @return attribute */ @Nonnull diff --git a/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeysV2.java b/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeysV2.java index cf138b21..3020d852 100644 --- a/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeysV2.java +++ b/paas/src/main/java/org/thingsboard/client/model/AvailableEntityKeysV2.java @@ -144,7 +144,7 @@ public AvailableEntityKeysV2 addTimeseriesItem(KeyInfo timeseriesItem) { } /** - * Get timeseries + * List of unique time series keys available on the matched entities, sorted alphabetically. Omitted when timeseries keys were not requested. * @return timeseries */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/Dashboard.java b/paas/src/main/java/org/thingsboard/client/model/Dashboard.java index eb02a7dc..1a3053d9 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Dashboard.java +++ b/paas/src/main/java/org/thingsboard/client/model/Dashboard.java @@ -111,7 +111,7 @@ public class Dashboard { public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private com.fasterxml.jackson.databind.JsonNode _configuration; public static final String JSON_PROPERTY_RESOURCES = "resources"; @Nullable @@ -353,7 +353,7 @@ public Dashboard _configuration(@Nullable com.fasterxml.jackson.databind.JsonNod } /** - * Get _configuration + * JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. * @return _configuration */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java b/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java index 260d727f..9eb842fc 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DashboardInfo.java @@ -114,7 +114,7 @@ public class DashboardInfo { public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private com.fasterxml.jackson.databind.JsonNode _configuration; public static final String JSON_PROPERTY_RESOURCES = "resources"; @Nullable @@ -366,7 +366,7 @@ public DashboardInfo _configuration(@Nullable com.fasterxml.jackson.databind.Jso } /** - * Get _configuration + * JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. * @return _configuration */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/Device.java b/paas/src/main/java/org/thingsboard/client/model/Device.java index 3e7c2fc8..6cc72f5c 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Device.java +++ b/paas/src/main/java/org/thingsboard/client/model/Device.java @@ -124,13 +124,11 @@ public Device() { public Device( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerId = ownerId; } @@ -210,8 +208,13 @@ public TenantId getTenantId() { + public Device customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. + * JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. * @return customerId */ @Nullable @@ -222,6 +225,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public Device name(@Nullable String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java b/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java index 7e146e01..5347cfc7 100644 --- a/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -142,7 +142,6 @@ public DeviceInfo() { public DeviceInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_ACTIVE) Boolean active, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId @@ -150,7 +149,6 @@ public DeviceInfo( this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerName = ownerName; this.active = active; this.ownerId = ownerId; @@ -232,8 +230,13 @@ public TenantId getTenantId() { + public DeviceInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. + * JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Device. * @return customerId */ @Nullable @@ -244,6 +247,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public DeviceInfo name(@Nullable String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/Edge.java b/paas/src/main/java/org/thingsboard/client/model/Edge.java index bace392e..a140b769 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Edge.java +++ b/paas/src/main/java/org/thingsboard/client/model/Edge.java @@ -134,14 +134,12 @@ public Edge() { public Edge( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ROOT_RULE_CHAIN_ID) RuleChainId rootRuleChainId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.rootRuleChainId = rootRuleChainId; this.ownerId = ownerId; } @@ -209,7 +207,7 @@ public void setAdditionalInfo(@Nullable com.fasterxml.jackson.databind.JsonNode /** - * JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. + * JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. * @return tenantId */ @Nullable @@ -222,8 +220,13 @@ public TenantId getTenantId() { + public Edge customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. + * JSON object with Customer Id. * @return customerId */ @Nullable @@ -234,6 +237,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java b/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java index 825b54d9..70842195 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EdgeInfo.java @@ -147,7 +147,6 @@ public EdgeInfo() { public EdgeInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ROOT_RULE_CHAIN_ID) RuleChainId rootRuleChainId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId @@ -155,7 +154,6 @@ public EdgeInfo( this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.rootRuleChainId = rootRuleChainId; this.ownerName = ownerName; this.ownerId = ownerId; @@ -224,7 +222,7 @@ public void setAdditionalInfo(@Nullable com.fasterxml.jackson.databind.JsonNode /** - * JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. + * JSON object with Tenant Id. Always set to the tenant of the current user on save; cannot be changed after creation. * @return tenantId */ @Nullable @@ -237,8 +235,13 @@ public TenantId getTenantId() { + public EdgeInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id. + * JSON object with Customer Id. * @return customerId */ @Nullable @@ -249,6 +252,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java b/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java index 017c7271..8acbf4d1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityExportData.java @@ -84,6 +84,7 @@ @JsonSubTypes.Type(value = RuleChainExportData.class, name = "RULE_CHAIN"), @JsonSubTypes.Type(value = SchedulerEventExportData.class, name = "SCHEDULER_EVENT"), @JsonSubTypes.Type(value = TbResourceExportData.class, name = "TB_RESOURCE"), + @JsonSubTypes.Type(value = UserExportData.class, name = "USER"), @JsonSubTypes.Type(value = WidgetsBundleExportData.class, name = "WIDGETS_BUNDLE"), @JsonSubTypes.Type(value = WidgetTypeExportData.class, name = "WIDGET_TYPE"), }) @@ -400,6 +401,7 @@ public String toUrlQueryString(String prefix) { mappings.put("RULE_CHAIN", RuleChainExportData.class); mappings.put("SCHEDULER_EVENT", SchedulerEventExportData.class); mappings.put("TB_RESOURCE", TbResourceExportData.class); + mappings.put("USER", UserExportData.class); mappings.put("WIDGETS_BUNDLE", WidgetsBundleExportData.class); mappings.put("WIDGET_TYPE", WidgetTypeExportData.class); mappings.put("EntityExportData", EntityExportData.class); diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityExportSettings.java b/paas/src/main/java/org/thingsboard/client/model/EntityExportSettings.java index e1ba8cb8..0788fba9 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityExportSettings.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityExportSettings.java @@ -42,7 +42,8 @@ EntityExportSettings.JSON_PROPERTY_EXPORT_CREDENTIALS, EntityExportSettings.JSON_PROPERTY_EXPORT_CALCULATED_FIELDS, EntityExportSettings.JSON_PROPERTY_EXPORT_PERMISSIONS, - EntityExportSettings.JSON_PROPERTY_EXPORT_GROUP_ENTITIES + EntityExportSettings.JSON_PROPERTY_EXPORT_GROUP_ENTITIES, + EntityExportSettings.JSON_PROPERTY_EMBED_GROUP_MEMBERS }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class EntityExportSettings { @@ -70,6 +71,10 @@ public class EntityExportSettings { @Nullable private Boolean exportGroupEntities; + public static final String JSON_PROPERTY_EMBED_GROUP_MEMBERS = "embedGroupMembers"; + @Nullable + private Boolean embedGroupMembers; + public EntityExportSettings() { } @@ -217,6 +222,30 @@ public void setExportGroupEntities(@Nullable Boolean exportGroupEntities) { } + public EntityExportSettings embedGroupMembers(@Nullable Boolean embedGroupMembers) { + this.embedGroupMembers = embedGroupMembers; + return this; + } + + /** + * Get embedGroupMembers + * @return embedGroupMembers + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EMBED_GROUP_MEMBERS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEmbedGroupMembers() { + return embedGroupMembers; + } + + + @JsonProperty(value = JSON_PROPERTY_EMBED_GROUP_MEMBERS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmbedGroupMembers(@Nullable Boolean embedGroupMembers) { + this.embedGroupMembers = embedGroupMembers; + } + + /** * Return true if this EntityExportSettings object is equal to o. */ @@ -234,12 +263,13 @@ public boolean equals(Object o) { Objects.equals(this.exportCredentials, entityExportSettings.exportCredentials) && Objects.equals(this.exportCalculatedFields, entityExportSettings.exportCalculatedFields) && Objects.equals(this.exportPermissions, entityExportSettings.exportPermissions) && - Objects.equals(this.exportGroupEntities, entityExportSettings.exportGroupEntities); + Objects.equals(this.exportGroupEntities, entityExportSettings.exportGroupEntities) && + Objects.equals(this.embedGroupMembers, entityExportSettings.embedGroupMembers); } @Override public int hashCode() { - return Objects.hash(exportRelations, exportAttributes, exportCredentials, exportCalculatedFields, exportPermissions, exportGroupEntities); + return Objects.hash(exportRelations, exportAttributes, exportCredentials, exportCalculatedFields, exportPermissions, exportGroupEntities, embedGroupMembers); } @Override @@ -252,6 +282,7 @@ public String toString() { sb.append(" exportCalculatedFields: ").append(toIndentedString(exportCalculatedFields)).append("\n"); sb.append(" exportPermissions: ").append(toIndentedString(exportPermissions)).append("\n"); sb.append(" exportGroupEntities: ").append(toIndentedString(exportGroupEntities)).append("\n"); + sb.append(" embedGroupMembers: ").append(toIndentedString(embedGroupMembers)).append("\n"); sb.append("}"); return sb.toString(); } @@ -329,6 +360,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sexportGroupEntities%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportGroupEntities())))); } + // add `embedGroupMembers` to the URL query string + if (getEmbedGroupMembers() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sembedGroupMembers%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEmbedGroupMembers())))); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroup.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroup.java index c6be3198..11b60260 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityGroup.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroup.java @@ -340,7 +340,7 @@ public EntityGroup ownerId(@Nullable EntityId ownerId) { } /** - * JSON object with the owner of the group - Tenant or Customer Id. + * JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). * @return ownerId */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroupExportData.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroupExportData.java index 341b4257..cf3a138b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityGroupExportData.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroupExportData.java @@ -36,6 +36,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.UUID; import org.thingsboard.client.model.AttributeExportData; import org.thingsboard.client.model.CalculatedField; import org.thingsboard.client.model.DeviceGroupOtaPackage; @@ -55,7 +56,8 @@ @JsonPropertyOrder({ EntityGroupExportData.JSON_PROPERTY_PERMISSIONS, EntityGroupExportData.JSON_PROPERTY_GROUP_OTA_PACKAGES, - EntityGroupExportData.JSON_PROPERTY_GROUP_ENTITIES + EntityGroupExportData.JSON_PROPERTY_GROUP_ENTITIES, + EntityGroupExportData.JSON_PROPERTY_MEMBER_IDS }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -77,6 +79,10 @@ public class EntityGroupExportData extends EntityExportData { @Nullable private Boolean groupEntities; + public static final String JSON_PROPERTY_MEMBER_IDS = "memberIds"; + @Nullable + private List memberIds = new ArrayList<>(); + public EntityGroupExportData() { } @@ -94,7 +100,7 @@ public EntityGroupExportData addPermissionsItem(GroupPermission permissionsItem) } /** - * Get permissions + * Group permissions to apply to this group on import. Meaningful only for USER groups; ignored for groups of any other type. Each entry's userGroupId, roleId, and entityGroupId may use the external IDs of other entities in this payload or the IDs of entities that already exist on the target tenant; the importer resolves them against the target tenant. System-tenant roles are not allowed and will be rejected. Leave null to skip permission management for this group. * @return permissions */ @Nullable @@ -126,7 +132,7 @@ public EntityGroupExportData addGroupOtaPackagesItem(DeviceGroupOtaPackage group } /** - * Get groupOtaPackages + * OTA package assignments to apply to this group on import. Meaningful only for DEVICE groups; ignored for groups of any other type. Each entry's otaPackageId and groupId may reference external IDs of entities in this payload or IDs of entities that already exist on the target tenant. Leave null to skip OTA assignment management for this group. * @return groupOtaPackages */ @Nullable @@ -150,7 +156,7 @@ public EntityGroupExportData groupEntities(@Nullable Boolean groupEntities) { } /** - * Get groupEntities + * Marker indicating that the group's member entities are intended to be transported alongside this payload. Used by flows that convey members through a side channel (notably the version control flow, which stores members in a separate git index). The solution import API does not consume this flag and does not require it to be set. Safe to leave false (default). * @return groupEntities */ @Nullable @@ -168,6 +174,38 @@ public void setGroupEntities(@Nullable Boolean groupEntities) { } + public EntityGroupExportData memberIds(@Nullable List memberIds) { + this.memberIds = memberIds; + return this; + } + + public EntityGroupExportData addMemberIdsItem(UUID memberIdsItem) { + if (this.memberIds == null) { + this.memberIds = new ArrayList<>(); + } + this.memberIds.add(memberIdsItem); + return this; + } + + /** + * External IDs of the entities that should be members of this group after import. Each ID is resolved against the target tenant — by other entity in this payload, by external ID, or by existing internal ID — and the matching entities are added to the group. The import fails if any listed member cannot be resolved. Must be null for the special 'All' group (whose membership is implicit and managed by the platform). Leave null to skip membership wiring; existing membership on the target tenant is left untouched. + * @return memberIds + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MEMBER_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMemberIds() { + return memberIds; + } + + + @JsonProperty(value = JSON_PROPERTY_MEMBER_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMemberIds(@Nullable List memberIds) { + this.memberIds = memberIds; + } + + @Override public EntityGroupExportData entity(@Nullable ExportableEntity entity) { this.setEntity(entity); @@ -207,12 +245,13 @@ public boolean equals(Object o) { return Objects.equals(this.permissions, entityGroupExportData.permissions) && Objects.equals(this.groupOtaPackages, entityGroupExportData.groupOtaPackages) && Objects.equals(this.groupEntities, entityGroupExportData.groupEntities) && + Objects.equals(this.memberIds, entityGroupExportData.memberIds) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(permissions, groupOtaPackages, groupEntities, super.hashCode()); + return Objects.hash(permissions, groupOtaPackages, groupEntities, memberIds, super.hashCode()); } @Override @@ -223,6 +262,7 @@ public String toString() { sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); sb.append(" groupOtaPackages: ").append(toIndentedString(groupOtaPackages)).append("\n"); sb.append(" groupEntities: ").append(toIndentedString(groupEntities)).append("\n"); + sb.append(" memberIds: ").append(toIndentedString(memberIds)).append("\n"); sb.append("}"); return sb.toString(); } @@ -334,6 +374,17 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sgroupEntities%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getGroupEntities())))); } + // add `memberIds` to the URL query string + if (getMemberIds() != null) { + for (int i = 0; i < getMemberIds().size(); i++) { + if (getMemberIds().get(i) != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smemberIds%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMemberIds().get(i))))); + } + } + } + return joiner.toString(); } static { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java index 3e53b9ba..42c5c9fe 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java @@ -228,7 +228,7 @@ public static TypeEnum fromValue(EntityType value) { private Long version; public static final String JSON_PROPERTY_OWNER_IDS = "ownerIds"; - @Nullable + @Nonnull private Set ownerIds = new LinkedHashSet<>(); public static final String JSON_PROPERTY_EDGE_GROUP_ALL = "edgeGroupAll"; @@ -348,7 +348,7 @@ public EntityGroupInfo ownerId(@Nullable EntityId ownerId) { } /** - * JSON object with the owner of the group - Tenant or Customer Id. + * JSON object with the owner of the group - Tenant or Customer Id. When omitted or null on creation, defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). * @return ownerId */ @Nullable @@ -438,7 +438,7 @@ public void setVersion(@Nullable Long version) { } - public EntityGroupInfo ownerIds(@Nullable Set ownerIds) { + public EntityGroupInfo ownerIds(@Nonnull Set ownerIds) { this.ownerIds = ownerIds; return this; } @@ -452,21 +452,21 @@ public EntityGroupInfo addOwnerIdsItem(EntityId ownerIdsItem) { } /** - * Get ownerIds + * List of the entity group owners. * @return ownerIds */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @Nonnull + @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public Set getOwnerIds() { return ownerIds; } @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerIds(@Nullable Set ownerIds) { + @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOwnerIds(@Nonnull Set ownerIds) { this.ownerIds = ownerIds; } diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityView.java b/paas/src/main/java/org/thingsboard/client/model/EntityView.java index 9267816b..a0fa3af3 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityView.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityView.java @@ -118,13 +118,11 @@ public EntityView() { public EntityView( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerId = ownerId; } @@ -228,8 +226,13 @@ public TenantId getTenantId() { + public EntityView customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. + * JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. * @return customerId */ @Nullable @@ -240,6 +243,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public EntityView name(@Nonnull String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java b/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java index 17f2238d..5b9582ae 100644 --- a/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/EntityViewInfo.java @@ -131,14 +131,12 @@ public EntityViewInfo() { public EntityViewInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerName = ownerName; this.ownerId = ownerId; } @@ -243,8 +241,13 @@ public TenantId getTenantId() { + public EntityViewInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id. + * JSON object with Customer Id. Optional on create: when omitted, defaults to the owner of the target Entity Group or to the current Customer user. Cannot be changed on update via this endpoint; use the Owner API (changeOwnerToCustomer) to re-assign an existing Entity View. * @return customerId */ @Nullable @@ -255,6 +258,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public EntityViewInfo name(@Nonnull String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/HomeDashboard.java b/paas/src/main/java/org/thingsboard/client/model/HomeDashboard.java index 93a53ee1..6abb9fe1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/HomeDashboard.java +++ b/paas/src/main/java/org/thingsboard/client/model/HomeDashboard.java @@ -112,7 +112,7 @@ public class HomeDashboard { public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; @Nullable - private com.fasterxml.jackson.databind.JsonNode _configuration = null; + private com.fasterxml.jackson.databind.JsonNode _configuration; public static final String JSON_PROPERTY_RESOURCES = "resources"; @Nullable @@ -358,7 +358,7 @@ public HomeDashboard _configuration(@Nullable com.fasterxml.jackson.databind.Jso } /** - * Get _configuration + * JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON. * @return _configuration */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/Job.java b/paas/src/main/java/org/thingsboard/client/model/Job.java index 09a0e429..1db4f0f1 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Job.java +++ b/paas/src/main/java/org/thingsboard/client/model/Job.java @@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.thingsboard.client.model.CustomerId; import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.JobConfiguration; import org.thingsboard.client.model.JobId; @@ -48,13 +49,15 @@ Job.JSON_PROPERTY_ID, Job.JSON_PROPERTY_CREATED_TIME, Job.JSON_PROPERTY_TENANT_ID, + Job.JSON_PROPERTY_CUSTOMER_ID, Job.JSON_PROPERTY_TYPE, Job.JSON_PROPERTY_KEY, Job.JSON_PROPERTY_ENTITY_ID, Job.JSON_PROPERTY_ENTITY_NAME, Job.JSON_PROPERTY_STATUS, Job.JSON_PROPERTY_CONFIGURATION, - Job.JSON_PROPERTY_RESULT + Job.JSON_PROPERTY_RESULT, + Job.JSON_PROPERTY_OWNER_ID }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class Job { @@ -70,6 +73,10 @@ public class Job { @Nonnull private TenantId tenantId; + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + @Nullable + private CustomerId customerId; + public static final String JSON_PROPERTY_TYPE = "type"; @Nonnull private JobType type; @@ -98,15 +105,21 @@ public class Job { @Nonnull private JobResult result; + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; + @Nullable + private EntityId ownerId; + public Job() { } @JsonCreator public Job( - @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, + @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; + this.ownerId = ownerId; } public Job id(@Nullable JobId id) { @@ -171,6 +184,30 @@ public void setTenantId(@Nonnull TenantId tenantId) { } + public Job customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get customerId + * @return customerId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CustomerId getCustomerId() { + return customerId; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } + + public Job type(@Nonnull JobType type) { this.type = type; return this; @@ -339,6 +376,20 @@ public void setResult(@Nonnull JobResult result) { } + /** + * JSON object with Customer or Tenant Id + * @return ownerId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getOwnerId() { + return ownerId; + } + + + + /** * Return true if this Job object is equal to o. */ @@ -354,18 +405,20 @@ public boolean equals(Object o) { return Objects.equals(this.id, job.id) && Objects.equals(this.createdTime, job.createdTime) && Objects.equals(this.tenantId, job.tenantId) && + Objects.equals(this.customerId, job.customerId) && Objects.equals(this.type, job.type) && Objects.equals(this.key, job.key) && Objects.equals(this.entityId, job.entityId) && Objects.equals(this.entityName, job.entityName) && Objects.equals(this.status, job.status) && Objects.equals(this._configuration, job._configuration) && - Objects.equals(this.result, job.result); + Objects.equals(this.result, job.result) && + Objects.equals(this.ownerId, job.ownerId); } @Override public int hashCode() { - return Objects.hash(id, createdTime, tenantId, type, key, entityId, entityName, status, _configuration, result); + return Objects.hash(id, createdTime, tenantId, customerId, type, key, entityId, entityName, status, _configuration, result, ownerId); } @Override @@ -375,6 +428,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); @@ -382,6 +436,7 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -444,6 +499,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); } + // add `customerId` to the URL query string + if (getCustomerId() != null) { + joiner.add(getCustomerId().toUrlQueryString(prefix + "customerId" + suffix)); + } + // add `type` to the URL query string if (getType() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); @@ -479,6 +539,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getResult().toUrlQueryString(prefix + "result" + suffix)); } + // add `ownerId` to the URL query string + if (getOwnerId() != null) { + joiner.add(getOwnerId().toUrlQueryString(prefix + "ownerId" + suffix)); + } + return joiner.toString(); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/LoginWhiteLabelingParams.java b/paas/src/main/java/org/thingsboard/client/model/LoginWhiteLabelingParams.java index 93a06c21..4f37b59b 100644 --- a/paas/src/main/java/org/thingsboard/client/model/LoginWhiteLabelingParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/LoginWhiteLabelingParams.java @@ -42,6 +42,7 @@ @JsonPropertyOrder({ LoginWhiteLabelingParams.JSON_PROPERTY_LOGO_IMAGE_URL, LoginWhiteLabelingParams.JSON_PROPERTY_LOGO_IMAGE_HEIGHT, + LoginWhiteLabelingParams.JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL, LoginWhiteLabelingParams.JSON_PROPERTY_APP_TITLE, LoginWhiteLabelingParams.JSON_PROPERTY_FAVICON, LoginWhiteLabelingParams.JSON_PROPERTY_PALETTE_SETTINGS, @@ -74,6 +75,10 @@ public class LoginWhiteLabelingParams { @Nullable private Integer logoImageHeight; + public static final String JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL = "collapsedLogoImageUrl"; + @Nullable + private String collapsedLogoImageUrl; + public static final String JSON_PROPERTY_APP_TITLE = "appTitle"; @Nullable private String appTitle; @@ -217,6 +222,30 @@ public void setLogoImageHeight(@Nullable Integer logoImageHeight) { } + public LoginWhiteLabelingParams collapsedLogoImageUrl(@Nullable String collapsedLogoImageUrl) { + this.collapsedLogoImageUrl = collapsedLogoImageUrl; + return this; + } + + /** + * Logo shown when side menu is collapsed + * @return collapsedLogoImageUrl + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCollapsedLogoImageUrl() { + return collapsedLogoImageUrl; + } + + + @JsonProperty(value = JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCollapsedLogoImageUrl(@Nullable String collapsedLogoImageUrl) { + this.collapsedLogoImageUrl = collapsedLogoImageUrl; + } + + public LoginWhiteLabelingParams appTitle(@Nullable String appTitle) { this.appTitle = appTitle; return this; @@ -725,6 +754,7 @@ public boolean equals(Object o) { LoginWhiteLabelingParams loginWhiteLabelingParams = (LoginWhiteLabelingParams) o; return Objects.equals(this.logoImageUrl, loginWhiteLabelingParams.logoImageUrl) && Objects.equals(this.logoImageHeight, loginWhiteLabelingParams.logoImageHeight) && + Objects.equals(this.collapsedLogoImageUrl, loginWhiteLabelingParams.collapsedLogoImageUrl) && Objects.equals(this.appTitle, loginWhiteLabelingParams.appTitle) && Objects.equals(this.favicon, loginWhiteLabelingParams.favicon) && Objects.equals(this.paletteSettings, loginWhiteLabelingParams.paletteSettings) && @@ -750,7 +780,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(logoImageUrl, logoImageHeight, appTitle, favicon, paletteSettings, helpLinkBaseUrl, uiHelpBaseUrl, enableHelpLinks, whiteLabelingEnabled, showNameVersion, platformName, platformVersion, customCss, hideConnectivityDialog, overrideTrendzName, hideChatBot, pageBackgroundColor, darkForeground, domainId, baseUrl, prohibitDifferentUrl, adminSettingsId, showNameBottom); + return Objects.hash(logoImageUrl, logoImageHeight, collapsedLogoImageUrl, appTitle, favicon, paletteSettings, helpLinkBaseUrl, uiHelpBaseUrl, enableHelpLinks, whiteLabelingEnabled, showNameVersion, platformName, platformVersion, customCss, hideConnectivityDialog, overrideTrendzName, hideChatBot, pageBackgroundColor, darkForeground, domainId, baseUrl, prohibitDifferentUrl, adminSettingsId, showNameBottom); } @Override @@ -759,6 +789,7 @@ public String toString() { sb.append("class LoginWhiteLabelingParams {\n"); sb.append(" logoImageUrl: ").append(toIndentedString(logoImageUrl)).append("\n"); sb.append(" logoImageHeight: ").append(toIndentedString(logoImageHeight)).append("\n"); + sb.append(" collapsedLogoImageUrl: ").append(toIndentedString(collapsedLogoImageUrl)).append("\n"); sb.append(" appTitle: ").append(toIndentedString(appTitle)).append("\n"); sb.append(" favicon: ").append(toIndentedString(favicon)).append("\n"); sb.append(" paletteSettings: ").append(toIndentedString(paletteSettings)).append("\n"); @@ -837,6 +868,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slogoImageHeight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLogoImageHeight())))); } + // add `collapsedLogoImageUrl` to the URL query string + if (getCollapsedLogoImageUrl() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%scollapsedLogoImageUrl%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCollapsedLogoImageUrl())))); + } + // add `appTitle` to the URL query string if (getAppTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sappTitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAppTitle())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java b/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java index 7528c80f..6a6396f0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/MobileSelfRegistrationParams.java @@ -166,6 +166,12 @@ public MobileSelfRegistrationParams captcha(@Nullable CaptchaParams captcha) { return this; } + @Override + public MobileSelfRegistrationParams permissions(@Nullable List permissions) { + this.setPermissions(permissions); + return this; + } + @Override public MobileSelfRegistrationParams notificationRecipient(@Nullable NotificationTargetId notificationRecipient) { this.setNotificationRecipient(notificationRecipient); diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java index 68116cff..0bbff944 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplate.java @@ -110,13 +110,11 @@ public ReportTemplate() { public ReportTemplate( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerId = ownerId; } @@ -172,8 +170,13 @@ public TenantId getTenantId() { + public ReportTemplate customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id + * JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -184,6 +187,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public ReportTemplate name(@Nonnull String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java index e7d7fab2..db2787f7 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ReportTemplateInfo.java @@ -109,14 +109,12 @@ public ReportTemplateInfo() { public ReportTemplateInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_NAME) String ownerName, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerName = ownerName; this.ownerId = ownerId; } @@ -173,8 +171,13 @@ public TenantId getTenantId() { + public ReportTemplateInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id + * JSON object with Customer Id. Optional: when omitted the Report Template is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -185,6 +188,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public ReportTemplateInfo name(@Nonnull String name) { diff --git a/paas/src/main/java/org/thingsboard/client/model/Role.java b/paas/src/main/java/org/thingsboard/client/model/Role.java index e6b9bc72..9499b35a 100644 --- a/paas/src/main/java/org/thingsboard/client/model/Role.java +++ b/paas/src/main/java/org/thingsboard/client/model/Role.java @@ -108,13 +108,11 @@ public Role() { public Role( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.ownerId = ownerId; } @@ -194,8 +192,13 @@ public TenantId getTenantId() { + public Role customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id. + * JSON object with Customer Id. Optional: when omitted the Role is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -206,6 +209,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } public Role name(@Nonnull String name) { @@ -262,7 +270,7 @@ public Role permissions(@Nonnull com.fasterxml.jackson.databind.JsonNode permiss } /** - * JSON object with the set of permissions. Structure is specific for role type + * Set of permissions granted by this role. The JSON shape depends on the role 'type': * GENERIC — JSON object mapping `Resource` enum names to arrays of `Operation` enum names allowed on that resource. The wildcard entry `{\"ALL\":[\"ALL\"]}` grants every operation on every resource. * GROUP — JSON array of `Operation` enum names that apply to the entity group this role is bound to via `GroupPermission.entityGroupId`. Only operations with `allowedForGroupRole=true` may appear (see `Operation` enum). The wildcard entry `[\"ALL\"]` grants every supported operation on the bound entity group. * @return permissions */ @Nonnull @@ -286,7 +294,7 @@ public Role excludedPermissions(@Nullable com.fasterxml.jackson.databind.JsonNod } /** - * JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions + * Operations to subtract from those granted by `permissions`. Only applicable to GENERIC roles — setting this on a GROUP role is rejected by validation. Same shape as the GENERIC variant of `permissions`: a JSON object mapping `Resource` enum names to non-empty arrays of `Operation` enum names. At evaluation time, for each resource the listed operations are removed from the resolved permission set (e.g. `permissions={\"ALL\":[\"ALL\"]}` combined with `excludedPermissions={\"DEVICE\":[\"DELETE\"]}` grants everything except deleting devices). May be null or an empty object when no exclusions apply. * @return excludedPermissions */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java b/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java index a658f18b..ea4bdaff 100644 --- a/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/ScheduledReportInfo.java @@ -127,7 +127,6 @@ public ScheduledReportInfo() { public ScheduledReportInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_TEMPLATE_INFO) EntityInfo templateInfo, @JsonProperty(JSON_PROPERTY_CUSTOMER_TITLE) String customerTitle, @@ -137,7 +136,6 @@ public ScheduledReportInfo( this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.originatorId = originatorId; this.templateInfo = templateInfo; this.customerTitle = customerTitle; @@ -221,8 +219,13 @@ public TenantId getTenantId() { + public ScheduledReportInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id + * JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -233,6 +236,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java index 9977355c..33069e49 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEvent.java @@ -116,14 +116,12 @@ public SchedulerEvent() { public SchedulerEvent( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.originatorId = originatorId; this.ownerId = ownerId; } @@ -204,8 +202,13 @@ public TenantId getTenantId() { + public SchedulerEvent customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id + * JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -216,6 +219,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java index 50473dc4..e3955544 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventInfo.java @@ -111,14 +111,12 @@ public SchedulerEventInfo() { public SchedulerEventInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.originatorId = originatorId; this.ownerId = ownerId; } @@ -199,8 +197,13 @@ public TenantId getTenantId() { + public SchedulerEventInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id + * JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -211,6 +214,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java index d0c63c08..2b630ce0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java +++ b/paas/src/main/java/org/thingsboard/client/model/SchedulerEventWithCustomerInfo.java @@ -128,7 +128,6 @@ public SchedulerEventWithCustomerInfo() { public SchedulerEventWithCustomerInfo( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, - @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, @JsonProperty(JSON_PROPERTY_ORIGINATOR_ID) EntityId originatorId, @JsonProperty(JSON_PROPERTY_CUSTOMER_IS_PUBLIC) Boolean customerIsPublic, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId @@ -136,7 +135,6 @@ public SchedulerEventWithCustomerInfo( this(); this.createdTime = createdTime; this.tenantId = tenantId; - this.customerId = customerId; this.originatorId = originatorId; this.customerIsPublic = customerIsPublic; this.ownerId = ownerId; @@ -218,8 +216,13 @@ public TenantId getTenantId() { + public SchedulerEventWithCustomerInfo customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + /** - * JSON object with Customer Id + * JSON object with Customer Id. Optional: when omitted the Scheduler Event is owned by the tenant. When the request is made by a Customer user, the value is forced to the user's own Customer Id. * @return customerId */ @Nullable @@ -230,6 +233,11 @@ public CustomerId getCustomerId() { } + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } /** diff --git a/paas/src/main/java/org/thingsboard/client/model/SimpleValueSourceConfig.java b/paas/src/main/java/org/thingsboard/client/model/SimpleValueSourceConfig.java new file mode 100644 index 00000000..bf5f2a8e --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/SimpleValueSourceConfig.java @@ -0,0 +1,372 @@ +/** + * 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 javax.annotation.Generated; +import javax.annotation.Nullable; +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.Arrays; +import org.thingsboard.client.model.ValueSourceType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * SimpleValueSourceConfig + */ +@JsonPropertyOrder({ + SimpleValueSourceConfig.JSON_PROPERTY_TYPE, + SimpleValueSourceConfig.JSON_PROPERTY_VALUE, + SimpleValueSourceConfig.JSON_PROPERTY_LATEST_KEY_TYPE, + SimpleValueSourceConfig.JSON_PROPERTY_LATEST_KEY, + SimpleValueSourceConfig.JSON_PROPERTY_ENTITY_KEY_TYPE, + SimpleValueSourceConfig.JSON_PROPERTY_ENTITY_ALIAS, + SimpleValueSourceConfig.JSON_PROPERTY_ENTITY_KEY +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class SimpleValueSourceConfig { + public static final String JSON_PROPERTY_TYPE = "type"; + @Nullable + private ValueSourceType type; + + public static final String JSON_PROPERTY_VALUE = "value"; + @Nullable + private Double value; + + public static final String JSON_PROPERTY_LATEST_KEY_TYPE = "latestKeyType"; + @Nullable + private String latestKeyType; + + public static final String JSON_PROPERTY_LATEST_KEY = "latestKey"; + @Nullable + private String latestKey; + + public static final String JSON_PROPERTY_ENTITY_KEY_TYPE = "entityKeyType"; + @Nullable + private String entityKeyType; + + public static final String JSON_PROPERTY_ENTITY_ALIAS = "entityAlias"; + @Nullable + private String entityAlias; + + public static final String JSON_PROPERTY_ENTITY_KEY = "entityKey"; + @Nullable + private String entityKey; + + public SimpleValueSourceConfig() { + } + + public SimpleValueSourceConfig type(@Nullable ValueSourceType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ValueSourceType getType() { + return type; + } + + + @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@Nullable ValueSourceType type) { + this.type = type; + } + + + public SimpleValueSourceConfig value(@Nullable Double value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_VALUE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getValue() { + return value; + } + + + @JsonProperty(value = JSON_PROPERTY_VALUE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(@Nullable Double value) { + this.value = value; + } + + + public SimpleValueSourceConfig latestKeyType(@Nullable String latestKeyType) { + this.latestKeyType = latestKeyType; + return this; + } + + /** + * Get latestKeyType + * @return latestKeyType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_LATEST_KEY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLatestKeyType() { + return latestKeyType; + } + + + @JsonProperty(value = JSON_PROPERTY_LATEST_KEY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLatestKeyType(@Nullable String latestKeyType) { + this.latestKeyType = latestKeyType; + } + + + public SimpleValueSourceConfig latestKey(@Nullable String latestKey) { + this.latestKey = latestKey; + return this; + } + + /** + * Get latestKey + * @return latestKey + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_LATEST_KEY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLatestKey() { + return latestKey; + } + + + @JsonProperty(value = JSON_PROPERTY_LATEST_KEY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLatestKey(@Nullable String latestKey) { + this.latestKey = latestKey; + } + + + public SimpleValueSourceConfig entityKeyType(@Nullable String entityKeyType) { + this.entityKeyType = entityKeyType; + return this; + } + + /** + * Get entityKeyType + * @return entityKeyType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_KEY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityKeyType() { + return entityKeyType; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_KEY_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityKeyType(@Nullable String entityKeyType) { + this.entityKeyType = entityKeyType; + } + + + public SimpleValueSourceConfig entityAlias(@Nullable String entityAlias) { + this.entityAlias = entityAlias; + return this; + } + + /** + * Get entityAlias + * @return entityAlias + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIAS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityAlias() { + return entityAlias; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_ALIAS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityAlias(@Nullable String entityAlias) { + this.entityAlias = entityAlias; + } + + + public SimpleValueSourceConfig entityKey(@Nullable String entityKey) { + this.entityKey = entityKey; + return this; + } + + /** + * Get entityKey + * @return entityKey + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_KEY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityKey() { + return entityKey; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_KEY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityKey(@Nullable String entityKey) { + this.entityKey = entityKey; + } + + + /** + * Return true if this SimpleValueSourceConfig object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SimpleValueSourceConfig simpleValueSourceConfig = (SimpleValueSourceConfig) o; + return Objects.equals(this.type, simpleValueSourceConfig.type) && + Objects.equals(this.value, simpleValueSourceConfig.value) && + Objects.equals(this.latestKeyType, simpleValueSourceConfig.latestKeyType) && + Objects.equals(this.latestKey, simpleValueSourceConfig.latestKey) && + Objects.equals(this.entityKeyType, simpleValueSourceConfig.entityKeyType) && + Objects.equals(this.entityAlias, simpleValueSourceConfig.entityAlias) && + Objects.equals(this.entityKey, simpleValueSourceConfig.entityKey); + } + + @Override + public int hashCode() { + return Objects.hash(type, value, latestKeyType, latestKey, entityKeyType, entityAlias, entityKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SimpleValueSourceConfig {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" latestKeyType: ").append(toIndentedString(latestKeyType)).append("\n"); + sb.append(" latestKey: ").append(toIndentedString(latestKey)).append("\n"); + sb.append(" entityKeyType: ").append(toIndentedString(entityKeyType)).append("\n"); + sb.append(" entityAlias: ").append(toIndentedString(entityAlias)).append("\n"); + sb.append(" entityKey: ").append(toIndentedString(entityKey)).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 `type` to the URL query string + if (getType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stype%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `latestKeyType` to the URL query string + if (getLatestKeyType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slatestKeyType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLatestKeyType())))); + } + + // add `latestKey` to the URL query string + if (getLatestKey() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%slatestKey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLatestKey())))); + } + + // add `entityKeyType` to the URL query string + if (getEntityKeyType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityKeyType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityKeyType())))); + } + + // add `entityAlias` to the URL query string + if (getEntityAlias() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityAlias%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityAlias())))); + } + + // add `entityKey` to the URL query string + if (getEntityKey() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentityKey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEntityKey())))); + } + + return joiner.toString(); + } +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java b/paas/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java index 0fdf1cf7..f34f62e0 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java +++ b/paas/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java @@ -42,14 +42,19 @@ * Solution export request specifying which entities to include and export settings. */ @JsonPropertyOrder({ - SolutionExportRequest.JSON_PROPERTY_ENTITY_IDS, + SolutionExportRequest.JSON_PROPERTY_INTERNAL_IDS, + SolutionExportRequest.JSON_PROPERTY_EXTERNAL_IDS, SolutionExportRequest.JSON_PROPERTY_SETTINGS }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class SolutionExportRequest { - public static final String JSON_PROPERTY_ENTITY_IDS = "entityIds"; + public static final String JSON_PROPERTY_INTERNAL_IDS = "internalIds"; @Nullable - private Set entityIds = new LinkedHashSet<>(); + private Set internalIds = new LinkedHashSet<>(); + + public static final String JSON_PROPERTY_EXTERNAL_IDS = "externalIds"; + @Nullable + private Set externalIds = new LinkedHashSet<>(); public static final String JSON_PROPERTY_SETTINGS = "settings"; @Nullable @@ -58,36 +63,69 @@ public class SolutionExportRequest { public SolutionExportRequest() { } - public SolutionExportRequest entityIds(@Nullable Set entityIds) { - this.entityIds = entityIds; + public SolutionExportRequest internalIds(@Nullable Set internalIds) { + this.internalIds = internalIds; return this; } - public SolutionExportRequest addEntityIdsItem(EntityId entityIdsItem) { - if (this.entityIds == null) { - this.entityIds = new LinkedHashSet<>(); + public SolutionExportRequest addInternalIdsItem(EntityId internalIdsItem) { + if (this.internalIds == null) { + this.internalIds = new LinkedHashSet<>(); } - this.entityIds.add(entityIdsItem); + this.internalIds.add(internalIdsItem); return this; } /** - * Get entityIds - * @return entityIds + * Set of internal entity IDs to export. The 'id' of each EntityId is the server-internal UUID. All listed entities must belong to the current tenant. Optional, but at least one of 'internalIds' or 'externalIds' must be non-empty. + * @return internalIds */ @Nullable - @JsonProperty(value = JSON_PROPERTY_ENTITY_IDS, required = false) + @JsonProperty(value = JSON_PROPERTY_INTERNAL_IDS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Set getEntityIds() { - return entityIds; + public Set getInternalIds() { + return internalIds; } @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_ENTITY_IDS, required = false) + @JsonProperty(value = JSON_PROPERTY_INTERNAL_IDS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEntityIds(@Nullable Set entityIds) { - this.entityIds = entityIds; + public void setInternalIds(@Nullable Set internalIds) { + this.internalIds = internalIds; + } + + + public SolutionExportRequest externalIds(@Nullable Set externalIds) { + this.externalIds = externalIds; + return this; + } + + public SolutionExportRequest addExternalIdsItem(EntityId externalIdsItem) { + if (this.externalIds == null) { + this.externalIds = new LinkedHashSet<>(); + } + this.externalIds.add(externalIdsItem); + return this; + } + + /** + * Set of external entity IDs to export. The 'id' of each EntityId is the external UUID (as stored in the 'externalId' field on the entity in the current tenant). The server looks up each entity by 'externalId' and 'entityType' within the current tenant. Optional, but at least one of 'internalIds' or 'externalIds' must be non-empty. + * @return externalIds + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXTERNAL_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getExternalIds() { + return externalIds; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(value = JSON_PROPERTY_EXTERNAL_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExternalIds(@Nullable Set externalIds) { + this.externalIds = externalIds; } @@ -127,20 +165,22 @@ public boolean equals(Object o) { return false; } SolutionExportRequest solutionExportRequest = (SolutionExportRequest) o; - return Objects.equals(this.entityIds, solutionExportRequest.entityIds) && + return Objects.equals(this.internalIds, solutionExportRequest.internalIds) && + Objects.equals(this.externalIds, solutionExportRequest.externalIds) && Objects.equals(this.settings, solutionExportRequest.settings); } @Override public int hashCode() { - return Objects.hash(entityIds, settings); + return Objects.hash(internalIds, externalIds, settings); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SolutionExportRequest {\n"); - sb.append(" entityIds: ").append(toIndentedString(entityIds)).append("\n"); + sb.append(" internalIds: ").append(toIndentedString(internalIds)).append("\n"); + sb.append(" externalIds: ").append(toIndentedString(externalIds)).append("\n"); sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); sb.append("}"); return sb.toString(); @@ -189,12 +229,24 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `entityIds` to the URL query string - if (getEntityIds() != null) { + // add `internalIds` to the URL query string + if (getInternalIds() != null) { + int i = 0; + for (EntityId _item : getInternalIds()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sinternalIds%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + + // add `externalIds` to the URL query string + if (getExternalIds() != null) { int i = 0; - for (EntityId _item : getEntityIds()) { + for (EntityId _item : getExternalIds()) { if (_item != null) { - joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityIds%s%s", prefix, suffix, + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sexternalIds%s%s", prefix, suffix, "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); } } diff --git a/paas/src/main/java/org/thingsboard/client/model/SolutionImportResult.java b/paas/src/main/java/org/thingsboard/client/model/SolutionImportResult.java index daf26892..55cbb1f2 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SolutionImportResult.java +++ b/paas/src/main/java/org/thingsboard/client/model/SolutionImportResult.java @@ -99,7 +99,7 @@ public SolutionImportResult putCreatedItem(String key, Integer createdItem) { } /** - * Number of newly created entities per entity type. Entity types with zero created entities are omitted. + * Number of newly created entities per entity type. Entity types with zero created entities are omitted. Entity groups are reported under the ENTITY_GROUP key regardless of their inner type (e.g. a user group and a device group both contribute to ENTITY_GROUP). * @return created */ @Nullable diff --git a/paas/src/main/java/org/thingsboard/client/model/SolutionInstallResponse.java b/paas/src/main/java/org/thingsboard/client/model/SolutionInstallResponse.java deleted file mode 100644 index 27a778c4..00000000 --- a/paas/src/main/java/org/thingsboard/client/model/SolutionInstallResponse.java +++ /dev/null @@ -1,338 +0,0 @@ -/** - * 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 javax.annotation.Generated; -import javax.annotation.Nullable; -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.Arrays; -import org.thingsboard.client.model.CustomerId; -import org.thingsboard.client.model.DashboardId; -import org.thingsboard.client.model.EntityGroupId; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * SolutionInstallResponse - */ -@JsonPropertyOrder({ - SolutionInstallResponse.JSON_PROPERTY_DASHBOARD_GROUP_ID, - SolutionInstallResponse.JSON_PROPERTY_DASHBOARD_ID, - SolutionInstallResponse.JSON_PROPERTY_PUBLIC_ID, - SolutionInstallResponse.JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC, - SolutionInstallResponse.JSON_PROPERTY_DETAILS, - SolutionInstallResponse.JSON_PROPERTY_SUCCESS -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class SolutionInstallResponse { - public static final String JSON_PROPERTY_DASHBOARD_GROUP_ID = "dashboardGroupId"; - @Nullable - private EntityGroupId dashboardGroupId; - - public static final String JSON_PROPERTY_DASHBOARD_ID = "dashboardId"; - @Nullable - private DashboardId dashboardId; - - public static final String JSON_PROPERTY_PUBLIC_ID = "publicId"; - @Nullable - private CustomerId publicId; - - public static final String JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC = "mainDashboardPublic"; - @Nullable - private Boolean mainDashboardPublic; - - public static final String JSON_PROPERTY_DETAILS = "details"; - @Nullable - private String details; - - public static final String JSON_PROPERTY_SUCCESS = "success"; - @Nullable - private Boolean success; - - public SolutionInstallResponse() { - } - - public SolutionInstallResponse dashboardGroupId(@Nullable EntityGroupId dashboardGroupId) { - this.dashboardGroupId = dashboardGroupId; - return this; - } - - /** - * Id of the group that contains main dashboard of the solution - * @return dashboardGroupId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityGroupId getDashboardGroupId() { - return dashboardGroupId; - } - - - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDashboardGroupId(@Nullable EntityGroupId dashboardGroupId) { - this.dashboardGroupId = dashboardGroupId; - } - - - public SolutionInstallResponse dashboardId(@Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; - return this; - } - - /** - * Id of the main dashboard of the solution - * @return dashboardId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getDashboardId() { - return dashboardId; - } - - - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDashboardId(@Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; - } - - - public SolutionInstallResponse publicId(@Nullable CustomerId publicId) { - this.publicId = publicId; - return this; - } - - /** - * Id of the public customer if solution has public entities - * @return publicId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomerId getPublicId() { - return publicId; - } - - - @JsonProperty(value = JSON_PROPERTY_PUBLIC_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPublicId(@Nullable CustomerId publicId) { - this.publicId = publicId; - } - - - public SolutionInstallResponse mainDashboardPublic(@Nullable Boolean mainDashboardPublic) { - this.mainDashboardPublic = mainDashboardPublic; - return this; - } - - /** - * Is the main dashboard public - * @return mainDashboardPublic - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMainDashboardPublic() { - return mainDashboardPublic; - } - - - @JsonProperty(value = JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMainDashboardPublic(@Nullable Boolean mainDashboardPublic) { - this.mainDashboardPublic = mainDashboardPublic; - } - - - public SolutionInstallResponse details(@Nullable String details) { - this.details = details; - return this; - } - - /** - * Markdown with solution usage instructions - * @return details - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@Nullable String details) { - this.details = details; - } - - - public SolutionInstallResponse success(@Nullable Boolean success) { - this.success = success; - return this; - } - - /** - * Indicates that template was installed successfully - * @return success - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_SUCCESS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSuccess() { - return success; - } - - - @JsonProperty(value = JSON_PROPERTY_SUCCESS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuccess(@Nullable Boolean success) { - this.success = success; - } - - - /** - * Return true if this SolutionInstallResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SolutionInstallResponse solutionInstallResponse = (SolutionInstallResponse) o; - return Objects.equals(this.dashboardGroupId, solutionInstallResponse.dashboardGroupId) && - Objects.equals(this.dashboardId, solutionInstallResponse.dashboardId) && - Objects.equals(this.publicId, solutionInstallResponse.publicId) && - Objects.equals(this.mainDashboardPublic, solutionInstallResponse.mainDashboardPublic) && - Objects.equals(this.details, solutionInstallResponse.details) && - Objects.equals(this.success, solutionInstallResponse.success); - } - - @Override - public int hashCode() { - return Objects.hash(dashboardGroupId, dashboardId, publicId, mainDashboardPublic, details, success); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SolutionInstallResponse {\n"); - sb.append(" dashboardGroupId: ").append(toIndentedString(dashboardGroupId)).append("\n"); - sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); - sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); - sb.append(" mainDashboardPublic: ").append(toIndentedString(mainDashboardPublic)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" success: ").append(toIndentedString(success)).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 `dashboardGroupId` to the URL query string - if (getDashboardGroupId() != null) { - joiner.add(getDashboardGroupId().toUrlQueryString(prefix + "dashboardGroupId" + suffix)); - } - - // add `dashboardId` to the URL query string - if (getDashboardId() != null) { - joiner.add(getDashboardId().toUrlQueryString(prefix + "dashboardId" + suffix)); - } - - // add `publicId` to the URL query string - if (getPublicId() != null) { - joiner.add(getPublicId().toUrlQueryString(prefix + "publicId" + suffix)); - } - - // add `mainDashboardPublic` to the URL query string - if (getMainDashboardPublic() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smainDashboardPublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMainDashboardPublic())))); - } - - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - - // add `success` to the URL query string - if (getSuccess() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%ssuccess%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccess())))); - } - - return joiner.toString(); - } -} - diff --git a/paas/src/main/java/org/thingsboard/client/model/SolutionTemplateLevel.java b/paas/src/main/java/org/thingsboard/client/model/SolutionTemplateLevel.java deleted file mode 100644 index c1418d30..00000000 --- a/paas/src/main/java/org/thingsboard/client/model/SolutionTemplateLevel.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 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.JsonPropertyOrder; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets SolutionTemplateLevel - */ -public enum SolutionTemplateLevel { - - MAKER("MAKER"), - - PROTOTYPE("PROTOTYPE"), - - STARTUP("STARTUP"); - - private String value; - - SolutionTemplateLevel(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SolutionTemplateLevel fromValue(String value) { - for (SolutionTemplateLevel b : SolutionTemplateLevel.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - if (prefix == null) { - prefix = ""; - } - - return String.format(java.util.Locale.ROOT, "%s=%s", prefix, this.toString()); - } - -} - diff --git a/paas/src/main/java/org/thingsboard/client/model/SubscriptionExceptionErrorCode.java b/paas/src/main/java/org/thingsboard/client/model/SubscriptionExceptionErrorCode.java index 105ba2d1..63ef6668 100644 --- a/paas/src/main/java/org/thingsboard/client/model/SubscriptionExceptionErrorCode.java +++ b/paas/src/main/java/org/thingsboard/client/model/SubscriptionExceptionErrorCode.java @@ -43,9 +43,7 @@ public enum SubscriptionExceptionErrorCode { NUMBER_5(new BigDecimal("5")), - NUMBER_6(new BigDecimal("6")), - - NUMBER_7(new BigDecimal("7")); + NUMBER_6(new BigDecimal("6")); private BigDecimal value; diff --git a/paas/src/main/java/org/thingsboard/client/model/TbUserMessage.java b/paas/src/main/java/org/thingsboard/client/model/TbUserMessage.java index 18fbe31a..b9999f8e 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TbUserMessage.java +++ b/paas/src/main/java/org/thingsboard/client/model/TbUserMessage.java @@ -65,7 +65,7 @@ public TbUserMessage addContentsItem(TbContent contentsItem) { } /** - * Get contents + * A list of content parts that make up the complete user prompt * @return contents */ @Nonnull diff --git a/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateDetails.java b/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateDetails.java deleted file mode 100644 index 3dfe8632..00000000 --- a/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateDetails.java +++ /dev/null @@ -1,518 +0,0 @@ -/** - * 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 javax.annotation.Generated; -import javax.annotation.Nullable; -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.List; -import org.thingsboard.client.model.SolutionTemplateLevel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * TenantSolutionTemplateDetails - */ -@JsonPropertyOrder({ - TenantSolutionTemplateDetails.JSON_PROPERTY_ID, - TenantSolutionTemplateDetails.JSON_PROPERTY_TITLE, - TenantSolutionTemplateDetails.JSON_PROPERTY_LEVEL, - TenantSolutionTemplateDetails.JSON_PROPERTY_INSTALL_TIMEOUT_MS, - TenantSolutionTemplateDetails.JSON_PROPERTY_TENANT_TELEMETRY_KEYS, - TenantSolutionTemplateDetails.JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS, - TenantSolutionTemplateDetails.JSON_PROPERTY_IMAGE_URLS, - TenantSolutionTemplateDetails.JSON_PROPERTY_HIGHLIGHTS, - TenantSolutionTemplateDetails.JSON_PROPERTY_DESCRIPTION, - TenantSolutionTemplateDetails.JSON_PROPERTY_INSTALLED -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantSolutionTemplateDetails { - public static final String JSON_PROPERTY_ID = "id"; - @Nullable - private String id; - - public static final String JSON_PROPERTY_TITLE = "title"; - @Nullable - private String title; - - public static final String JSON_PROPERTY_LEVEL = "level"; - @Nullable - private SolutionTemplateLevel level; - - public static final String JSON_PROPERTY_INSTALL_TIMEOUT_MS = "installTimeoutMs"; - @Nullable - private Long installTimeoutMs; - - public static final String JSON_PROPERTY_TENANT_TELEMETRY_KEYS = "tenantTelemetryKeys"; - @Nullable - private List tenantTelemetryKeys = new ArrayList<>(); - - public static final String JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS = "tenantAttributeKeys"; - @Nullable - private List tenantAttributeKeys = new ArrayList<>(); - - public static final String JSON_PROPERTY_IMAGE_URLS = "imageUrls"; - @Nullable - private List imageUrls = new ArrayList<>(); - - public static final String JSON_PROPERTY_HIGHLIGHTS = "highlights"; - @Nullable - private String highlights; - - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - @Nullable - private String description; - - public static final String JSON_PROPERTY_INSTALLED = "installed"; - @Nullable - private Boolean installed; - - public TenantSolutionTemplateDetails() { - } - - public TenantSolutionTemplateDetails id(@Nullable String id) { - this.id = id; - return this; - } - - /** - * ID of the solution template - * @return id - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@Nullable String id) { - this.id = id; - } - - - public TenantSolutionTemplateDetails title(@Nullable String title) { - this.title = title; - return this; - } - - /** - * Template Title - * @return title - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@Nullable String title) { - this.title = title; - } - - - public TenantSolutionTemplateDetails level(@Nullable SolutionTemplateLevel level) { - this.level = level; - return this; - } - - /** - * Level of the subscription that is required to unlock the template - * @return level - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_LEVEL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SolutionTemplateLevel getLevel() { - return level; - } - - - @JsonProperty(value = JSON_PROPERTY_LEVEL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLevel(@Nullable SolutionTemplateLevel level) { - this.level = level; - } - - - public TenantSolutionTemplateDetails installTimeoutMs(@Nullable Long installTimeoutMs) { - this.installTimeoutMs = installTimeoutMs; - return this; - } - - /** - * Timeout for the installation UI to wait while template is installing - * @return installTimeoutMs - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_INSTALL_TIMEOUT_MS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInstallTimeoutMs() { - return installTimeoutMs; - } - - - @JsonProperty(value = JSON_PROPERTY_INSTALL_TIMEOUT_MS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstallTimeoutMs(@Nullable Long installTimeoutMs) { - this.installTimeoutMs = installTimeoutMs; - } - - - public TenantSolutionTemplateDetails tenantTelemetryKeys(@Nullable List tenantTelemetryKeys) { - this.tenantTelemetryKeys = tenantTelemetryKeys; - return this; - } - - public TenantSolutionTemplateDetails addTenantTelemetryKeysItem(String tenantTelemetryKeysItem) { - if (this.tenantTelemetryKeys == null) { - this.tenantTelemetryKeys = new ArrayList<>(); - } - this.tenantTelemetryKeys.add(tenantTelemetryKeysItem); - return this; - } - - /** - * What keys to delete during template uninstall - * @return tenantTelemetryKeys - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_TELEMETRY_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTenantTelemetryKeys() { - return tenantTelemetryKeys; - } - - - @JsonProperty(value = JSON_PROPERTY_TENANT_TELEMETRY_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTenantTelemetryKeys(@Nullable List tenantTelemetryKeys) { - this.tenantTelemetryKeys = tenantTelemetryKeys; - } - - - public TenantSolutionTemplateDetails tenantAttributeKeys(@Nullable List tenantAttributeKeys) { - this.tenantAttributeKeys = tenantAttributeKeys; - return this; - } - - public TenantSolutionTemplateDetails addTenantAttributeKeysItem(String tenantAttributeKeysItem) { - if (this.tenantAttributeKeys == null) { - this.tenantAttributeKeys = new ArrayList<>(); - } - this.tenantAttributeKeys.add(tenantAttributeKeysItem); - return this; - } - - /** - * What attributes to delete during template uninstall - * @return tenantAttributeKeys - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTenantAttributeKeys() { - return tenantAttributeKeys; - } - - - @JsonProperty(value = JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTenantAttributeKeys(@Nullable List tenantAttributeKeys) { - this.tenantAttributeKeys = tenantAttributeKeys; - } - - - public TenantSolutionTemplateDetails imageUrls(@Nullable List imageUrls) { - this.imageUrls = imageUrls; - return this; - } - - public TenantSolutionTemplateDetails addImageUrlsItem(String imageUrlsItem) { - if (this.imageUrls == null) { - this.imageUrls = new ArrayList<>(); - } - this.imageUrls.add(imageUrlsItem); - return this; - } - - /** - * Get imageUrls - * @return imageUrls - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_IMAGE_URLS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getImageUrls() { - return imageUrls; - } - - - @JsonProperty(value = JSON_PROPERTY_IMAGE_URLS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setImageUrls(@Nullable List imageUrls) { - this.imageUrls = imageUrls; - } - - - public TenantSolutionTemplateDetails highlights(@Nullable String highlights) { - this.highlights = highlights; - return this; - } - - /** - * Get highlights - * @return highlights - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_HIGHLIGHTS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHighlights() { - return highlights; - } - - - @JsonProperty(value = JSON_PROPERTY_HIGHLIGHTS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHighlights(@Nullable String highlights) { - this.highlights = highlights; - } - - - public TenantSolutionTemplateDetails description(@Nullable String description) { - this.description = description; - return this; - } - - /** - * Get description - * @return description - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DESCRIPTION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - - - @JsonProperty(value = JSON_PROPERTY_DESCRIPTION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDescription(@Nullable String description) { - this.description = description; - } - - - public TenantSolutionTemplateDetails installed(@Nullable Boolean installed) { - this.installed = installed; - return this; - } - - /** - * Get installed - * @return installed - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_INSTALLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getInstalled() { - return installed; - } - - - @JsonProperty(value = JSON_PROPERTY_INSTALLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstalled(@Nullable Boolean installed) { - this.installed = installed; - } - - - /** - * Return true if this TenantSolutionTemplateDetails object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TenantSolutionTemplateDetails tenantSolutionTemplateDetails = (TenantSolutionTemplateDetails) o; - return Objects.equals(this.id, tenantSolutionTemplateDetails.id) && - Objects.equals(this.title, tenantSolutionTemplateDetails.title) && - Objects.equals(this.level, tenantSolutionTemplateDetails.level) && - Objects.equals(this.installTimeoutMs, tenantSolutionTemplateDetails.installTimeoutMs) && - Objects.equals(this.tenantTelemetryKeys, tenantSolutionTemplateDetails.tenantTelemetryKeys) && - Objects.equals(this.tenantAttributeKeys, tenantSolutionTemplateDetails.tenantAttributeKeys) && - Objects.equals(this.imageUrls, tenantSolutionTemplateDetails.imageUrls) && - Objects.equals(this.highlights, tenantSolutionTemplateDetails.highlights) && - Objects.equals(this.description, tenantSolutionTemplateDetails.description) && - Objects.equals(this.installed, tenantSolutionTemplateDetails.installed); - } - - @Override - public int hashCode() { - return Objects.hash(id, title, level, installTimeoutMs, tenantTelemetryKeys, tenantAttributeKeys, imageUrls, highlights, description, installed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TenantSolutionTemplateDetails {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" level: ").append(toIndentedString(level)).append("\n"); - sb.append(" installTimeoutMs: ").append(toIndentedString(installTimeoutMs)).append("\n"); - sb.append(" tenantTelemetryKeys: ").append(toIndentedString(tenantTelemetryKeys)).append("\n"); - sb.append(" tenantAttributeKeys: ").append(toIndentedString(tenantAttributeKeys)).append("\n"); - sb.append(" imageUrls: ").append(toIndentedString(imageUrls)).append("\n"); - sb.append(" highlights: ").append(toIndentedString(highlights)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" installed: ").append(toIndentedString(installed)).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 `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); - } - - // add `level` to the URL query string - if (getLevel() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slevel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLevel())))); - } - - // add `installTimeoutMs` to the URL query string - if (getInstallTimeoutMs() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinstallTimeoutMs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstallTimeoutMs())))); - } - - // add `tenantTelemetryKeys` to the URL query string - if (getTenantTelemetryKeys() != null) { - for (int i = 0; i < getTenantTelemetryKeys().size(); i++) { - joiner.add(String.format(java.util.Locale.ROOT, "%stenantTelemetryKeys%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(getTenantTelemetryKeys().get(i))))); - } - } - - // add `tenantAttributeKeys` to the URL query string - if (getTenantAttributeKeys() != null) { - for (int i = 0; i < getTenantAttributeKeys().size(); i++) { - joiner.add(String.format(java.util.Locale.ROOT, "%stenantAttributeKeys%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(getTenantAttributeKeys().get(i))))); - } - } - - // add `imageUrls` to the URL query string - if (getImageUrls() != null) { - for (int i = 0; i < getImageUrls().size(); i++) { - joiner.add(String.format(java.util.Locale.ROOT, "%simageUrls%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(getImageUrls().get(i))))); - } - } - - // add `highlights` to the URL query string - if (getHighlights() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%shighlights%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHighlights())))); - } - - // add `description` to the URL query string - if (getDescription() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdescription%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDescription())))); - } - - // add `installed` to the URL query string - if (getInstalled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinstalled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstalled())))); - } - - return joiner.toString(); - } -} - diff --git a/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInfo.java b/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInfo.java deleted file mode 100644 index ca84b6f3..00000000 --- a/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInfo.java +++ /dev/null @@ -1,542 +0,0 @@ -/** - * 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 javax.annotation.Generated; -import javax.annotation.Nullable; -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.List; -import org.thingsboard.client.model.SolutionTemplateLevel; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * TenantSolutionTemplateInfo - */ -@JsonPropertyOrder({ - TenantSolutionTemplateInfo.JSON_PROPERTY_ID, - TenantSolutionTemplateInfo.JSON_PROPERTY_TITLE, - TenantSolutionTemplateInfo.JSON_PROPERTY_LEVEL, - TenantSolutionTemplateInfo.JSON_PROPERTY_INSTALL_TIMEOUT_MS, - TenantSolutionTemplateInfo.JSON_PROPERTY_TENANT_TELEMETRY_KEYS, - TenantSolutionTemplateInfo.JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS, - TenantSolutionTemplateInfo.JSON_PROPERTY_PREVIEW_IMAGE_URL, - TenantSolutionTemplateInfo.JSON_PROPERTY_VIDEO_PREVIEW_IMAGE_URL, - TenantSolutionTemplateInfo.JSON_PROPERTY_PREVIEW_MP4_URL, - TenantSolutionTemplateInfo.JSON_PROPERTY_PREVIEW_WEBM_URL, - TenantSolutionTemplateInfo.JSON_PROPERTY_INSTALLED -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantSolutionTemplateInfo { - public static final String JSON_PROPERTY_ID = "id"; - @Nullable - private String id; - - public static final String JSON_PROPERTY_TITLE = "title"; - @Nullable - private String title; - - public static final String JSON_PROPERTY_LEVEL = "level"; - @Nullable - private SolutionTemplateLevel level; - - public static final String JSON_PROPERTY_INSTALL_TIMEOUT_MS = "installTimeoutMs"; - @Nullable - private Long installTimeoutMs; - - public static final String JSON_PROPERTY_TENANT_TELEMETRY_KEYS = "tenantTelemetryKeys"; - @Nullable - private List tenantTelemetryKeys = new ArrayList<>(); - - public static final String JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS = "tenantAttributeKeys"; - @Nullable - private List tenantAttributeKeys = new ArrayList<>(); - - public static final String JSON_PROPERTY_PREVIEW_IMAGE_URL = "previewImageUrl"; - @Nullable - private String previewImageUrl; - - public static final String JSON_PROPERTY_VIDEO_PREVIEW_IMAGE_URL = "videoPreviewImageUrl"; - @Nullable - private String videoPreviewImageUrl; - - public static final String JSON_PROPERTY_PREVIEW_MP4_URL = "previewMp4Url"; - @Nullable - private String previewMp4Url; - - public static final String JSON_PROPERTY_PREVIEW_WEBM_URL = "previewWebmUrl"; - @Nullable - private String previewWebmUrl; - - public static final String JSON_PROPERTY_INSTALLED = "installed"; - @Nullable - private Boolean installed; - - public TenantSolutionTemplateInfo() { - } - - public TenantSolutionTemplateInfo id(@Nullable String id) { - this.id = id; - return this; - } - - /** - * ID of the solution template - * @return id - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - - - @JsonProperty(value = JSON_PROPERTY_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@Nullable String id) { - this.id = id; - } - - - public TenantSolutionTemplateInfo title(@Nullable String title) { - this.title = title; - return this; - } - - /** - * Template Title - * @return title - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - - @JsonProperty(value = JSON_PROPERTY_TITLE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(@Nullable String title) { - this.title = title; - } - - - public TenantSolutionTemplateInfo level(@Nullable SolutionTemplateLevel level) { - this.level = level; - return this; - } - - /** - * Level of the subscription that is required to unlock the template - * @return level - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_LEVEL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SolutionTemplateLevel getLevel() { - return level; - } - - - @JsonProperty(value = JSON_PROPERTY_LEVEL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLevel(@Nullable SolutionTemplateLevel level) { - this.level = level; - } - - - public TenantSolutionTemplateInfo installTimeoutMs(@Nullable Long installTimeoutMs) { - this.installTimeoutMs = installTimeoutMs; - return this; - } - - /** - * Timeout for the installation UI to wait while template is installing - * @return installTimeoutMs - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_INSTALL_TIMEOUT_MS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInstallTimeoutMs() { - return installTimeoutMs; - } - - - @JsonProperty(value = JSON_PROPERTY_INSTALL_TIMEOUT_MS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstallTimeoutMs(@Nullable Long installTimeoutMs) { - this.installTimeoutMs = installTimeoutMs; - } - - - public TenantSolutionTemplateInfo tenantTelemetryKeys(@Nullable List tenantTelemetryKeys) { - this.tenantTelemetryKeys = tenantTelemetryKeys; - return this; - } - - public TenantSolutionTemplateInfo addTenantTelemetryKeysItem(String tenantTelemetryKeysItem) { - if (this.tenantTelemetryKeys == null) { - this.tenantTelemetryKeys = new ArrayList<>(); - } - this.tenantTelemetryKeys.add(tenantTelemetryKeysItem); - return this; - } - - /** - * What keys to delete during template uninstall - * @return tenantTelemetryKeys - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_TELEMETRY_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTenantTelemetryKeys() { - return tenantTelemetryKeys; - } - - - @JsonProperty(value = JSON_PROPERTY_TENANT_TELEMETRY_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTenantTelemetryKeys(@Nullable List tenantTelemetryKeys) { - this.tenantTelemetryKeys = tenantTelemetryKeys; - } - - - public TenantSolutionTemplateInfo tenantAttributeKeys(@Nullable List tenantAttributeKeys) { - this.tenantAttributeKeys = tenantAttributeKeys; - return this; - } - - public TenantSolutionTemplateInfo addTenantAttributeKeysItem(String tenantAttributeKeysItem) { - if (this.tenantAttributeKeys == null) { - this.tenantAttributeKeys = new ArrayList<>(); - } - this.tenantAttributeKeys.add(tenantAttributeKeysItem); - return this; - } - - /** - * What attributes to delete during template uninstall - * @return tenantAttributeKeys - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTenantAttributeKeys() { - return tenantAttributeKeys; - } - - - @JsonProperty(value = JSON_PROPERTY_TENANT_ATTRIBUTE_KEYS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTenantAttributeKeys(@Nullable List tenantAttributeKeys) { - this.tenantAttributeKeys = tenantAttributeKeys; - } - - - public TenantSolutionTemplateInfo previewImageUrl(@Nullable String previewImageUrl) { - this.previewImageUrl = previewImageUrl; - return this; - } - - /** - * URL of the preview image - * @return previewImageUrl - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PREVIEW_IMAGE_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPreviewImageUrl() { - return previewImageUrl; - } - - - @JsonProperty(value = JSON_PROPERTY_PREVIEW_IMAGE_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewImageUrl(@Nullable String previewImageUrl) { - this.previewImageUrl = previewImageUrl; - } - - - public TenantSolutionTemplateInfo videoPreviewImageUrl(@Nullable String videoPreviewImageUrl) { - this.videoPreviewImageUrl = videoPreviewImageUrl; - return this; - } - - /** - * Video preview image URL - * @return videoPreviewImageUrl - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_VIDEO_PREVIEW_IMAGE_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getVideoPreviewImageUrl() { - return videoPreviewImageUrl; - } - - - @JsonProperty(value = JSON_PROPERTY_VIDEO_PREVIEW_IMAGE_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVideoPreviewImageUrl(@Nullable String videoPreviewImageUrl) { - this.videoPreviewImageUrl = videoPreviewImageUrl; - } - - - public TenantSolutionTemplateInfo previewMp4Url(@Nullable String previewMp4Url) { - this.previewMp4Url = previewMp4Url; - return this; - } - - /** - * Video MP4 URL - * @return previewMp4Url - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PREVIEW_MP4_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPreviewMp4Url() { - return previewMp4Url; - } - - - @JsonProperty(value = JSON_PROPERTY_PREVIEW_MP4_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewMp4Url(@Nullable String previewMp4Url) { - this.previewMp4Url = previewMp4Url; - } - - - public TenantSolutionTemplateInfo previewWebmUrl(@Nullable String previewWebmUrl) { - this.previewWebmUrl = previewWebmUrl; - return this; - } - - /** - * Video WEBM URL - * @return previewWebmUrl - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PREVIEW_WEBM_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPreviewWebmUrl() { - return previewWebmUrl; - } - - - @JsonProperty(value = JSON_PROPERTY_PREVIEW_WEBM_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewWebmUrl(@Nullable String previewWebmUrl) { - this.previewWebmUrl = previewWebmUrl; - } - - - public TenantSolutionTemplateInfo installed(@Nullable Boolean installed) { - this.installed = installed; - return this; - } - - /** - * Indicates that template is already installed for the current tenant - * @return installed - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_INSTALLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getInstalled() { - return installed; - } - - - @JsonProperty(value = JSON_PROPERTY_INSTALLED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstalled(@Nullable Boolean installed) { - this.installed = installed; - } - - - /** - * Return true if this TenantSolutionTemplateInfo object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TenantSolutionTemplateInfo tenantSolutionTemplateInfo = (TenantSolutionTemplateInfo) o; - return Objects.equals(this.id, tenantSolutionTemplateInfo.id) && - Objects.equals(this.title, tenantSolutionTemplateInfo.title) && - Objects.equals(this.level, tenantSolutionTemplateInfo.level) && - Objects.equals(this.installTimeoutMs, tenantSolutionTemplateInfo.installTimeoutMs) && - Objects.equals(this.tenantTelemetryKeys, tenantSolutionTemplateInfo.tenantTelemetryKeys) && - Objects.equals(this.tenantAttributeKeys, tenantSolutionTemplateInfo.tenantAttributeKeys) && - Objects.equals(this.previewImageUrl, tenantSolutionTemplateInfo.previewImageUrl) && - Objects.equals(this.videoPreviewImageUrl, tenantSolutionTemplateInfo.videoPreviewImageUrl) && - Objects.equals(this.previewMp4Url, tenantSolutionTemplateInfo.previewMp4Url) && - Objects.equals(this.previewWebmUrl, tenantSolutionTemplateInfo.previewWebmUrl) && - Objects.equals(this.installed, tenantSolutionTemplateInfo.installed); - } - - @Override - public int hashCode() { - return Objects.hash(id, title, level, installTimeoutMs, tenantTelemetryKeys, tenantAttributeKeys, previewImageUrl, videoPreviewImageUrl, previewMp4Url, previewWebmUrl, installed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TenantSolutionTemplateInfo {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" level: ").append(toIndentedString(level)).append("\n"); - sb.append(" installTimeoutMs: ").append(toIndentedString(installTimeoutMs)).append("\n"); - sb.append(" tenantTelemetryKeys: ").append(toIndentedString(tenantTelemetryKeys)).append("\n"); - sb.append(" tenantAttributeKeys: ").append(toIndentedString(tenantAttributeKeys)).append("\n"); - sb.append(" previewImageUrl: ").append(toIndentedString(previewImageUrl)).append("\n"); - sb.append(" videoPreviewImageUrl: ").append(toIndentedString(videoPreviewImageUrl)).append("\n"); - sb.append(" previewMp4Url: ").append(toIndentedString(previewMp4Url)).append("\n"); - sb.append(" previewWebmUrl: ").append(toIndentedString(previewWebmUrl)).append("\n"); - sb.append(" installed: ").append(toIndentedString(installed)).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 `id` to the URL query string - if (getId() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); - } - - // add `title` to the URL query string - if (getTitle() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); - } - - // add `level` to the URL query string - if (getLevel() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%slevel%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLevel())))); - } - - // add `installTimeoutMs` to the URL query string - if (getInstallTimeoutMs() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinstallTimeoutMs%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstallTimeoutMs())))); - } - - // add `tenantTelemetryKeys` to the URL query string - if (getTenantTelemetryKeys() != null) { - for (int i = 0; i < getTenantTelemetryKeys().size(); i++) { - joiner.add(String.format(java.util.Locale.ROOT, "%stenantTelemetryKeys%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(getTenantTelemetryKeys().get(i))))); - } - } - - // add `tenantAttributeKeys` to the URL query string - if (getTenantAttributeKeys() != null) { - for (int i = 0; i < getTenantAttributeKeys().size(); i++) { - joiner.add(String.format(java.util.Locale.ROOT, "%stenantAttributeKeys%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(getTenantAttributeKeys().get(i))))); - } - } - - // add `previewImageUrl` to the URL query string - if (getPreviewImageUrl() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spreviewImageUrl%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPreviewImageUrl())))); - } - - // add `videoPreviewImageUrl` to the URL query string - if (getVideoPreviewImageUrl() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%svideoPreviewImageUrl%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVideoPreviewImageUrl())))); - } - - // add `previewMp4Url` to the URL query string - if (getPreviewMp4Url() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spreviewMp4Url%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPreviewMp4Url())))); - } - - // add `previewWebmUrl` to the URL query string - if (getPreviewWebmUrl() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spreviewWebmUrl%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPreviewWebmUrl())))); - } - - // add `installed` to the URL query string - if (getInstalled() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinstalled%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInstalled())))); - } - - return joiner.toString(); - } -} - diff --git a/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInstructions.java b/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInstructions.java deleted file mode 100644 index 236dfc75..00000000 --- a/paas/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInstructions.java +++ /dev/null @@ -1,302 +0,0 @@ -/** - * 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 javax.annotation.Generated; -import javax.annotation.Nullable; -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.Arrays; -import org.thingsboard.client.model.CustomerId; -import org.thingsboard.client.model.DashboardId; -import org.thingsboard.client.model.EntityGroupId; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * TenantSolutionTemplateInstructions - */ -@JsonPropertyOrder({ - TenantSolutionTemplateInstructions.JSON_PROPERTY_DASHBOARD_GROUP_ID, - TenantSolutionTemplateInstructions.JSON_PROPERTY_DASHBOARD_ID, - TenantSolutionTemplateInstructions.JSON_PROPERTY_PUBLIC_ID, - TenantSolutionTemplateInstructions.JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC, - TenantSolutionTemplateInstructions.JSON_PROPERTY_DETAILS -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class TenantSolutionTemplateInstructions { - public static final String JSON_PROPERTY_DASHBOARD_GROUP_ID = "dashboardGroupId"; - @Nullable - private EntityGroupId dashboardGroupId; - - public static final String JSON_PROPERTY_DASHBOARD_ID = "dashboardId"; - @Nullable - private DashboardId dashboardId; - - public static final String JSON_PROPERTY_PUBLIC_ID = "publicId"; - @Nullable - private CustomerId publicId; - - public static final String JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC = "mainDashboardPublic"; - @Nullable - private Boolean mainDashboardPublic; - - public static final String JSON_PROPERTY_DETAILS = "details"; - @Nullable - private String details; - - public TenantSolutionTemplateInstructions() { - } - - public TenantSolutionTemplateInstructions dashboardGroupId(@Nullable EntityGroupId dashboardGroupId) { - this.dashboardGroupId = dashboardGroupId; - return this; - } - - /** - * Id of the group that contains main dashboard of the solution - * @return dashboardGroupId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityGroupId getDashboardGroupId() { - return dashboardGroupId; - } - - - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_GROUP_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDashboardGroupId(@Nullable EntityGroupId dashboardGroupId) { - this.dashboardGroupId = dashboardGroupId; - } - - - public TenantSolutionTemplateInstructions dashboardId(@Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; - return this; - } - - /** - * Id of the main dashboard of the solution - * @return dashboardId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getDashboardId() { - return dashboardId; - } - - - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDashboardId(@Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; - } - - - public TenantSolutionTemplateInstructions publicId(@Nullable CustomerId publicId) { - this.publicId = publicId; - return this; - } - - /** - * Id of the public customer if solution has public entities - * @return publicId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PUBLIC_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public CustomerId getPublicId() { - return publicId; - } - - - @JsonProperty(value = JSON_PROPERTY_PUBLIC_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPublicId(@Nullable CustomerId publicId) { - this.publicId = publicId; - } - - - public TenantSolutionTemplateInstructions mainDashboardPublic(@Nullable Boolean mainDashboardPublic) { - this.mainDashboardPublic = mainDashboardPublic; - return this; - } - - /** - * Is the main dashboard public - * @return mainDashboardPublic - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMainDashboardPublic() { - return mainDashboardPublic; - } - - - @JsonProperty(value = JSON_PROPERTY_MAIN_DASHBOARD_PUBLIC, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMainDashboardPublic(@Nullable Boolean mainDashboardPublic) { - this.mainDashboardPublic = mainDashboardPublic; - } - - - public TenantSolutionTemplateInstructions details(@Nullable String details) { - this.details = details; - return this; - } - - /** - * Markdown with solution usage instructions - * @return details - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetails() { - return details; - } - - - @JsonProperty(value = JSON_PROPERTY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetails(@Nullable String details) { - this.details = details; - } - - - /** - * Return true if this TenantSolutionTemplateInstructions object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TenantSolutionTemplateInstructions tenantSolutionTemplateInstructions = (TenantSolutionTemplateInstructions) o; - return Objects.equals(this.dashboardGroupId, tenantSolutionTemplateInstructions.dashboardGroupId) && - Objects.equals(this.dashboardId, tenantSolutionTemplateInstructions.dashboardId) && - Objects.equals(this.publicId, tenantSolutionTemplateInstructions.publicId) && - Objects.equals(this.mainDashboardPublic, tenantSolutionTemplateInstructions.mainDashboardPublic) && - Objects.equals(this.details, tenantSolutionTemplateInstructions.details); - } - - @Override - public int hashCode() { - return Objects.hash(dashboardGroupId, dashboardId, publicId, mainDashboardPublic, details); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TenantSolutionTemplateInstructions {\n"); - sb.append(" dashboardGroupId: ").append(toIndentedString(dashboardGroupId)).append("\n"); - sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); - sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); - sb.append(" mainDashboardPublic: ").append(toIndentedString(mainDashboardPublic)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).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 `dashboardGroupId` to the URL query string - if (getDashboardGroupId() != null) { - joiner.add(getDashboardGroupId().toUrlQueryString(prefix + "dashboardGroupId" + suffix)); - } - - // add `dashboardId` to the URL query string - if (getDashboardId() != null) { - joiner.add(getDashboardId().toUrlQueryString(prefix + "dashboardId" + suffix)); - } - - // add `publicId` to the URL query string - if (getPublicId() != null) { - joiner.add(getPublicId().toUrlQueryString(prefix + "publicId" + suffix)); - } - - // add `mainDashboardPublic` to the URL query string - if (getMainDashboardPublic() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smainDashboardPublic%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMainDashboardPublic())))); - } - - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDetails())))); - } - - return joiner.toString(); - } -} - diff --git a/paas/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java b/paas/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java index d0d2ad23..3ac17c16 100644 --- a/paas/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java +++ b/paas/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java @@ -31,6 +31,7 @@ import java.util.Arrays; import org.thingsboard.client.model.AxisPosition; import org.thingsboard.client.model.Font; +import org.thingsboard.client.model.SimpleValueSourceConfig; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -146,11 +147,11 @@ public class TimeSeriesChartYAxisSettings { public static final String JSON_PROPERTY_MIN = "min"; @Nullable - private Double min; + private SimpleValueSourceConfig min; public static final String JSON_PROPERTY_MAX = "max"; @Nullable - private Double max; + private SimpleValueSourceConfig max; public TimeSeriesChartYAxisSettings() { } @@ -635,7 +636,7 @@ public void setSplitNumber(@Nullable Integer splitNumber) { } - public TimeSeriesChartYAxisSettings min(@Nullable Double min) { + public TimeSeriesChartYAxisSettings min(@Nullable SimpleValueSourceConfig min) { this.min = min; return this; } @@ -647,19 +648,19 @@ public TimeSeriesChartYAxisSettings min(@Nullable Double min) { @Nullable @JsonProperty(value = JSON_PROPERTY_MIN, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getMin() { + public SimpleValueSourceConfig getMin() { return min; } @JsonProperty(value = JSON_PROPERTY_MIN, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMin(@Nullable Double min) { + public void setMin(@Nullable SimpleValueSourceConfig min) { this.min = min; } - public TimeSeriesChartYAxisSettings max(@Nullable Double max) { + public TimeSeriesChartYAxisSettings max(@Nullable SimpleValueSourceConfig max) { this.max = max; return this; } @@ -671,14 +672,14 @@ public TimeSeriesChartYAxisSettings max(@Nullable Double max) { @Nullable @JsonProperty(value = JSON_PROPERTY_MAX, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getMax() { + public SimpleValueSourceConfig getMax() { return max; } @JsonProperty(value = JSON_PROPERTY_MAX, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMax(@Nullable Double max) { + public void setMax(@Nullable SimpleValueSourceConfig max) { this.max = max; } @@ -899,12 +900,12 @@ public String toUrlQueryString(String prefix) { // add `min` to the URL query string if (getMin() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smin%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMin())))); + joiner.add(getMin().toUrlQueryString(prefix + "min" + suffix)); } // add `max` to the URL query string if (getMax() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smax%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMax())))); + joiner.add(getMax().toUrlQueryString(prefix + "max" + suffix)); } return joiner.toString(); diff --git a/paas/src/main/java/org/thingsboard/client/model/UserExportData.java b/paas/src/main/java/org/thingsboard/client/model/UserExportData.java new file mode 100644 index 00000000..c8227359 --- /dev/null +++ b/paas/src/main/java/org/thingsboard/client/model/UserExportData.java @@ -0,0 +1,209 @@ +/** + * 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 javax.annotation.Generated; +import javax.annotation.Nullable; +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; +/** + * UserExportData + */ +@JsonPropertyOrder({ +}) +@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 UserExportData extends EntityExportData { + public UserExportData() { + } + + @Override + public UserExportData entity(@Nullable ExportableEntity entity) { + this.setEntity(entity); + return this; + } + + @Override + public UserExportData relations(@Nullable List relations) { + this.setRelations(relations); + return this; + } + + @Override + public UserExportData attributes(@Nullable Map> attributes) { + this.setAttributes(attributes); + return this; + } + + @Override + public UserExportData calculatedFields(@Nullable List calculatedFields) { + this.setCalculatedFields(calculatedFields); + return this; + } + + /** + * Return true if this UserExportData 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 UserExportData {\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 `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)))); + } + } + } + + // 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())))); + } + + return joiner.toString(); + } +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("UserExportData", UserExportData.class); + JSON.registerDiscriminator(UserExportData.class, "entityType", mappings); +} +} + diff --git a/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java b/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java index 367e6f0a..7ec19483 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/WebSelfRegistrationParams.java @@ -166,6 +166,12 @@ public WebSelfRegistrationParams captcha(@Nullable CaptchaParams captcha) { return this; } + @Override + public WebSelfRegistrationParams permissions(@Nullable List permissions) { + this.setPermissions(permissions); + return this; + } + @Override public WebSelfRegistrationParams notificationRecipient(@Nullable NotificationTargetId notificationRecipient) { this.setNotificationRecipient(notificationRecipient); diff --git a/paas/src/main/java/org/thingsboard/client/model/WhiteLabelingParams.java b/paas/src/main/java/org/thingsboard/client/model/WhiteLabelingParams.java index 920c14a0..7ef69c54 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WhiteLabelingParams.java +++ b/paas/src/main/java/org/thingsboard/client/model/WhiteLabelingParams.java @@ -41,6 +41,7 @@ @JsonPropertyOrder({ WhiteLabelingParams.JSON_PROPERTY_LOGO_IMAGE_URL, WhiteLabelingParams.JSON_PROPERTY_LOGO_IMAGE_HEIGHT, + WhiteLabelingParams.JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL, WhiteLabelingParams.JSON_PROPERTY_APP_TITLE, WhiteLabelingParams.JSON_PROPERTY_FAVICON, WhiteLabelingParams.JSON_PROPERTY_PALETTE_SETTINGS, @@ -66,6 +67,10 @@ public class WhiteLabelingParams { @Nullable private Integer logoImageHeight; + public static final String JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL = "collapsedLogoImageUrl"; + @Nullable + private String collapsedLogoImageUrl; + public static final String JSON_PROPERTY_APP_TITLE = "appTitle"; @Nullable private String appTitle; @@ -181,6 +186,30 @@ public void setLogoImageHeight(@Nullable Integer logoImageHeight) { } + public WhiteLabelingParams collapsedLogoImageUrl(@Nullable String collapsedLogoImageUrl) { + this.collapsedLogoImageUrl = collapsedLogoImageUrl; + return this; + } + + /** + * Logo shown when side menu is collapsed + * @return collapsedLogoImageUrl + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCollapsedLogoImageUrl() { + return collapsedLogoImageUrl; + } + + + @JsonProperty(value = JSON_PROPERTY_COLLAPSED_LOGO_IMAGE_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCollapsedLogoImageUrl(@Nullable String collapsedLogoImageUrl) { + this.collapsedLogoImageUrl = collapsedLogoImageUrl; + } + + public WhiteLabelingParams appTitle(@Nullable String appTitle) { this.appTitle = appTitle; return this; @@ -521,6 +550,7 @@ public boolean equals(Object o) { WhiteLabelingParams whiteLabelingParams = (WhiteLabelingParams) o; return Objects.equals(this.logoImageUrl, whiteLabelingParams.logoImageUrl) && Objects.equals(this.logoImageHeight, whiteLabelingParams.logoImageHeight) && + Objects.equals(this.collapsedLogoImageUrl, whiteLabelingParams.collapsedLogoImageUrl) && Objects.equals(this.appTitle, whiteLabelingParams.appTitle) && Objects.equals(this.favicon, whiteLabelingParams.favicon) && Objects.equals(this.paletteSettings, whiteLabelingParams.paletteSettings) && @@ -539,7 +569,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(logoImageUrl, logoImageHeight, appTitle, favicon, paletteSettings, helpLinkBaseUrl, uiHelpBaseUrl, enableHelpLinks, whiteLabelingEnabled, showNameVersion, platformName, platformVersion, customCss, hideConnectivityDialog, overrideTrendzName, hideChatBot); + return Objects.hash(logoImageUrl, logoImageHeight, collapsedLogoImageUrl, appTitle, favicon, paletteSettings, helpLinkBaseUrl, uiHelpBaseUrl, enableHelpLinks, whiteLabelingEnabled, showNameVersion, platformName, platformVersion, customCss, hideConnectivityDialog, overrideTrendzName, hideChatBot); } @Override @@ -548,6 +578,7 @@ public String toString() { sb.append("class WhiteLabelingParams {\n"); sb.append(" logoImageUrl: ").append(toIndentedString(logoImageUrl)).append("\n"); sb.append(" logoImageHeight: ").append(toIndentedString(logoImageHeight)).append("\n"); + sb.append(" collapsedLogoImageUrl: ").append(toIndentedString(collapsedLogoImageUrl)).append("\n"); sb.append(" appTitle: ").append(toIndentedString(appTitle)).append("\n"); sb.append(" favicon: ").append(toIndentedString(favicon)).append("\n"); sb.append(" paletteSettings: ").append(toIndentedString(paletteSettings)).append("\n"); @@ -619,6 +650,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%slogoImageHeight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getLogoImageHeight())))); } + // add `collapsedLogoImageUrl` to the URL query string + if (getCollapsedLogoImageUrl() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%scollapsedLogoImageUrl%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCollapsedLogoImageUrl())))); + } + // add `appTitle` to the URL query string if (getAppTitle() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%sappTitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAppTitle())))); diff --git a/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleExportData.java b/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleExportData.java index a544c3ad..de785786 100644 --- a/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleExportData.java +++ b/paas/src/main/java/org/thingsboard/client/model/WidgetsBundleExportData.java @@ -87,7 +87,7 @@ public WidgetsBundleExportData addWidgetsItem(com.fasterxml.jackson.databind.Jso } /** - * Get widgets + * List of widgets in the bundle * @return widgets */ @Nullable